Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



Share:
Notifications
Clear all

[Solved] Bug: Bitrate and Framerate are NOT always shown

10 Posts
2 Users
0 Reactions
1,225 Views
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

This topic started as comment on MovieScanner page.

For completeness I pasted the original answer and comment below.

Now my answer-answer:

I guess the problem is, that MovieScanner does NOT check special header tags for Smartphone videos.

They contain different fields for bitrate and fps.

Have a look on a sample output from ffprobe:

D:\ffmpeg\v5.x\bin>ffprobe.exe VID_20220111cut.mp4
ffprobe version 5.0-full_build-www.gyan.dev Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-l
libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --en
enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libi
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20220111cut.mp4':
  Metadata:
    compatible_brands: isommp42
    major_brand     : mp42
    minor_version   : 0
    creation_time   : 2022-01-11T12:41:28.000000Z
    location-eng    : +47.2594+010.1428/
    encoder         : Lavf58.76.100
    com.android.version: 10
    com.android.capture.fps: 60.000000
    location        : +47.2594+010.1428/
  Duration: 00:00:04.00, start: 0.000000, bitrate: 19450 kb/s
  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt470bg/bt470bg/smpte170m, progressive), 1920x1080, 19286 kb/s, SAR 1:1 DAR 16:9, 60.08 fps, 60.08 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2022-01-11T12:41:28.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s (default)
    Metadata:
      creation_time   : 2022-01-11T12:41:28.000000Z
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]

 

In documentation it is written, that MS can show “bitrate” and “framerate”.

As I found out these can be displayed when hovering over resolution value.

Framerate (e.g. 30fps) is only sometimes shown but sometimes not. Tgis might be a bug.

Thank you

Thomas

Reply

Thomas

 
  • Feb 13, 2022 - 4:25 AM - Author: Comment Link

    Hi Thomas,

    well, first of all, framerate and bitrate can only be shown when detectable by ffProbe, and/or supported by the stream.
    For example, embedded pictures obviously do not have a framerate or bitrate. 
    To test this, you can run your video file through ffProbe, or send me an example file (for example with WeTransfer or a link to download the file).

     


   
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2728
 

Hi Thomas,

would you mind trying this:

ffprobe.exe -show_format -show_streams -hide_banner -v quiet -print_format ini VID_20220111cut.mp4

 

I recall looking at this before and seeing inconsistencies or odd values.


   
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  
D:\ffmpeg\v5.x\bin>ffprobe.exe -show_format -show_streams -hide_banner -v quiet -print_format ini VID_20220111cut.mp4

output:

[streams.stream.0]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=High
codec_type=video
codec_tag_string=avc1
codec_tag=0x31637661
width=1920
height=1080
coded_width=1920
coded_height=1080
closed_captions=0
film_grain=0
has_b_frames=0
sample_aspect_ratio=1\:1
display_aspect_ratio=16\:9
pix_fmt=yuvj420p
level=42
color_range=pc
color_space=bt470bg
color_transfer=smpte170m
color_primaries=bt470bg
chroma_location=left
field_order=progressive
refs=1
is_avc=true
nal_length_size=4
id=0x1
r_frame_rate=45000/749
avg_frame_rate=7200000/119837
time_base=1/90000
start_pts=0
start_time=0.000000
duration_ts=359511
duration=3.994567
bit_rate=19286677
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=240
nb_read_frames=N/A
nb_read_packets=N/A
extradata_size=35

[streams.stream.0.disposition]
default=1
dub=0
original=0
comment=0
lyrics=0
karaoke=0
forced=0
hearing_impaired=0
visual_impaired=0
clean_effects=0
attached_pic=0
timed_thumbnails=0
captions=0
descriptions=0
metadata=0
dependent=0
still_image=0

[streams.stream.0.tags]
creation_time=2022-01-11T12\:41\:28.000000Z
language=eng
handler_name=VideoHandle
vendor_id=[0][0][0][0]

[streams.stream.1]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=0
id=0x2
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=192107
duration=4.002229
bit_rate=191795
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=187
nb_read_frames=N/A
nb_read_packets=N/A
extradata_size=2

[streams.stream.1.disposition]
default=1
dub=0
original=0
comment=0
lyrics=0
karaoke=0
forced=0
hearing_impaired=0
visual_impaired=0
clean_effects=0
attached_pic=0
timed_thumbnails=0
captions=0
descriptions=0
metadata=0
dependent=0
still_image=0

[streams.stream.1.tags]
creation_time=2022-01-11T12\:41\:28.000000Z
language=eng
handler_name=SoundHandle
vendor_id=[0][0][0][0]

[format]
filename=VID_20220111cut.mp4
nb_streams=2
nb_programs=0
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV
start_time=0.000000
duration=4.003000
size=9732623
bit_rate=19450658
probe_score=100

[format.tags]
compatible_brands=isommp42
major_brand=mp42
minor_version=0
creation_time=2022-01-11T12\:41\:28.000000Z
location-eng=[DELETED FOR PRIVACY]
encoder=Lavf58.76.100
com.android.version=10
com.android.capture.fps=60.000000
location=[DELETED FOR PRIVACY]

   
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2728
 

So one of the issues I remembered was related to the actual frame rate vs the common frame rates.

So the bitrates reported in your file are:

r_frame_rate=45000/749 = 60.080106809078772 fps

and

avg_frame_rate=7200000/119837 = 60.081610854744361 fps

 

Neither of them really match a common framerate (for example, as listed here). 
But we could of course just call it 60 fps (even though, from what I understand, 60 fps is usually less than 60 fps (2 x 23.98).

So I guess my question is: would rounding the results be acceptable? 

In your example this would be 60fps, and another file with a 23.98 bitrate would be displayed as 24fps (which apparently is not uncommon).

Common (rounded) bitrates would be 24, 25, 30, 48, 50, and 60.
More accurate would be 23.976 (23.98/24), 24, 25, 29.97 (30), 30, 48, 50, 59.94 (60), 60.
(between brackets: alternative ways these are represented)

I'd be inclined to use rounded number. Would that work?


   
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2728
 

Is there any way you could send me a small test recording? 

avg_frame_rate and bit_rate are being read and stored (in code) - so I'd expect it to show when you hover over the resolution.
I know - we don't want it to show that way, but I just want to make sure it is even reading it.

For this I'd recommend to create a separate database (menu: Database -> Create Custom Database), and just add one file.
After closing MovieScanner, copy/email/attach the database so I can look at it.
Optionally you could also check the database yourself, which can be opened with any SQLite database browser (like: SQLite Browser - free) - look at the table "VideoStreams".

Note: When restarting MovieScanner, it will open that custom database again, so you'd want to open your default database again, which can be found here:

Windows
C:\Users\<username>\AppData\Local\MovieScanner\

Windows Portable
drive:\path\to\MovieScanner2exe\

 

 


   
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

If I should send you a sample via Wetransfer I need your email address.

write it with "_at_" instead of @


   
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2728
 

That would work: webmaster_at_tweaking4all.com 😉 


   
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2728
 

Thanks Thoste! Received the video file! 👍 

Framerate and bitrate are show though on my Mac.
I'll test Windows later today - and obviously the requested columns are not showing.


   
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2728
 

Just tested this in Windows (11) ... and yep, I can reproduce the bug ...


   
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2728
 

OK found the issue ... the Windows version is 32 bit application, so the integers are 32 bit as well.
This unlike the Mac and Linux versions, which are 64 bits.

This resulted in the framerate to be read wrong.
I did manage to fix that. Obviously, I'll release a new version once I have addressed your other question. 😊 


   
Share: