Dynamically change filesink - File duration problem

haecker-felix felix.haecker at posteo.de
Sun Jan 13 20:07:30 UTC 2019


Hello all,

I want to record songs from a internet radio stream (and listen to it at the
same time). Every song should be saved in a separate file. My pipeline looks
like  this
<https://gitlab.gnome.org/haecker-felix/Radio/blob/64db9732472c7abe87f18faf27fc715e9e27c4f9/src/gstreamer_backend.rs#L6>  

Everything works fine so far, except the file duration. The first song gets
saved correctly. But the other songs don't start at 0:00 but at the time
where the old song has stopped.

For example:

*Song 1*
Starts at 0:00
Ends at: 2:00
Duration: 2:00

*Song 2*
Starts at 2:00 (instead of 0:00)
Ends at: 3:00
Duration: 1:00

*Song 3*
Starts at 3:00 (instead of 0:00)
Ends at: 5:00
Duration: 2:00

...

I'm not the first one who have this question ( here
<http://gstreamer-devel.966125.n4.nabble.com/FileSink-time-problem-td4671157.html> 
,  here
<http://gstreamer-devel.966125.n4.nabble.com/Reset-time-after-dynamically-changing-the-filesink-td4658699.html>  
and  here
<http://gstreamer-devel.966125.n4.nabble.com/Resetting-base-time-in-part-of-running-pipeline-td970032.html#a970033> 
) but couldn't find a proper solution.

Can anyone help me? I need a way to reset the timing to 0:00 or something
like this.

Regards
Felix



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list