FFMPEG wmv 转换为 flv

发布于 2024-07-26 03:45:35 字数 4136 浏览 10 评论 0原文

使用 ffmpeg 的任何人

我有一个由用户从具有标准输出的电影制作商导出的相当简单的 wmv,并希望使用

C:>ffmpeg -i "E:\Jab Core 4 Recounters.wmv" -vcodec flv "C 转换为 .flv :\Net Projects\SVN\IntegratedAlgorithmics\src\MediaAdmin\MediaAdmin\bin\Debug\Movies\Jab Core 4 Recounters.flv" -ar 44100

我收到的输出/错误是

FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-postproc --enable-swscale --enable-avfilt
er --enable-avfilter-lavf --enable-pthreads --enable-avisynth --enable-libfaac -
-enable-libfaad --enable-libmp3lame --enable-libspeex --enable-libtheora --enabl
e-libvorbis --enable-libxvid --enable-libx264 --enable-memalign-hack
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Mar 16 2009 16:09:18, gcc: 4.2.4 [Sherpya]
[wmv3 @ 0x1c0d490]Extra data: 8 bits left, value: 0

Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000
/1) -> 30.00 (30/1)
Input #0, asf, from 'E:\Jab Core 4 Recounters.wmv':
  Duration: 00:01:55.99, start: 5.000000, bitrate: 813 kb/s
    Stream #0.0: Audio: wmav2, 48000 Hz, stereo, s16, 192 kb/s
    Stream #0.1: Video: wmv3, yuv420p, 640x480, 586 kb/s, 30 tbr, 1k tbn, 1k tbc

Output #0, flv, to 'C:\Net Projects\SVN\IntegratedAlgorithmics\src\MediaAdmin\Me
diaAdmin\bin\Debug\Movies\Jab Core 4 Recounters.flv':
    Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 90k tbn, 30 tbc

    Stream #0.1: Audio: libmp3lame, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.1 -> #0.0
  Stream #0.0 -> #0.1
[wmv3 @ 0x1c0d490]Extra data: 8 bits left, value: 0
[libmp3lame @ 0x1c0d8d0]flv does not support that sample rate, choose from (4410
0, 22050, 11025).
Could not write header for output file #0 (incorrect codec parameters ?)

我在收到错误时添加了 -ar 开关第一次

我在文件中的编解码器信息如下,

General
Complete name                    : E:\Jab Core 4 Recounters.wmv
Format                           : Windows Media
File size                        : 11.3 MiB
Duration                         : 2mn 0s
Overall bit rate mode            : Variable
Overall bit rate                 : 780 Kbps
Maximum Overall bit rate         : 949 Kbps
Encoded date                     : UTC 2009-03-07 07:02:41.121
Writing application              :  6.0.6000.16386 / Windows Movie Maker
Application                      : Windows Movie Maker 6.0.6000.16386

Video
ID                               : 2
Format                           : VC-1
Format profile                   : MP@ML
Codec ID                         : WMV3
Codec ID/Info                    : Windows Media Video 9
Codec ID/Hint                    : WMV3
Duration                         : 2mn 0s
Bit rate mode                    : Variable
Bit rate                         : 587 Kbps
Width                            : 640 pixels
Height                           : 480 pixels
Display aspect ratio             : 4/3
Frame rate                       : 30.000 fps
Resolution                       : 24 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.064
Stream size                      : 8.46 MiB (75%)
Language                         : en-us

Audio
ID                               : 1
Format                           : WMA2
Format profile                   : L3
Codec ID                         : 161
Codec ID/Info                    : Windows Media Audio 2
Description of the codec         : Windows Media Audio 9.2 - VBR Quality 90, 48 kHz, stereo 1-pass VBR
Duration                         : 2mn 0s
Bit rate mode                    : Variable
Bit rate                         : 186 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Stream size                      : 2.68 MiB (24%)
Language                         : en-us

我看到很多人都遇到这个问题,所以解决方案或原因

任何想法都会有帮助 提前致谢

anyone using ffmpeg

I have a fairly simple wmv exported by a user from movie maker with standard output and want to convert to .flv using

C:>ffmpeg -i "E:\Jab Core 4 Recounters.wmv" -vcodec flv "C:\Net Projects\SVN\IntegratedAlgorithmics\src\MediaAdmin\MediaAdmin\bin\Debug\Movies\Jab Core 4 Recounters.flv" -ar 44100

the output / error i receive is

FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-postproc --enable-swscale --enable-avfilt
er --enable-avfilter-lavf --enable-pthreads --enable-avisynth --enable-libfaac -
-enable-libfaad --enable-libmp3lame --enable-libspeex --enable-libtheora --enabl
e-libvorbis --enable-libxvid --enable-libx264 --enable-memalign-hack
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Mar 16 2009 16:09:18, gcc: 4.2.4 [Sherpya]
[wmv3 @ 0x1c0d490]Extra data: 8 bits left, value: 0

Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000
/1) -> 30.00 (30/1)
Input #0, asf, from 'E:\Jab Core 4 Recounters.wmv':
  Duration: 00:01:55.99, start: 5.000000, bitrate: 813 kb/s
    Stream #0.0: Audio: wmav2, 48000 Hz, stereo, s16, 192 kb/s
    Stream #0.1: Video: wmv3, yuv420p, 640x480, 586 kb/s, 30 tbr, 1k tbn, 1k tbc

Output #0, flv, to 'C:\Net Projects\SVN\IntegratedAlgorithmics\src\MediaAdmin\Me
diaAdmin\bin\Debug\Movies\Jab Core 4 Recounters.flv':
    Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 90k tbn, 30 tbc

    Stream #0.1: Audio: libmp3lame, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.1 -> #0.0
  Stream #0.0 -> #0.1
[wmv3 @ 0x1c0d490]Extra data: 8 bits left, value: 0
[libmp3lame @ 0x1c0d8d0]flv does not support that sample rate, choose from (4410
0, 22050, 11025).
Could not write header for output file #0 (incorrect codec parameters ?)

i added th -ar switch when i got the error the first time

the codec info i have on the file is as follows

General
Complete name                    : E:\Jab Core 4 Recounters.wmv
Format                           : Windows Media
File size                        : 11.3 MiB
Duration                         : 2mn 0s
Overall bit rate mode            : Variable
Overall bit rate                 : 780 Kbps
Maximum Overall bit rate         : 949 Kbps
Encoded date                     : UTC 2009-03-07 07:02:41.121
Writing application              :  6.0.6000.16386 / Windows Movie Maker
Application                      : Windows Movie Maker 6.0.6000.16386

Video
ID                               : 2
Format                           : VC-1
Format profile                   : MP@ML
Codec ID                         : WMV3
Codec ID/Info                    : Windows Media Video 9
Codec ID/Hint                    : WMV3
Duration                         : 2mn 0s
Bit rate mode                    : Variable
Bit rate                         : 587 Kbps
Width                            : 640 pixels
Height                           : 480 pixels
Display aspect ratio             : 4/3
Frame rate                       : 30.000 fps
Resolution                       : 24 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.064
Stream size                      : 8.46 MiB (75%)
Language                         : en-us

Audio
ID                               : 1
Format                           : WMA2
Format profile                   : L3
Codec ID                         : 161
Codec ID/Info                    : Windows Media Audio 2
Description of the codec         : Windows Media Audio 9.2 - VBR Quality 90, 48 kHz, stereo 1-pass VBR
Duration                         : 2mn 0s
Bit rate mode                    : Variable
Bit rate                         : 186 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Stream size                      : 2.68 MiB (24%)
Language                         : en-us

i see alot of people with this issue with so solution or cause

any ideas would be helpful
thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

—━☆沉默づ 2024-08-02 03:45:35

在 ffmpeg 中,选项必须以它们相关的输入文件为前缀。 将 -ar 44100 移到前面就可以了。

In ffmpeg, options must prefix the input file they relate to. Move -ar 44100 to the front and it will work.

静谧 2024-08-02 03:45:35

我知道问题已经有了答案,但我认为这可能对某人有帮助。
如果您遇到音频采样率问题,请使用以下命令

ffmpeg -i video.avi -ar 22050 video.flv

-i input file name
-ar audio sampling rate in Hz

I know question already has an answer but I thought it might help someone.
If you are facing the audio sample rate issue please use the following command

ffmpeg -i video.avi -ar 22050 video.flv

-i input file name
-ar audio sampling rate in Hz
纸伞微斜 2024-08-02 03:45:35

尽管这可能没什么帮助,但您可以看到源音频为 48khz,而 flv 拒绝它。 ffmpeg 显然忽略了您的 -ar 标志。 您的第一步需要是重新采样音频...您可以尝试转码为某种中间格式以转换采样率,然后从那里转码为 flv。

For what little help it may be, you can see that the source audio is at 48khz, and flv is refusing it. ffmpeg is apparently ignoring your -ar flag. Your first step needs to be to resample the audio... you could try transcoding to some intermediary format to get the sample rate converted, and then transcode from there to flv.

不如归去 2024-08-02 03:45:35

更准确地说:在 ffmpeg 中,选项必须为其相关的输出文件添加前缀。
-ar 44100 移至输出文件名的前面 > 它会起作用的。

More precisely: in ffmpeg, options must prefix the output file they relate to.
Move -ar 44100 to the front of the output filename and it will work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文