私はWebRTC(WebブラウザgetUserMedia API)でキャプチャした6つのwebmファイル(ビデオ/オーディオ)を持っています。彼らは個人的にすべてうまくいく。彼らの長さはすべて15秒、サイズはそれぞれ2MBです。ffmpeg:webmファイルを連結 - 出力ファイルは最初のビデオのみを表示
concat demuxer(documentation)を使用してffmpegを連結すると、結果の出力ファイルは12MB(予想通り)ですが、再生すると最初のビデオのみが再生され、15秒後に停止します。 Google ChromeとVLCで試してみました。
これは私が使用していますffmpegのコマンドです:
ffmpeg -f concat -i mylist.txt -c copy output3.webm
そして、ここではmylist.txtです:私はことを
c:\Temp\files>ffmpeg -f concat -i mylist.txt -c copy output4.webm
ffmpeg version N-72383-g7206b94 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopenc
ore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --ena
ble-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable
-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enabl
e-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable
-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --e
nable-lzma --enable-decklink --enable-zlib
libavutil 54. 26.100/54. 26.100
libavcodec 56. 41.100/56. 41.100
libavformat 56. 33.101/56. 33.101
libavdevice 56. 4.100/56. 4.100
libavfilter 5. 16.101/5. 16.101
libswscale 3. 1.101/3. 1.101
libswresample 1. 1.100/1. 1.100
libpostproc 53. 3.100/53. 3.100
Input #0, concat, from 'mylist.txt':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Audio: opus, 48000 Hz, mono, fltp
Stream #0:1: Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 30 fps, 30 tbr,
1k tbn, 1k tbc
[webm @ 00000000003a5fe0] Codec for stream 0 does not use global headers but con
tainer format requires global headers
[webm @ 00000000003a5fe0] Codec for stream 1 does not use global headers but con
tainer format requires global headers
Output #0, webm, to 'output4.webm':
Metadata:
encoder : Lavf56.33.101
Stream #0:0: Video: vp8, yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 30 fps,
30 tbr, 1k tbn, 1k tbc
Stream #0:1: Audio: opus, 48000 Hz, mono
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[concat @ 0000000000361e20] DTS 0 < 14911 out of order
[webm @ 00000000003a5fe0] Non-monotonous DTS in output stream 0:0; previous: 149
11, current: 0; changing to 14911. This may result in incorrect timestamps in th
e output file.
[webm @ 00000000003a5fe0] Non-monotonous DTS in output stream 0:0; previous: 149
11, current: 48; changing to 14911. This may result in incorrect timestamps in t
he output file.
[webm @ 00000000003a5fe0] Non-monotonous DTS in output stream 0:1; previous: 148
69, current: 59; changing to 14869. This may result in incorrect timestamps in t
he output file.
注:ここでは
file 'tmpD08D.webm'
file 'tmpD08E.webm'
file 'tmpD08F.webm'
file 'tmpD090.webm'
file 'tmpD091.webm'
file 'tmpD0A1.webm'
はffmpegの出力でありますffmpeg出力の "出力ストリームに非単調なDTS"エラーが多数表示されます。
私はここで間違っていますか?
ストリームの順序とプロパティは、すべての動画で同じにする必要があります。 – Mulvya