After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 719519 - mpegtsmux: Does not prevent plugging unparsed stream
mpegtsmux: Does not prevent plugging unparsed stream
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal minor
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-28 22:13 UTC by Andrey Utkin
Modified: 2014-04-02 21:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Pipeline diagram rendered (76.07 KB, image/png)
2013-11-28 22:13 UTC, Andrey Utkin
Details

Description Andrey Utkin 2013-11-28 22:13:50 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
Comment 1 Olivier Crête 2013-12-05 00:56:05 UTC
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 ?
Comment 2 Sebastian Dröge (slomo) 2014-04-02 21:50:35 UTC
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