開啟輸出流編碼器時出現 ffmpeg 錯誤

開啟輸出流編碼器時出現 ffmpeg 錯誤

我的 Synology DS718+ NAS 上安裝了 2 個版本的 ffmpeg。它帶有預設且過時的 2.7.1,但我還安裝了 synocommunity ffmpeg 套件 (4.2.1),以便使用 tvheadend 的 mpeg-ts 生成設定檔改進功能。

現在我有這個命令列:

ffmpeg -i pipe:0 -map a -map v -c:v libx264 -vf "yadif=1:-1:1, scale=720:576" -crf 24 -profile:v main -preset veryfast -c:a mp3 -b:a 96k -ac 2 -async 1 -sn -fflags +genpts -metadata service_provider=STRING -metadata service_name=STRING -f mpegts pipe:1

如果我使用2.7.1它有效(如果設定 c:a aac 它不起作用,因為 2.7.1 沒有 aac),但如果我使用4.2.1它給了我這個:

spawn:   Stream #0:1 -> #0:0 (mp2 (native) -> mp3 (libmp3lame))
spawn:   Stream #0:2 -> #0:1 (mp2 (native) -> mp3 (libmp3lame))
spawn:   Stream #0:0 -> #0:2 (mpeg2video (native) -> h264 (libx264))
spawn: -async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.
spawn:     Last message repeated 1 times
spawn: Error initializing output stream 0:2 -- Error while opening encoder for output stream #0:2 - maybe incorrect parameters such as bit_rate, rate, width or height
spawn: Conversion failed!

奇怪的是,如果我選擇 c:a aac in4.2.1它在音訊串流中崩潰。

spawn:   Stream #0:1 -> #0:0 (mp2 (native) -> aac (native))
spawn:   Stream #0:2 -> #0:1 (mp2 (native) -> aac (native))
spawn:   Stream #0:0 -> #0:2 (mpeg2video (native) -> h264 (libx264))
spawn: -async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.
spawn: Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
spawn: Conversion failed!

不知道我做錯了什麼。請幫忙。

相關內容