私の Synology DS718+ NAS には ffmpeg の 2 つのバージョンがインストールされています。デフォルトで古い 2.7.1 が付属していますが、tvheadend の mpeg-ts スポーン プロファイルを使用して機能を向上させるために、synocommunity ffmpeg パッケージ (4.2.1) もインストールしました。
これで、次のコマンドラインができました:
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を選ぶと4.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!
何が間違っているのか分かりません。助けてください。