PTS synchronization issues

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

PTS synchronization issues

tiki_ns
This post was updated on .
If you make MPEG TS from mp4 file using “qtdemux plugin”, generated TS file
is not synchronized (a lot of video frames is skipped during playback because
of incorrect PTS).  The same issue is detected on different mp4 files. To be
sure that issue is not related to used player (VLC) generated file is played on
TV set but with same behavior. I am using the latest versions of gstreamer and needed plugins.

To reproduce this issue you should start gst-launch command: gst-launch -v filesrc location=/usr/local/StarTrek.mp4 ! qtdemux name=demux demux.video_00 ! queue ! mpegtsmux name=mux ! filesink location=/usr/local/out_264_audio_video_2.ts demux.audio_00 ! mux.

After playback of generated .ts file using any player audio/video is interrupted. This issue happens every time and with different source files.
 
The same issue exist for .flv and .mpeg formats:
gst-launch -v filesrc location=/usr/local/video1.flv ! flvdemux name=demux !
{queue ! mpegtsmux name=mux ! filesink location=/ usr/local /flv_test_out.ts }
{ demux. ! queue ! mux. }

gst-launch filesrc location=/usr/local/CentenaryFull.mpg ! ffdemux_mpeg
name=demux demux.video_00 ! queue ! mpegtsmux name=mux ! filesink location=/
usr/local /mpeg_test_out.ts demux.audio_00 ! queue ! mux.

Does anyone have some experiences wit similar usage of gstreamer? Is it possible that issue is related to gst-launch command (maybe I missed something)?
Reply | Threaded
Open this post in threaded view
|

Re: PTS synchronization issues

tiki_ns
According this issue I made some investigation and it seems that ‘’video interrupted problem’’ happens because of repeating PTS values. Somehow PTS are repeated for a few video frames but I still can’t find the root cause. Extricated PTSs are from "mpegtsmux" plugin (mpegtsmux/tsmux/tsmuxstream.c in function tsmux_stream_write_pes_header)

[video]PTS 0x21 0x0 0xd 0x87 0x99
[video]PTS 0x21 0x0 0xd 0xa4 0xeb
[video]PTS 0x21 0x0 0xd 0xc2 0x3f
[video]PTS 0x21 0x0 0xf 0x37 0x8d
[video]PTS 0x21 0x0 0xf 0x37 0x8d
[video]PTS 0x21 0x0 0xf 0x37 0x8d
[video]PTS 0x21 0x0 0xf 0x37 0x8d

[video]PTS 0x21 0x0 0xf 0x54 0xe1
[video]PTS 0x21 0x0 0xf 0x72 0x35
[video]PTS 0x21 0x0 0xf 0x8f 0x87
[video]PTS 0x21 0x0 0xf 0xac 0xdb
[video]PTS 0x21 0x0 0xf 0xca 0x2f
[video]PTS 0x21 0x0 0xf 0xe7 0x83
[video]PTS 0x21 0x0 0x11 0x4 0xd5
[video]PTS 0x21 0x0 0x11 0x22 0x29
.
.
.