On Wed, 19 Jan 2022 20:30:32 +0200, Peter van den Houten <peter...@gmail.com>
wrote:

>On 19/01/2022 20:12, Shupert, Jim via ffmpeg-user wrote:
>> I have used mediainfo
>>
>> mediainfo --Inform="Video;%Duration/String3%" $SrcDir/${f%.*}.*  > 
>> $HOME/t.txt
>> trt=$(<$HOME/t.txt)
>>
>This is more accurate for bitrate as it doesn't read headers but does sample 
>reads of the file (some formats do not express bitrate in the headers). It 
>therefore takes a bit longer:
>
>mediainfo --parsespeed=1 filename
>

Just for curiosity I installed mediainfo and tested:

mediainfo --parsespeed=1 2022-01-20_07Testvideo.mp4 | grep Duration
Duration                                 : 43 min 31 s
Duration                                 : 43 min 31 s
Duration                                 : 43 min 31 s

So it creates 3 instances of the duration output...
Have to add  | tail -n 1 to the end to get one item only.

I think the ffprobe solution is what I'd choose, does not require installing any
additional program too.


-- 
Bo Berglund
Developer in Sweden

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to