[gst-devel] how to make a files playable...

Stefan Kost ensonic at hora-obscura.de
Mon Jul 5 16:47:55 CEST 2010


On 05.07.2010 12:47, Konstantin Kauz wrote:
>>> gst-launch v4l2src device=/dev/video0 !
>>> video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! x264enc
>>> key-int-max=4  ! mp4mux ! multifilesink location=test%d.mov
>>> next-file=key-frame
>>>
>>> How can i make sure, every file have meta data written and the files are
>>> playable? I tried other encoder like matroska, avi etc. too. 
>>>     
>>>       
>> ---------------------------------------------------------------------
>>
>> Either pass the --eos-on-shutdown option to gst-launch, or use something
>> like v4l2src num-buffers=500 to make sure the pipeline shuts down
>> properly itself after a while.
>>
>> Cheers
>>  -Tim
>>
>> ---------------------------------------------------------------------
>>
>> Thanks Tim,
>>
>> i want to record video from my webcam sequential,  without to stop the pipeline and make every mp4 file playable on the fly.
>> This sink produce what i want, keframe every 4 sec etc, but not the metadata.
>> You hint is well for pipeline like:
>>
>> gst-launch -e --eos-on-shutdown v4l2src device=/dev/video0 num-buffers=5000 !   x264enc key-int-max=4  ! mp4mux  !  filesink location=test.mov
>>  
>> changed the multifilesink to filesink. How to configurate multifilesink or the pipeline to handle every file like a full mp4?
>>
>> I need also ftyp + moov + mdat fragments...
>>
>>   
>>     
> You need to write an application for that. It could use two muxer !
> filesink behind a output-selector. You need to switch the branches
> depending on your criteria (e.g. every n-sec and before new keyframe).
> You will need to manage the states of the branches (switch the branch
> that is inactive to NULL, change the filename and bring it back to PAUSED.
>
> Stefan
> _________________________________________________________
>
> Thanks...
>
> Can you provide more details, please?
>
> - How can i determine i-frame or not?
>   
check the GstBufferFlags (delta-unit)
> - How it is possible to implement a output-selector and how to deal with data losing, should be a mux set up in spacial state ?
> - have i use a tee element to split the steam?
>   
output-selector is like a tee with only one branch active at a time.
> Maybe a way of pseudo code...
>   

I am sorry, I can't write that app for you. You are not the first one
asking for that scheme. Look back in the archives and try to collaborate
with others on that.

Stefan

> Regards,
> Kony
>
>
>   





More information about the gstreamer-devel mailing list