[FFmpeg-user] '-fflags +genpts' appears to work, but not actually
Mark Filipak
markfilipak.windows+ffmpeg at gmail.com
Wed Mar 11 22:39:09 EET 2020
Hello,
ffmpeg -loglevel verbose -i
"concat:VTS_06_1.VOB|VTS_06_2.VOB|VTS_06_3.VOB|VTS_06_4.VOB|VTS_06_5.VOB"
-map 0:v -map 0:a -c:v copy -c:a copy "OUT.mkv"
(1st listing below) provokes a "Can't write packet with unknown
timestamp" error.
Adding '-fflags +genpts', thusly:
ffmpeg -loglevel verbose -fflags +genpts -i
"concat:VTS_06_1.VOB|VTS_06_2.VOB|VTS_06_3.VOB|VTS_06_4.VOB|VTS_06_5.VOB"
-map 0:v -map 0:a -c:v copy -c:a copy "OUT.mkv"
(2nd listing below) completes happy but doesn't fix it -- reshuffling
the audio tracks in MKVToolNix results in errors.
Any suggestions welcome.
Regards,
Mark.
G:\VIDEO_TS>ffmpeg -loglevel verbose -i
"concat:VTS_06_1.VOB|VTS_06_2.VOB|VTS_06_3.VOB|VTS_06_4.VOB|VTS_06_5.VOB"
-map 0:v -map 0:a -c:v copy -c:a copy "OUT.mkv"
ffmpeg version N-94664-g0821bc4eee Copyright (c) 2000-2019 the FFmpeg
developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora
--enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg
--enable-lzma --enable-zlib --enable-gmp --enable-libvidstab
--enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va
--enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
--enable-libopenmpt
libavutil 56. 33.100 / 56. 33.100
libavcodec 58. 55.101 / 58. 55.101
libavformat 58. 31.104 / 58. 31.104
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 58.101 / 7. 58.101
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
[mpeg @ 0000013d8bac9280] max_analyze_duration 5000000 reached at
5021489 microseconds st:1
Input #0, mpeg, from
'concat:VTS_06_1.VOB|VTS_06_2.VOB|VTS_06_3.VOB|VTS_06_4.VOB|VTS_06_5.VOB':
Duration: 01:58:50.14, start: 0.041500, bitrate: 5598 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), 1 reference frame,
yuv420p(tv, top first, left), 720x480 [SAR 32:27 DAR 16:9], Closed
Captions, 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
Stream #0:2[0x81]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:3[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
File 'OUT.mkv' already exists. Overwrite ? [y/N] y
Output #0, matroska, to 'OUT.mkv':
Metadata:
encoder : Lavf58.31.104
Stream #0:0: Video: mpeg2video (Main), 1 reference frame (mpg2 /
0x3267706D), yuv420p(tv, top first, left), 720x480 (0x0) [SAR 32:27 DAR
16:9], q=2-31, 29.97 fps, 59.94 tbr, 1k tbn, 90k tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo,
fltp, 192 kb/s
Stream #0:2: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side),
fltp, 448 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:2 -> #0:1 (copy)
Stream #0:3 -> #0:2 (copy)
Press [q] to stop, [?] for help
[matroska @ 0000013d8badd400] Timestamps are unset in a packet for
stream 0. This is deprecated and will stop working in the future. Fix
your code to set the timestamps properly
[matroska @ 0000013d8badd400] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument
No more output streams to write to, finishing.
frame= 2 fps=0.0 q=-1.0 Lsize= 11kB time=00:00:00.00
bitrate=90952.0kbits/s speed=0.011x
video:8kB audio:2kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 7.518442%
Input file #0
(concat:VTS_06_1.VOB|VTS_06_2.VOB|VTS_06_3.VOB|VTS_06_4.VOB|VTS_06_5.VOB):
Input stream #0:0 (data): 0 packets read (0 bytes);
Input stream #0:1 (video): 2 packets read (8014 bytes);
Input stream #0:2 (audio): 1 packets read (768 bytes);
Input stream #0:3 (audio): 1 packets read (1792 bytes);
Total: 4 packets (10574 bytes) demuxed
Output file #0 (OUT.mkv):
Output stream #0:0 (video): 2 packets muxed (8014 bytes);
Output stream #0:1 (audio): 1 packets muxed (768 bytes);
Output stream #0:2 (audio): 1 packets muxed (1792 bytes);
Total: 4 packets (10574 bytes) muxed
[AVIOContext @ 0000013d8bb76480] Statistics: 8 seeks, 7 writeouts
[AVIOContext @ 0000013d8bad2f80] Statistics: 3395728 bytes read, 3 seeks
Conversion failed!
G:\VIDEO_TS>ffmpeg -loglevel verbose -fflags +genpts -i
"concat:VTS_06_1.VOB|VTS_06_2.VOB|VTS_06_3.VOB|VTS_06_4.VOB|VTS_06_5.VOB"
-map 0:v -map 0:a -c:v copy -c:a copy "OUT.mkv"
ffmpeg version N-94664-g0821bc4eee Copyright (c) 2000-2019 the FFmpeg
developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora
--enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg
--enable-lzma --enable-zlib --enable-gmp --enable-libvidstab
--enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va
--enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
--enable-libopenmpt
libavutil 56. 33.100 / 56. 33.100
libavcodec 58. 55.101 / 58. 55.101
libavformat 58. 31.104 / 58. 31.104
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 58.101 / 7. 58.101
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
[mpeg @ 000001c89af494c0] max_analyze_duration 5000000 reached at
5021489 microseconds st:1
Input #0, mpeg, from
'concat:VTS_06_1.VOB|VTS_06_2.VOB|VTS_06_3.VOB|VTS_06_4.VOB|VTS_06_5.VOB':
Duration: 01:58:50.14, start: 0.041500, bitrate: 5598 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), 1 reference frame,
yuv420p(tv, top first, left), 720x480 [SAR 32:27 DAR 16:9], Closed
Captions, 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
Stream #0:2[0x81]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:3[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
File 'OUT.mkv' already exists. Overwrite ? [y/N] y
Output #0, matroska, to 'OUT.mkv':
Metadata:
encoder : Lavf58.31.104
Stream #0:0: Video: mpeg2video (Main), 1 reference frame (mpg2 /
0x3267706D), yuv420p(tv, top first, left), 720x480 (0x0) [SAR 32:27 DAR
16:9], q=2-31, 29.97 fps, 59.94 tbr, 1k tbn, 90k tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo,
fltp, 192 kb/s
Stream #0:2: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side),
fltp, 448 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:2 -> #0:1 (copy)
Stream #0:3 -> #0:2 (copy)
Press [q] to stop, [?] for help
[mpeg @ 000001c89af494c0] New subtitle stream 0:4 at pos:95102990 and
DTS:109.05ss speed=98.4x
[mpeg @ 000001c89af494c0] New subtitle stream 0:5 at pos:95363086 and
DTS:109.284s
[mpeg @ 000001c89af494c0] New subtitle stream 0:6 at pos:95406094 and
DTS:109.317s
No more output streams to write to, finishing.ime=01:58:38.65
bitrate=5474.6kbits/s speed= 127x
frame=171005 fps=3047 q=-1.0 Lsize= 4765106kB time=01:58:50.11
bitrate=5474.8kbits/s speed= 127x
video:4203191kB audio:557042kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.102361%
Input file #0
(concat:VTS_06_1.VOB|VTS_06_2.VOB|VTS_06_3.VOB|VTS_06_4.VOB|VTS_06_5.VOB):
Input stream #0:0 (data): 0 packets read (0 bytes);
Input stream #0:1 (video): 171005 packets read (4304067103 bytes);
Input stream #0:2 (audio): 222817 packets read (171123456 bytes);
Input stream #0:3 (audio): 222817 packets read (399288064 bytes);
Total: 616639 packets (4874478623 bytes) demuxed
Output file #0 (OUT.mkv):
Output stream #0:0 (video): 171005 packets muxed (4304067103 bytes);
Output stream #0:1 (audio): 222817 packets muxed (171123456 bytes);
Output stream #0:2 (audio): 222817 packets muxed (399288064 bytes);
Total: 616639 packets (4874478623 bytes) muxed
[AVIOContext @ 000001c89b6b3540] Statistics: 8 seeks, 27858 writeouts
[AVIOContext @ 000001c89af53080] Statistics: 4993048720 bytes read, 3 seeks
More information about the ffmpeg-user
mailing list