After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728771 - Mp4 files created are not in playable format
Mp4 files created are not in playable format
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.0
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-23 05:12 UTC by Shilpa
Modified: 2014-04-23 07:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Shilpa 2014-04-23 05:12:00 UTC
I tried creating multiple mp4 files with index incremented when file size has reached to 1GB using multifilesink. But  I am not able to play the mp4 files created using multifilesink.

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 max-file-size=1073741824

I tried the same with videotestsrc too, but files created are not in playable state.

Command used

gst-launch-0.10 -e   videotestsrc ! x264enc ! video/x-h264, width=1920, height=1080, framerate=30/1  ! mp4mux name=mp4 ! multifilesink location=%ds.avi next-file=4 max-file-size=1073741824

I have seen people facing similar issue in the GStreamer community. Is there a fix for the same ?
Comment 1 Sebastian Dröge (slomo) 2014-04-23 07:14:30 UTC
multifilesink and mp4mux won't work together this way. MP4 files can't just be cut in the middle, the two resulting files won't be playable on their own... and also mp4mux needs to finalise files after writing before they're actually usable (i.e. after receiving the EOS event mp4mux is going to rewrite headers of the file).


For what you want to do you'll have to create a new mp4mux and filesink for every file part yourself, and before switching from one part to another you need to send an EOS event to the old part and wait until you get the EOS message from the filesink before shutting it down. Re-linking pads during PLAYING requires you to use blocking pad probes on the srcpad in front of the muxer.


Also for all of this it's much easier to use 1.x than 0.10.