Regarding multifilesink (creation of multiple files)
This post was updated on .
I would like to create a new mp4 file with index incremented when file size has reached to 1GB. Based on some research found multifilesink can be used to perform this. But I am not able to play the mp4 files created using multifilesink.
On Mi, 2014-04-02 at 04:04 -0700, Shilpa Chandrappa wrote:
> I would like to create a new mp4 file with index incremented when file size
> has reached to 1GB. Based on some research found multifilesink can be used
> to perform this. But I am not able to play the mp4 files created using
> Command used
> gst-launch-0.10 -e rtspsrc location=rtsp://XYZ name=rtsp ! queue !
> rtph264depay ! video/x-h264, width=1920, height=1080, framerate=30/1 !
> mp4mux name=mp4 ! multifilesink location=%ds.mp4 next-file=4
All the MP4 files would be incomplete and not playable standalone if you
do it that way. A MP4 file needs to be finalised after all content is
written, especially every single frame's byte offset needs to be added
to the headers of the file.
> Is there any way I can split mp4 files based on max-file size reached ? Need
> your inputs on how to achieve this.
You'll have to use a pipeline where the MP4 muxer and filesink are
switched dynamically every 1GB, and before destroying the old MP4 muxer
and filesink you would need to send an EOS event to the muxer to
finalise the MP4 file.
To safely relink the pipeline during playback you'll have to use
blocking pad probes on the srcpad upstream of the muxer, and from the
probe callback do the relinking.
My requirement is same as yours. Can it be possible for you share your code. Because i am also facing the same problem with multifilesink creating unlimited files with no data. i am using gstreamer-0.10
On Thu, Sep 10, 2015 at 5:24 AM, gagankumarnigam
<[hidden email]> wrote:
> Hi shilpa,
> My requirement is same as yours. Can it be possible for you share your code.
> Because i am also facing the same problem with multifilesink creating
> unlimited files with no data. i am using gstreamer-0.10
Simplest option would be to update the gstreamer to 1.5.90 and use splitmuxsink.
but i am forced to work with version -0.10 bcoz rhel-6.5 by default having the same version of gstreamer.
though i tried to upgrade the gstremer version on rhel-6.5 but it put me on toes without any succes.
Can u plz tell me how to upgrade the gstreamer version on rhel-6.5 (with rpms or tarfiles)