2012-07-21 55 views
-1

我使用Debian版擠壓/ SID的ffmpeg轉換的FLV到mp4.I需要查看iPhone上的最終輸出的iPad。我嘗試了許多不同的組合,但沒有成功地正確轉換文件。使用的ffmpeg轉換FLV到MP4在Debian 6

關於樣品FLV文件的信息如下: - 經由命令的ffmpeg -i sample.flv

FFmpeg version SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.1, Copyright (c) 2000-2009 Fabrice Bellard, et al. 
    configuration: --extra-version=4:0.5.9-0ubuntu0.10.04.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static 
    libavutil  49.15. 0/49.15. 0 
    libavcodec 52.20. 1/52.20. 1 
    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 Jun 12 2012 16:27:59, gcc: 4.4.3 
Input #0, flv, from 'sample.flv': 
    Duration: 00:01:06.90, start: 2.079000, bitrate: N/A 
    Stream #0.0: Video: flv, yuv420p, 352x200, 1k tbr, 1k tbn, 1k tbc 
    Stream #0.1: Audio: nellymoser, 44100 Hz, mono, s16 
At least one output file must be specified 

當我嘗試使用命令 - 的ffmpeg -i sample.flv -sameq -ar 22050 sample.mp4

我得到以下輸出錯誤。

ffmpeg -i sample.flv -sameq -ar 22050 sample.mp4 
FFmpeg version SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.1, Copyright (c) 2000-2009 Fabrice Bellard, et al. 
    configuration: --extra-version=4:0.5.9-0ubuntu0.10.04.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static 
    libavutil  49.15. 0/49.15. 0 
    libavcodec 52.20. 1/52.20. 1 
    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 Jun 12 2012 16:27:59, gcc: 4.4.3 
Input #0, flv, from 'sample.flv': 
    Duration: 00:01:06.90, start: 2.079000, bitrate: N/A 
    Stream #0.0: Video: flv, yuv420p, 352x200, 1k tbr, 1k tbn, 1k tbc 
    Stream #0.1: Audio: nellymoser, 44100 Hz, mono, s16 
Output #0, mp4, to 'sample.mp4': 
    Stream #0.0: Video: mpeg4, yuv420p, 352x200, q=2-31, 200 kb/s, 90k tbn, 1k tbc 
    Stream #0.1: Audio: 0x0000, 22050 Hz, mono, s16, 64 kb/s 
Stream mapping: 
    Stream #0.0 -> #0.0 
    Stream #0.1 -> #0.1 
Unsupported codec for output stream #0.1 

我不是很熟悉ffmpeg和任何幫助,指針將高度讚賞。

許多謝謝你是進步。

+0

如果您只是需要轉換的東西,看看VLC。它只是一個'sudo apt-get install vlc'。另外,我認爲問題在於您沒有安裝FLV支持。 – Linuxios 2012-07-21 15:28:53

+0

感謝Linuxios, 我編譯過libmp3lame。現在我得到另一個無錯誤 流映射: 流#0.0 - >#0.0 流#0.1 - > 0.1# 按[q]停止編碼 [MPEG4 @ 0x19ee400]錯誤,無效的時間戳= 11637,最後= 13630 視頻編碼失敗 – user1542610 2012-07-22 11:06:26

+0

除了手動編譯它,它可以很容易出錯,如何只'命令和apt-get安裝vlc'? – Linuxios 2012-07-22 14:00:47

回答

1

這裏的一個開始:

流#0.1:音頻:0×0000,22050赫茲,單聲道,S16,64kb/s的

FFMPEG通常試圖選擇一個合適的編碼器的輸出您指定的容器格式。在這種情況下,選擇了由於某種原因,「音頻編碼器」 0×0000(可能是一個錯誤/舊版/沒有可用的編解碼器)

在這種情況下,然而,你可以告訴它要使用的編碼器。要選擇一個,請查看ffmpeg -codecs的輸出。您可以通過在指定的輸出文件名之前加上-acodec codec來選擇要編碼的音頻編解碼器。

既然你編碼蘋果設備,儘量選用產生AAC音頻編碼器,因爲這往往是蘋果最喜愛的音頻編解碼器。