Incorrect media duration when attempting to stream a MPEG-TS media from URI
I am attempting to stream media from a URI, specifically a MPEG-TS format type file (with .ts extension) in GUI application. The video seems to playback faster than expected (almost like a fast forward 2x). I ran the gst-discoverer-1.0 tool to retrieve information of the media file as read by the Gstreamer v1.18.5. I have pasted output below. I noticed that in the Properties, duration is around 5mins 46secs, where as the file media duration is about 15mins, as depicted by the output from ffmpeg tool (and obviously the file media when played back on a commercial media player, such as VLC). The output also indicates that there is a Gap detected by the mpegtspacketizer from the gst-bad-plugin. How do I solve this problem?
See the entire output pasted from gst-discoverer-1.0 tool here:
WARN mpegtspacketizer mpegtspacketizer.c:1888:_set_current_group: GAP detected. diff 0:00:01.039988888
Done discovering http://localhost:8889/Test_4.ts
Properties:
Duration: 0:05:46.709459444
Seekable: yes
Live: no
Tags:
audio codec: MPEG-4 AAC
video codec: H.264
container: video/mpegts, systemstream=(boolean)true, packetsize=(int)188
audio: audio/mpeg, framed=(boolean)true, mpegversion=(int)4, level=(string)2, base-profile=(string)lc, profile=(string)lc, rate=(int)44100, channels=(int)1, stream-format=(string)adts
Tags:
audio codec: MPEG-4 AAC
Codec:
audio/mpeg, framed=(boolean)true, mpegversion=(int)4, level=(string)2, base-profile=(string)lc, profile=(string)lc, rate=(int)44100, channels=(int)1, stream-format=(string)adts
Stream ID: aebffa33bac2d8fa09151f41d3e003c39b8082d07d54f00d44ccfa8a95e5cc38:1/00000101
Language: <unknown>
Channels: 1 (unknown layout)
Sample rate: 44100
Depth: 32
Bitrate: 0
Max bitrate: 0
video: video/x-h264, stream-format=(string)avc, width=(int)704, height=(int)576, framerate=(fraction)0/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)au, profile=(string)main, level=(string)3, codec_data=(buffer)014d001effe10009674d001e9da82c049901000468ee3c80
Tags:
video codec: H.264
Codec:
video/x-h264, stream-format=(string)avc, width=(int)704, height=(int)576, framerate=(fraction)0/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)au, profile=(string)main, level=(string)3, codec_data=(buffer)014d001effe10009674d001e9da82c049901000468ee3c80
Stream ID: aebffa33bac2d8fa09151f41d3e003c39b8082d07d54f00d44ccfa8a95e5cc38:1/00000100
Width: 704
Height: 576
Depth: 24
Frame rate: 0/1
Pixel aspect ratio: 1/1
Interlaced: false
Bitrate: 0
Max bitrate: 0
See the entire output pasted from ffmpeg tool here:
Input #0, mpegts, from 'http://localhost:8889/Test_4.ts':
Duration: 00:15:00.07, start: 1.000000, bitrate: 1800 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 704x576, 25 fps, 25 tbr, 90k tbn
Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, mono, fltp, 71 kb/s