mp4 video length and fragment-duration

Lambert Veerman lv at bigbrother.nl
Mon Dec 4 11:29:29 UTC 2017


Hi,

I have a problem understanding the mp4mux in combination with the fragment-duration option.

I have a recorder application, recording live streams to mkv files, starting a new file every hour. For a test this must be changed to mp4. There is a constraint that we want provide streaming access to an open recording, a file not yet finished.

When I take the following pipeline and change the filesrc every hour (sending the h264parse, mp4mux, filesink an eos and changing the location property):

Rtscpsrc- rtphh264depay  - h264parse - mp4mux – filesink

Everything works fine. Also tested using the existing splitmuxsink, same behaviour.

However when I set the fragment-duration option in the mp4mux (to support streaming), my file duration/length meta-data is incorrect. I tried both my existing setup and the splitmuxsink, but the problem is that that file length is set to the stream running time. An example:

Fileof1minute_1.mp4 -> video length is 1 minute
Fileof1minute_2.mp4 -> video length is 2 minutes (the actual video is 1 minute long, however the timeline incorrect)
Fileof1minute_3.mp4 -> video length is 3 minutes (the actual video is 1 minute long, however the timeline incorrect)

As a hack/workaround I can flush the whole pipeline, either by setting the state of the pipeline to ready, or by sending a flush start, flush stop event.

My question is, am I doing something wrong, what is happening here and is there an elegant fix?


Met vriendelijke groet, Sincerely,

Lambert Veerman
R&D


[cid:imagedd22bc.PNG at f6ed3df4.47accd57] lv at bigbrother.nl<mailto:lv at bigbrother.nl>


[cid:imageca5f13.PNG at 520653fa.48b2b98b]<http://www.linkedin.com/company/1241845?trk=tyah>

[cid:image797e6a.PNG at 639af330.42aaea0b] [cid:image87fb2a.PNG at d5356427.49bd7d2b] <http://www.bigbrother.nl>
[cid:image162d09.PNG at cc6cb37c.4f965f69]<http://www.bigbrother-security.be>

Disclaimer: This e-mail is intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any
person other than the addressee(s). If you have received this email by error then please delete it and notify the sender by return e-mail.
In case of doubt about correctness or completeness of this e-mail, please contact the sender. BigBrother BV dismisses any and every
liability resulting from any electronic transmission.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171204/f06102df/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagedd22bc.PNG
Type: image/png
Size: 508 bytes
Desc: imagedd22bc.PNG
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171204/f06102df/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imageca5f13.PNG
Type: image/png
Size: 2338 bytes
Desc: imageca5f13.PNG
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171204/f06102df/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image797e6a.PNG
Type: image/png
Size: 3758 bytes
Desc: image797e6a.PNG
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171204/f06102df/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image87fb2a.PNG
Type: image/png
Size: 2346 bytes
Desc: image87fb2a.PNG
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171204/f06102df/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image162d09.PNG
Type: image/png
Size: 2113 bytes
Desc: image162d09.PNG
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171204/f06102df/attachment-0009.png>


More information about the gstreamer-devel mailing list