GNOME Bugzilla – Bug 676296
mpegtsdemux: no bitrate and wrong duration reported for MPEG-TS file
Last modified: 2012-05-18 23:19:59 UTC
Hi, AFAIK for MPEG containers GStreamer can only create estimates of the duration based on the file size and bitrate. The problem is that I have a file here where gst-discoverer doesnt report any bitrate, and get a incorrect duration of 46:36 min. So video player like totem work incorrectly (if you move the slice). Is there any way to fix this? VLC and mplayer seems to not have problems with the file:
> AFAIK for MPEG containers GStreamer can only create estimates of the duration > based on the file size and bitrate I don't think that's how it's done. For local files we should be able to find the exact duration (unless there are unusual things like discontinuities in the middle or so). Please could you make the file available, then we can have a look.
Sorry for the delay, I had internet connection problems: http://dl.dropbox.com/u/55505240/%5BMPEGSys-Mpeg2-AC3%5D.mpeg
Thanks for the file. This issue seems to be fixed in git (0.10 branch anyway): 0$ gst-discoverer-0.10 -v ~/samples/676296-MPEGSys-Mpeg2-AC3.mpeg Analyzing file:///home/tpm/samples/676296-MPEGSys-Mpeg2-AC3.mpeg Done discovering file:///home/tpm/samples/676296-MPEGSys-Mpeg2-AC3.mpeg Topology: container: video/mpegts, systemstream=(boolean)true, packetsize=(int)188 audio: audio/x-ac3 Codec: audio/x-ac3 Additional info: None Language: <unknown> Channels: 2 Sample rate: 44100 Depth: 0 Bitrate: 96000 Max bitrate: 0 Tags: taglist, audio-codec=(string)"AC-3\ \(ATSC\ A/52\)", bitrate=(uint)96000; video: video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, parsed=(boolean)true, width=(int)1280, height=(int)720, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, codec_data=(buffer)000001b35002d015ffffe340000001b5146a00010000, profile=(string)main, level=(string)high-1440, interlaced=(boolean)false Codec: video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, parsed=(boolean)true, width=(int)1280, height=(int)720, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, codec_data=(buffer)000001b35002d015ffffe340000001b5146a00010000, profile=(string)main, level=(string)high-1440, interlaced=(boolean)false Additional info: None Width: 1280 Height: 720 Depth: 0 Frame rate: 30/1 Pixel aspect ratio: 1/1 Interlaced: false Bitrate: 10680168 Max bitrate: 13673520 Tags: taglist, video-codec=(string)"MPEG\ 2\ Video", minimum-bitrate=(uint)13673520, bitrate=(uint)10680168, maximum-bitrate=(uint)13673520; Properties: Duration: 0:03:48.067900185 Seekable: yes Tags: video codec: MPEG 2 Video audio codec: AC-3 (ATSC A/52) bitrate: 96000 minimum bitrate: 13673520 maximum bitrate: 13673520