DAVをAVIに変換できませんでした。

DAVをAVIに変換できませんでした。

次のコマンドを使用して、CCTVレコーダーのDAV形式のビデオクリップをAVI(test-1.davからtest-1.aviに変換)に変換したいと思います。

ffmpeg -y -i test\ -\ 1.dav -vcodec copy -movflags +faststart test\ -\ 1.avi

ffmpeg バージョン 2.4.13 を使用する x86_64 Linux と ffmpeg バージョン 2.0.2 を使用する Synology で正常に動作します。変換されたファイルは、Windows、Android、iPad、Linuxで完全に再生できます。ただし、最新バージョンのソフトウェアを使用してSynologyから変換しようとすると失敗しました(ffmpegバージョン2.7.1)。変換プロセスの出力は次のとおりです。

ffmpeg version 2.7.1 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.3 (crosstool-NG 1.20.0) 20150311 (prerelease)
configuration: --prefix=/usr --incdir='${prefix}/include/ffmpeg' --arch=arm --target-os=linux --cross-prefix=/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi- --enable-cross-compile --enable-optimizations --enable-pic --enable-gpl --enable-shared --disable-static --enable-version3 --enable-nonfree --enable-libfaac --enable-encoders --enable-pthreads --disable-bzlib --disable-protocol=rtp --disable-muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-ffserver --disable-ffplay --disable-devices --disable-bzlib --disable-altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libmp3lame --disable-vaapi --disable-decoder=amrnb --disable-encoder=zmbv --disable-encoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed --disable-encoder=eac3 --disable-decoder=dca --disable-decoder=eac3 --disable-decoder=truehd --cc=/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc
libavutil      54. 27.100 / 54. 27.100
libavcodec     56. 41.100 / 56. 41.100
libavformat    56. 36.100 / 56. 36.100
libavdevice    56.  4.100 / 56.  4.100
libavfilter     5. 16.101 /  5. 16.101
libswscale      3.  1.101 /  3.  1.101
libswresample   1.  2.100 /  1.  2.100
libpostproc    53.  3.100 / 53.  3.100
Input #0, h264, from 'test - 1.dav':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p, 704x576, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Output #0, avi, to 'test - 1.avi':
Metadata:
ISFT            : Lavf56.36.100
Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 704x576, q=2-31, 25 fps, 25 tbr, 50 tbn, 50 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[avi @ 0xb0ff0] H.264 bitstream malformed, no startcode found, use the video bitstream filter 'h264_mp4toannexb' to fix it ('-bsf:v h264_mp4toannexb' option with ffmpeg)
av_interleaved_write_frame(): Invalid data found when processing input
frame=    1 fps=0.0 q=-1.0 Lsize=       6kB time=00:00:00.02 bitrate=2300.0kbits/s    
video:40kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!

それぞれの場合、変換に同じ入力ファイルと同じffmpeg構文を使用したことに注意する必要があります。唯一の違いはffmpegバージョンです。最も奇妙なことは、最新バージョンが正しく動作しないことです。私は何を間違えましたか?どんなアイデアがありますか?

ベストアンサー1

ffmpegバージョン拒否するスタートコードなしでH.264でエンコードされたビデオをAVIに多重化します。-bsf:v h264_mp4toannexb出力の指示に従って使用する必要がありますffmpeg。動画は再エンコードされません。

おすすめ記事