This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Regarding Video Playback on Z3-DM8168

I am trying to replay recorded video on Z3-DM8168 and normal PC(with Ubuntu) . 

On normal PC(with Ubuntu):

In first case, I had used the following pipeline in the code: gst-launch playbin uri=file:///home/kumaraswamy/Desktop/Demo.mp4 

In second case, I had used the following pipeline in the code: gst-launch filesrc location=/home/kumaraswamy/Desktop/Demo.mp4 ! decodebin ! autovideosink

Usually when I pause and play the pipeline replaying the video, I don't find any issue. 

But for both the cases, when I follow the following sequence I find a problem: 
1) Paused the pipeline in from play state to pause  with the help of following function --> gst_element_set_state (pipeline, GST_STATE_PAUSED); 
2) Checked the current time of pipeline using the following function --> gst_element_query_position (pipelineT, &format, ¤tTime); 
It had displayed the current time as 3 seconds 
3) Tried to jump for some known time using following function --> gst_element_seek_simple (pipelineT,GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT , 30000000000); 
3) When I had used query position, it had displayed 30 seconds (as expected). 
4) I tried to bring the state of pipeline from paused state to play state with the help of following function --> gst_element_set_state (pipeline, GST_STATE_PLAY); 
But the problem which I have found over here is, instead of continuing from the 30th second, it jumped to 403rd second where last frame was recorded. 
"Demo.mp4" is uploaded here --> https://onedrive.live.com/redir?resid=ED1EC3A2CA646550!129&authkey=!AHHLZ148zgvX1GU&ithint=video%2cmp4

I find similar problem on Z3-DM8168.

Please let me know the changes required. 

  • Hello,

    What is the gstreamer version? Are you using EZSDK?

    Kumaraswamy HV said:
    In first case, I had used the following pipeline in the code: gst-launch playbin uri=file:///home/kumaraswamy/Desktop/Demo.mp4 

    What means first case PC or on the board?

    Or these are just two different pipelines?

    you could check this guide about seek event:

    You could check this e2e topic about seek there is a code which perform random seek if I remember right.

    Let me know are these links will help you.

    Provide me more details also.

    If I understand you right, you are performing seek operation but you are moving pipeline to pause state and then back to playing?

    BR

    Margarita

  • First Case is on PC.

    Second case is on PC and also Z3-DM8168.

    Or these are just two different pipelines?

    Yes they are two different pipelines.

    I have checked the links, they will play the video for fast-forward, fast-backward and normal mode on PC.

    But we have a requirement, where we need to use  "gst_element_seek_simple (pipelineT,GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT , jump time in nano seconds); "

    This will help us in seeking the respective frame at the specified time.

    Please let me know the changes required. 

  • Hello,

    So my understanding is that you are using this pipeline on the board:
    gst-launch playbin uri=file:///home/kumaraswamy/Desktop/Demo.mp4

    Right?

    I would recommend you first to try this pipeline on the board is it working correctly. I would recommend you to use playbin2 element.

    Is it working correct when you are performing seek in Playing state on the board? If you haven't try could you try to seek when the pipeline is in PLAYING state?
    Let me know are you observe this problem only when you move pipeline from playing->pause->playing?

    Are you observe this problem only with this video?

    What is the EZSDK version that you are using?

    One more point, when you are using playbin on the same video stream on the PC and on the board the elements which are linked will be different. On the PC for example will be linked software codec etc.

    You could also check this link might be in help:

    www.freedesktop.org/.../GstElement.html

    docs.gstreamer.com/.../viewpagesrc.action

    BR
    Margarita