[FFmpeg-user] How to get TBR in FFProbe JSON

Ramit Bhalla ramitbhalla at gmail.com
Sat Jun 28 15:12:48 CEST 2014


I'm sorry, I meant to say the Actual framerate is given by TBR (not TBC).
In the above example the standard output shows:
Stream #0:11[0x581]: Video: h264 (Constrained Baseline) ([27][0][0][0] /
0x001B), yuv420p, 320x180, 7.50 fps, 5 tbr,
 90k tbn, 14.99 tbc

So that shows:
FPS -> 7.5
TBR -> 5
TBC -> 14.99

When I use the JSON output I see
"index": 11,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "Constrained Baseline",
"codec_type": "video",
"codec_time_base": "1001/15000",
"codec_tag_string": "[27][0][0][0]",
"codec_tag": "0x001b",
"width": 320,
"height": 180,
"has_b_frames": 0,
"sample_aspect_ratio": "0:1",
"display_aspect_ratio": "0:1",
"pix_fmt": "yuv420p",
"level": 12,
"id": "0x581",
"r_frame_rate": "5000/1001",
"avg_frame_rate": "15/2",
"time_base": "1/90000",
"start_pts": 7298654101,
"start_time": "81096.156678",
"duration_ts": 2462460,
"duration": "27.360667",

This shows:
r_frame_rate -> 4.99
avg_frame_rate -> 7.5

The correct frame rate for this video is 5. So I'm lost now how do get this
number 5 from the JSON output?

i.e. The standard version of the output gives TBR but how do I get the TBR
in JSON?



On Sat, Jun 28, 2014 at 9:03 AM, Simon Thelen <ffmpeg-user at c-14.de> wrote:

> On 27/06/14 at 13:18, Ramit Bhalla wrote:
> > When using ffprobe, it prints a set of video parameters on the console
> > (tbr, tbn, tbc, and fps).
> >
> > E.g.
> >     Stream #0:11[0x581]: Video: h264 (Constrained Baseline)
> ([27][0][0][0]
> > / 0x001B), yuv420p, 320x180, 7.50 fps, 5 tbr,
> >  90k tbn, 14.99 tbc
> >
> > However when one uses ffprobe in JSON output you only get 2 parameters
> > r_frame_rate and avg_frame_rate which I understand correspond to fps and
> > tbc respectively.
> The tbc is the codec_time_base parameter.
> >
> > in my tests I've found the "actual" framerate is given by TBC. how can I
> > get this using FFprobe in JSON output?
> The tbc usually isn't the "actual" framerate. It's just the time value
> that the framerate is calculated from.
> If you want the framerate you'll want the r_frame_rate and/or the
> avg_frame_rate.
>
>
> --
> Simon Thelen
> BOFH excuse #300:
>
> Digital Manipulator exceeding velocity parameters
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list