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

Stefan Kost ensonic at hora-obscura.de
Mon Jul 5 10:02:42 CEST 2010


On 28.06.2010 17:19, paper at gmx.net 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






More information about the gstreamer-devel mailing list