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 623663 - [typefinding] mpeg-ts file detected as audio/mpeg
[typefinding] mpeg-ts file detected as audio/mpeg
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.28
Other Windows
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-06 09:11 UTC by Albert Costa
Modified: 2010-07-18 10:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
MTS file part 1 (878.91 KB, application/x-compressed-tar)
2010-07-12 12:34 UTC, Albert Costa
Details
MTS file part 2 (878.91 KB, application/octet-stream)
2010-07-12 12:34 UTC, Albert Costa
Details
MTS file part 3 (878.91 KB, application/octet-stream)
2010-07-12 12:35 UTC, Albert Costa
Details
MTS file part 4 (878.91 KB, application/octet-stream)
2010-07-12 12:35 UTC, Albert Costa
Details
MTS file part 5 (485.88 KB, application/octet-stream)
2010-07-12 12:36 UTC, Albert Costa
Details

Description Albert Costa 2010-07-06 09:11:15 UTC
I have a file generated by a video recorder that I play with VLC but not with gstreamer.
This is a mts file, and I try:
gst-launch filesrc=myfile.mts ! decodebin ! ffmpegcolorspace ! directdrawsink -v 

I get the following error:

Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, layer=(int)1
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, layer=(int)1
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0: Failed to parse stream
Additional debug info:
..\..\..\..\..\Source\gst-plugins-ugly\gst\mpegaudioparse\gstmpegaudioparse.c(1541): gst_mp3parse_handle_data (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = NULL
Freeing pipeline ...

Ouput of VLC gives for audio:
Codec A52Audio (aka AC3)(a52), stereo, 48000Hz, 256kb/s



Using the following pipeline works for displaying video:
gst-launch filesrc=myfile.mts ! mpegtsdemux ! decodebin ! ffmpegcolorspace ! directdrawsink -v

See mts file attached
Comment 1 Tim-Philipp Müller 2010-07-06 09:32:35 UTC
There doesn't seem to be an attachement? (Maybe it was too large? I think max. size allowed is 1MB, use head --bytes=999k file.mts > start.mts in that case)
Comment 2 Albert Costa 2010-07-12 12:34:14 UTC
Created attachment 165725 [details]
MTS file part 1
Comment 3 Albert Costa 2010-07-12 12:34:50 UTC
Created attachment 165726 [details]
MTS file part 2
Comment 4 Albert Costa 2010-07-12 12:35:11 UTC
Created attachment 165727 [details]
MTS file part 3
Comment 5 Albert Costa 2010-07-12 12:35:35 UTC
Created attachment 165728 [details]
MTS file part 4
Comment 6 Albert Costa 2010-07-12 12:36:19 UTC
Created attachment 165729 [details]
MTS file part 5

Had to split the file into 5 pieces to allow attachments.
Comment 7 Tim-Philipp Müller 2010-07-12 12:56:21 UTC
Thanks!
Comment 8 Tim-Philipp Müller 2010-07-18 10:44:38 UTC
commit 01ace4a124a8f28d4892b5f3194e00c43b8c12e0
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Sun Jul 18 11:38:19 2010 +0100

    tests: add unit test for mpeg-ts typefinding bug
    
    See #623663.

commit bd0adb11fd11ff1b026ab27f16658ecf117cca42
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Sun Jul 18 11:24:46 2010 +0100

    typefinding: make mpeg-ts typefinder scan more data
    
    We only look for packets with payload, but it appears there may be packets without,
    which makes it harder to find the N packets with payload in a row that we need in
    order to typefind this successfully, so scan some more data than necessary in the
    optimistic scenario. Alternatively we could change IS_MPEGTS_HEADER().
    
    Fixes #623663.