How to reuse pipeline to read different mp4 files. Few questions.

cfd new newcfd at yahoo.com
Tue Aug 8 17:55:37 UTC 2023


 for question 1: 
Steps:1. set pipeline state to null
2. disconnect decodebin ! appsink from filesrc3. set new location to filesrc4. reconnect decodebin ! appsink to filesrc5. set pipeline state to play
    On Monday, August 7, 2023, 08:45:50 a.m. EDT, Антон Шаров via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:  
 
 Hi. I have following  pipeline filesrc ! decodebin ! appsinkBy some condition I need to exctract some frame (cond. for now is exact frame number):(here is code sample on C#)   var fileSrc = readerPipe.GetByName("filesrc");   fileSrc["location"] = videoFile; // new file to read from    var appSink = (AppSink) readerPipe.GetByName("my_appsink");   readerPipe.SetName($"file {videoFile} frame_stepper");   var q = readerPipe.SetState(State.Playing);   var step = 1;   while (step < frameNumber)        {            appSink.PullSample();            step++;        } The questions:   
   - It seems that it doesn’t matter what video file is set, it will always read from first setuped file. How to reset pipeline to read from new file? Should I create new pipeline or can I reset given pipeline so it can read from given file?
   - What is the best and fastest pipeline to read frame-by-frame from file ? Maybe the one above is not goot,  maybe playbin + appsink is better?
​​​​​​​Thanks in advance.    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230808/9fd1bfba/attachment-0001.htm>


More information about the gstreamer-devel mailing list