2013-04-22 143 views
1

我正在使用ClipBucket。我已經設置了ffmpeg,我可以將AVI,WMV文件轉換爲FLV視頻文件而沒有任何問題,但是現在我試圖將FLV視頻文件轉換爲具有不同視頻質量的FLV視頻文件。ffmpeg FLV到FLV轉換失敗

但是,轉換時出現錯誤。有人能幫助我嗎?

日誌:

Preparing file... 
Unknown file details - Unable to get video details using FFMPEG 

Converting Video 
Conversion Command : /usr/local/bin/ffmpeg -i /home/myspace86/myspace86.com/files/conversion_queue/136667418894906.flv -f flv -vcodec libx264 -r 30 -vf 'movie=/home/myspace86/public_html/player_logo.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]' -ab 320000 /home/myspace86/myspace86.com/files/videos/136667418894906.flv 2> /home/myspace86/myspace86.com/files/temp/136667424191b8e.tmp 

轉換詳情

ffmpeg version N-52385-g6d7ec4f Copyright (c) 2000-2013 the FFmpeg developers 
built on Apr 22 2013 16:08:27 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-54) 
configuration: --prefix=/usr/local --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libx264 --enable-libxvid 
libavutil 52. 27.100/52. 27.100 
libavcodec 55. 5.100/55. 5.100 
libavformat 55. 3.100/55. 3.100 
libavdevice 55. 0.100/55. 0.100 
libavfilter 3. 60.101/3. 60.101 
libswscale 2. 2.100/2. 2.100 
libswresample 0. 17.102/0. 17.102 
libpostproc 52. 3.100/52. 3.100 
Input #0, flv, from '/home/myspace86/myspace86.com/files/conversion_queue/136667418894906.flv': 
Metadata: 
metadatacreator : Yet Another Metadata Injector for FLV - Version 1.4 
hasKeyframes : true 
hasVideo : true 
hasAudio : true 
hasMetadata : true 
canSeekToEnd : false 
datasize : 40992128 
videosize : 37546219 
audiosize : 3247153 
lasttimestamp : 728 
lastkeyframetimestamp: 727 
lastkeyframelocation: 40978250 
Duration: 00:12:08.16, start: 0.000000, bitrate: 450 kb/s 
Stream #0:0: Video: vp6f, yuv420p, 648x459, 409 kb/s, 29.97 tbr, 1k tbn, 1k tbc 
Stream #0:1: Audio: mp3, 22050 Hz, mono, s16p, 32 kb/s 
[libx264 @ 0x146d900] height not divisible by 2 (648x459) 
Output #0, flv, to '/home/myspace86/myspace86.com/files/videos/136667418894906.flv': 
Metadata: 
metadatacreator : Yet Another Metadata Injector for FLV - Version 1.4 
hasKeyframes : true 
hasVideo : true 
hasAudio : true 
hasMetadata : true 
canSeekToEnd : false 
datasize : 40992128 
videosize : 37546219 
audiosize : 3247153 
lasttimestamp : 728 
lastkeyframetimestamp: 727 
lastkeyframelocation: 40978250 
Stream #0:0: Video: h264, yuv420p, 648x459, q=-1--1, 90k tbn, 30 tbc 
Stream #0:1: Audio: none, 22050 Hz, mono, s16p 
Stream mapping: 
Stream #0:0 -> #0:0 (vp6f -> libx264) 
Stream #0:1 -> #0:1 (mp3 -> libmp3lame) 
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height 


Unknown file details - Unable to get output video details using FFMPEG 


Time Took : 0.3056 seconds 

conversion_status : completed 

回答

1
[libx264 @ 0x146d900] height not divisible by 2 (648x459) 

這就是你的錯誤。通常,在處理任意輸入時,可能需要包含一個可將輸出整除2的縮放器,例如如下,其中高度固定爲460:

scale=trunc(oh*a*2)/2:460 

或者您之前解析您的輸入文件,看看是否有任何重新調整需要。另見:ffmpeg/avconv force scaled output to be divisible by 2