GNOME Bugzilla – Bug 719519
mpegtsmux: Does not prevent plugging unparsed stream
Last modified: 2014-04-02 21:50:35 UTC
Created attachment 263084 [details] Pipeline diagram rendered Doing gst-launch-1.0 audiotestsrc ! faac ! mpegtsmux ! tsdemux ! mpegtsmux ! udpsink host=225.3.3.3 port=4321 multicast-iface=lo results in unplayable file, tested playback with both playbin and ffprobe. Removing spare remuxing makes perfectly playable file. The same problem happens with AAC streams when original MPEG TS is taken from outside - after muxing back to MPEG TS, AAC streams are detected wrongly and played badly. Rendered diagram of problematic remuxing pipeline is attached. $ GST_DEBUG=3 gst-launch-1.0 playbin uri=udp://225.3.3.3:4321 Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock 0:00:00.037678848 20521 0xad0b70 WARN default descriptions.c:616:format_info_get_desc: Unexpected MPEG-1 layer in audio/mpeg, mpegversion=(int)1 0:00:00.037746140 20521 0xad0b70 WARN mpegtspacketizer mpegtspacketizer.c:2179:mpegts_packetizer_pts_to_ts: Not enough information to calculate proper timestamp 0:00:00.037766089 20521 0xad0b70 WARN mpegtspacketizer mpegtspacketizer.c:2179:mpegts_packetizer_pts_to_ts: Not enough information to calculate proper timestamp 0:00:00.037780340 20521 0xad0b70 WARN mpegtspacketizer mpegtspacketizer.c:2179:mpegts_packetizer_pts_to_ts: Not enough information to calculate proper timestamp 0:00:00.037797769 20521 0xad0b70 WARN mpegtspacketizer mpegtspacketizer.c:2179:mpegts_packetizer_pts_to_ts: Not enough information to calculate proper timestamp 0:00:00.037807430 20521 0xad0b70 WARN mpegtspacketizer mpegtspacketizer.c:2179:mpegts_packetizer_pts_to_ts: Not enough information to calculate proper timestamp 0:00:00.045273637 20521 0x7f2bc00d6450 WARN mpegaudioparse gstmpegaudioparse.c:467:gst_mpeg_audio_parse_head_check:<mpegaudioparse0> invalid layer: 0x0 0:00:00.045312692 20521 0x7f2bc00d6450 WARN mpegaudioparse gstmpegaudioparse.c:467:gst_mpeg_audio_parse_head_check:<mpegaudioparse0> invalid layer: 0x0 0:00:00.045537307 20521 0x7f2bc00d6450 WARN mpegaudioparse gstmpegaudioparse.c:467:gst_mpeg_audio_parse_head_check:<mpegaudioparse0> invalid layer: 0x0 0:00:00.045561368 20521 0x7f2bc00d6450 WARN mpegaudioparse gstmpegaudioparse.c:467:gst_mpeg_audio_parse_head_check:<mpegaudioparse0> invalid layer: 0x0 0:00:00.045587509 20521 0x7f2bc00d6450 WARN mpegaudioparse gstmpegaudioparse.c:467:gst_mpeg_audio_parse_head_check:<mpegaudioparse0> invalid layer: 0x0 0:00:00.045607770 20521 0x7f2bc00d6450 WARN mpegaudioparse gstmpegaudioparse.c:467:gst_mpeg_audio_parse_head_check:<mpegaudioparse0> invalid layer: 0x0 (last line is produced infinitely) $ ffprobe udp://225.3.3.3:4321?localaddr=127.0.0.1 ffprobe version N-58037-g355cea8 Copyright (c) 2007-2013 the FFmpeg developers built on Nov 12 2013 01:29:48 with gcc 4.6.3 (Gentoo 4.6.3 p1.13, pie-0.5.2) configuration: --enable-gpl --enable-libx264 --enable-encoder=libx264 --disable-stripping --enable-debug --extra-cflags='-O0 -g -ggdb' --enable-libvidstab libavutil 52. 52.100 / 52. 52.100 libavcodec 55. 41.100 / 55. 41.100 libavformat 55. 21.100 / 55. 21.100 libavdevice 55. 5.100 / 55. 5.100 libavfilter 3. 90.102 / 3. 90.102 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100 [mp3 @ 0x1a1e660] Header missing Last message repeated 30 times [mpegts @ 0x19fa1e0] decoding for stream 0 failed [mpegts @ 0x19fa1e0] Could not find codec parameters for stream 0 (Audio: mp2 ([4][0][0][0] / 0x0004), 0 channels, s16p): unspecified frame size Consider increasing the value for the 'analyzeduration' and 'probesize' options udp://225.3.3.3:4321?localaddr=127.0.0.1: Operation not permitted
You need to put "aacparse" between the demuxer and the muxer. We probably should change the caps of tsdemux/mpegtsmux to require that somehow. Maybe by requiring framed=TRUE in mpegtsmux and putting framed=FALSE in tsdemux ?
commit 22b6ec3b2ff929a94b0020d3a3fa3edc7df19e67 Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Apr 2 23:49:37 2014 +0200 mpegtsmux: Require parsed/framed input for most of the supported formats https://bugzilla.gnome.org/show_bug.cgi?id=719519