Gstreamer Seek Problem while getting a portion of a .ts file

amithgopal amith at amagi.com
Mon Jan 11 21:46:26 PST 2016


Hi

I am trying to cut out a portion of a video file ( .ts ) and create a new
.ts file having the cut-out portion.
To achieve this, I am using the following pipeline.

*gst-launch-1.0  filesrc location=input.ts ! tsdemux name=d  ! queue
max-size-time=5000000000 ! aacparse ! avdec_aac ! audioconvert ! avenc_aac  
! queue max-size-time=500000000 ! mux. d. ! queue ! avdec_h264   ! x264enc
bitrate=13000 ! queue ! mux. mpegtsmux name=mux ! filesink
location=output.ts*,async=TRUE
 
I have written an application which mimicks the above pipeline.

Initially, I initialise the pipeline to be in the PAUSED state.
Once the async-done message is generated (ie. when all the elements in the
pipeline are linked and it is pre-rolled), I set the pipeline to the PLAYING
state and do the seek from START_TIME to END_TIME in the async-done-message
callback.

But there are 2 problems that I am facing.
1. Even though the output.ts is being created, the output.ts has the
contents of the video starting from 5 seconds before the specified
START_TIME.
2. Eventhough the END_TIME is being specified, the output.ts will have the
complete video ( beyond the END_TIME ).

So the output.ts will have a duration from  (START_TIME - 5 ) seconds till
the end of the video of the input.ts.

Why is this happening?
What am I doing wrong?

Regards,
Amith.






--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-Seek-Problem-while-getting-a-portion-of-a-ts-file-tp4675222.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list