[FFmpeg-user] RETRIEVE FRAME RATE WITH DECIMAL VALUE

Hervé ANSELME hervea95 at hotmail.com
Sun Nov 10 21:59:43 EET 2024


Hi,

I apologize, I forgot to mention that my OS is windows 11.

Regards,
HA

________________________________
From: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> on behalf of Ferdi Scholten <ferdi at sttc-nlp.nl>
Sent: Friday, November 8, 2024 01:18
To: ffmpeg-user at ffmpeg.org <ffmpeg-user at ffmpeg.org>
Subject: Re: [FFmpeg-user] RETRIEVE FRAME RATE WITH DECIMAL VALUE



On 07-11-2024 21:16, Hervé ANSELME wrote:
> Hi,
>
> using ffprobe release 6.1, I can retrieve the frame rate of a film with the following command :
>
> ffprobe -v error -select_streams v:0 -show_entries stream=avg_frame_rate -of default=noprint_wrappers=1 "the video.mkv"
>
> which for example, retrieves the frame rate value in fractional form :
>
> 24000/1001
>
> I wonder if there is a way to retrieve the value, in decimal form, rather than fractional form ; for example :
>
> 23,976215
>
> If anybody knows a solution, I'd appreciate.
>
> Thanks in advance for your answers and advices.
>
> Regards,
> HA
On linux this is simple with bash

echo "scale=6; $(ffprobe -v error -select_streams v:0 -show_entries
stream=avg_frame_rate -of default=noprint_wrappers=1:nokey=1 "the
video.mkv")" | bc
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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


More information about the ffmpeg-user mailing list