[FFmpeg-trac] #11584(ffprobe:new): ffprobe returns "n/a" for bitrate in opus audio file
FFmpeg
trac at avcodec.org
Fri May 9 18:20:56 EEST 2025
#11584: ffprobe returns "n/a" for bitrate in opus audio file
-------------------------------------+-------------------------------------
Reporter: jr_clifton | Type:
| enhancement
Status: new | Priority: normal
Component: ffprobe | Version: 6.1.1
Keywords: ffprobe | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
I try to query the bitrate of the opus encoded audio file and it gives me
N/A for the bitrate.
$ ffprobe -v error -show_format -show_streams cath.webm (see the putput
bellow)
I understand that this is probably due to the fact that this info is not
written in the header. Would it be possible for ffprobe to calculate this
data internally? I know it could be done by doing this:
ffprobe -v error -select_streams a:0 -show_entries
packet=size,duration_time -of default=noprint_wrappers=1:nokey=1 cath.webm
And then Sum the sizes, sum the durations, and divide the summed size by
summed duration.
Could this enhancement be implemented in ffprobe?
Output of ffprobe:
[STREAM]
index=0
codec_name=opus
codec_long_name=Opus (Opus Interactive Audio Codec)
profile=unknown
codec_type=audio
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
sample_fmt=fltp
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=0
initial_padding=312
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_pts=-7
start_time=-0.007000
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
extradata_size=19
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
DISPOSITION:non_diegetic=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
DISPOSITION:dependent=0
DISPOSITION:still_image=0
DISPOSITION:multilayer=0
TAG:language=eng
[/STREAM]
[FORMAT]
filename=cath.webm
nb_streams=1
nb_programs=0
nb_stream_groups=0
format_name=matroska,webm
format_long_name=Matroska / WebM
start_time=-0.007000
duration=933.261000
size=14677429
bit_rate=125816
probe_score=100
TAG:encoder=google/video-file
[/FORMAT]
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11584>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list