[FFmpeg-trac] #1598(undetermined:open): Muxing raw h264 into mpegts (and mkv) fails.
FFmpeg
trac at avcodec.org
Thu Dec 15 14:39:24 EET 2016
#1598: Muxing raw h264 into mpegts (and mkv) fails.
-------------------------------------+-------------------------------------
Reporter: Mista_D | Owner:
Type: defect | Status: open
Priority: normal | Component:
Version: git-master | undetermined
Keywords: mpegts h264 | Resolution:
av_interleaved_write_frame | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by a_d_d_z):
I have noticed the same behaviour with 3.2-static (obtained from
https://www.johnvansickle.com/ffmpeg/)
However i have found that if I convert the hevc ES to mp4 and then mux the
mp4 to mpegts it works.
Below is the console output for the two scenarios.
Mux to mpegts direct from ES (fails as above):
./ffmpeg -i ~/ES_FILES/hevc_testpattern.265 -c:v copy -f mpegts -muxrate
10M -pcr_period 35 -mpegts_pmt_start_pid 0x50 -mpegts_start_pid 0x51
~/ES_FILES/hevc_testpattern.ts -y
ffmpeg version 3.2-static http://johnvansickle.com/ffmpeg/ Copyright (c)
2000-2016 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-3) 20161019
configuration: --enable-gpl --enable-version3 --enable-static --disable-
debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio
--cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-
gray --enable-libass --enable-libebur128 --enable-libfreetype --enable-
libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-
libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-
libzimg
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, hevc, from '/home/dvt/ES_FILES/hevc_testpattern.265':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv), 3840x2160 [SAR
1:1 DAR 16:9], 50 fps, 50 tbr, 1200k tbn, 50 tbc
Output #0, mpegts, to '/home/dvt/ES_FILES/hevc_testpattern.ts':
Metadata:
encoder : Lavf57.56.100
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv), 3840x2160 [SAR
1:1 DAR 16:9], q=2-31, 50 fps, 50 tbr, 90k tbn, 1200k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x5369360] 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
[mpegts @ 0x5369360] first pts value must be set
av_interleaved_write_frame(): Invalid data found when processing input
frame= 1 fps=0.0 q=-1.0 Lsize= 0kB time=-00:00:00.03 bitrate=
-0.0kbits/s speed=N/A
video:20kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Conversion failed!
Mux to mp4 and then to mpegts (works!):
./ffmpeg -i ~/ES_FILES/hevc_testpattern.265 -c:v copy
~/ES_FILES/hevc_testpattern.mp4 -yffmpeg version 3.2-static
http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2016 the FFmpeg
developers
built with gcc 5.4.1 (Debian 5.4.1-3) 20161019
configuration: --enable-gpl --enable-version3 --enable-static --disable-
debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio
--cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-
gray --enable-libass --enable-libebur128 --enable-libfreetype --enable-
libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-
libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-
libzimg
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, hevc, from '/home/dvt/ES_FILES/hevc_testpattern.265':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv), 3840x2160 [SAR
1:1 DAR 16:9], 50 fps, 50 tbr, 1200k tbn, 50 tbc
Output #0, mp4, to '/home/dvt/ES_FILES/hevc_testpattern.mp4':
Metadata:
encoder : Lavf57.56.100
Stream #0:0: Video: hevc (Main 10) ([35][0][0][0] / 0x0023),
yuv420p10le(tv), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 50 fps, 50 tbr,
1200k tbn, 1200k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x4ee8300] 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
[mp4 @ 0x4ee8300] pts has no value
Last message repeated 205 times
frame= 206 fps=0.0 q=-1.0 Lsize= 222kB time=00:00:04.08 bitrate=
445.5kbits/s speed=1.46e+03x
video:220kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.861721%
./ffmpeg -i ~/ES_FILES/hevc_testpattern.mp4 -c:v copy -f mpegts -muxrate
10M -pcr_period 35 -mpegts_pmt_start_pid 0x50 -mpegts_start_pid 0x51
~/ES_FILES/hevc_testpattern.ts -y
ffmpeg version 3.2-static http://johnvansickle.com/ffmpeg/ Copyright (c)
2000-2016 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-3) 20161019
configuration: --enable-gpl --enable-version3 --enable-static --disable-
debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio
--cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-
gray --enable-libass --enable-libebur128 --enable-libfreetype --enable-
libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-
libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-
libzimg
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/home/dvt/ES_FILES/hevc_testpattern.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf57.56.100
Duration: 00:00:04.14, start: 0.000000, bitrate: 439 kb/s
Stream #0:0(und): Video: hevc (Main 10) (hev1 / 0x31766568),
yuv420p10le(tv), 3840x2160 [SAR 1:1 DAR 16:9], 435 kb/s, 49.76 fps, 50
tbr, 1200k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Output #0, mpegts, to '/home/dvt/ES_FILES/hevc_testpattern.ts':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf57.56.100
Stream #0:0(und): Video: hevc (Main 10) (hev1 / 0x31766568),
yuv420p10le(tv), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 435 kb/s, 49.76
fps, 50 tbr, 90k tbn, 1200k tbc (default)
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x529f5e0] Non-monotonous DTS in output stream 0:0; previous: 0,
current: 0; changing to 1. This may result in incorrect timestamps in the
output file.
frame= 206 fps=0.0 q=-1.0 Lsize= 4982kB time=00:00:04.08
bitrate=10002.3kbits/s speed= 649x
video:220kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 2162.630859%
--
Ticket URL: <https://trac.ffmpeg.org/ticket/1598#comment:16>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list