문제
FFMPEG를 사용하는 사람
표준 출력을 가진 영화 제작자의 사용자가 상당히 간단한 WMV를 보유하고 있으며 .flv를 사용하여 .flv로 변환하려고합니다.
c :> ffmpeg -i "e : jab core 4 Recounters.wmv"-vcodec flv "c : net projects svn integratedalgorithmics src mediaadmin mediaadmin bin debug 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 ?)
처음으로 오류가 발생했을 때 Th -AR Switch를 추가했습니다.
파일에있는 코덱 정보는 다음과 같습니다.
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
이 문제를 겪고있는 많은 사람들이 So Solution 또는 Cause를보고 있습니다.
모든 아이디어는 미리 감사드립니다
해결책
어떤 도움이든, 소스 오디오가 48kHz이고 FLV가 거부한다는 것을 알 수 있습니다. FFMPEG는 분명히 AR 플래그를 무시하고 있습니다. 첫 번째 단계는 오디오를 재 샘플링하는 것입니다 ... 샘플 속도를 변환 한 다음 거기에서 FLV로 트랜스 코딩하기 위해 중개 형식으로 트랜스 코딩을 시도 할 수 있습니다.
다른 팁
FFMPEG에서 옵션은 관련 입력 파일을 접두사해야합니다. 이동하다 -ar 44100
전면으로 작동합니다.
나는 질문에 이미 답이 있다는 것을 알고 있지만 누군가에게 도움이 될 것이라고 생각했습니다. 오디오 샘플 속도 문제에 직면 한 경우 다음 명령을 사용하십시오.
ffmpeg -i video.avi -ar 22050 video.flv
-i input file name
-ar audio sampling rate in Hz
보다 정확하게 : FFMPEG에서 옵션은 산출 그들이 관련된 파일.
이동하다 -ar 44100
전면으로 출력 파일 이름의 그리고 그것은 작동 할 것입니다.