how to set the duration of a webm video

2,449 views
Skip to first unread message

John Pompeii

unread,
Dec 16, 2015, 2:29:10 PM12/16/15
to WebM Discussion
Hi,
I'm using ffmpeg to convert various video formats to webm and stream the video to the browser.  The source is a physical file and I'm redirecting ffmpeg's output stream (ultimately) back to the browser.  When I do this, the duration (and frame rate it seems) are not set in the webm output.  If I use ffmpegl to convert to a file instead of an output stream, it sets the duration properly.  Without knowing the duration or actual output file size, the browser will play the video but cannot show the duration, and the scrub bar doesn't work.

Since I know the duration of the video from the source file, is there a way to set the duration at the beginning of the webm output stream (via some metadata header perhaps)?  I'm not knowledgeable on the webm container format, BTW.  Any help/suggestions would be very much appreciated.

thanks,
--john

thomas_j...@hotmail.co.uk

unread,
Feb 29, 2016, 1:44:40 PM2/29/16
to WebM Discussion
Hey John did you manage to get this to work?

Thanks!

dfsta...@gmail.com

unread,
Mar 22, 2017, 5:49:07 PM3/22/17
to WebM Discussion
Hi Thomas, 

let me help you if you didn't get the answer you can force chrome to load your video duration and get the spinner doing the regular loading.
"video but cannot show the duration, and the scrub bar doesn't work" 
take a read on the article, https://www.w3.org/TR/media-frags/ 
just add the #t=[your video total time] to the end of the src video link.

regards, 
Daniel

thomas_j...@hotmail.co.uk

unread,
Mar 23, 2017, 2:08:37 PM3/23/17
to WebM Discussion
Thanks for the update
Reply all
Reply to author
Forward
0 new messages