How to determine webm duration using ffprobe

前端 未结 3 822
[愿得一人]
[愿得一人] 2021-01-11 23:58

My goal is simple , I have several webm files need to be concated, but first I need to determine their durations.

It seems webm file are played as streams, so there

3条回答
  •  情书的邮戳
    2021-01-12 00:41

    I ran into your question while trying to solve mine: Re-encoding vlc-created mpeg2 .ts file results in 20 second file

    If you want to find the duration, use something like this:

    ffmpeg -probesize 90M -analyzeduration 90M -i my_mpeg2_file.webm
    

    I chose 90M since my file was just over 70mb, choose the appropriate size according to your file.


    EDIT:

    Not sure why it is not working for others, I have now tested with multiple .webm files, and am having success getting the duration for all of them. If it fails for you, can you please provide a link to the webm file so I can test? In my case, it worked for the following:

    https://thepaciellogroup.github.io/AT-browser-tests/video/ElephantsDream.webm

    http://dl3.webmfiles.org/big-buck-bunny_trailer.webm

提交回复
热议问题