Some video encoding advice on video bitrate.

We often get users complaining about their video file, which is apparently within specs but failing to playback as flawlessly as expected. So, I'm going to try to illustrate why a file that seems "good" isn't really...

Typically after encoding a video file the most basic check would be to use a tool like Media info to check the file specs:

To illustrate this, see below for the Media Info specs of a file encoded at 30Mbps CBR with Adobe Encoder:

General
Complete name : \\Mac\Home\Downloads\video_Analysis\Brightsign-CBR 30 MAIN 10 LEVEL 5.1-April 18-2017.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (mp42/mp41)
File size : 268 MiB
Duration : 1 min 14 s
Overall bit rate : 30.0 Mb/s
Encoded date : UTC 2017-04-18 14:08:04
Tagged date : UTC 2017-04-18 14:08:08
©TIM : 00:00:00:00
©TSC : 24
©TSZ : 1

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@Main
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 1 min 14 s
Bit rate : 30.0 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.151
Stream size : 268 MiB (100%)
Language : English
Encoded date : UTC 2017-04-18 14:08:04
Tagged date : UTC 2017-04-18 14:08:04
Color range : Full
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

According to Media info, this 30Mbps (ABR) file is within spec and should play fine without any stuttering (at least this is what the user in question thought). It is important to understand that the Media info ABR is calculated over the entire duration of the file which does not help much in assessing whether or not a file reported by Media info with a bitrate of 30Mbps will playback as smoothly as expected on a BrightSign player. 

The XT3, XD3 and 4K players since FW 6.2+ have a media analysis tool built-in that calculates an ABR over 1 second time period (green wiggly line) and over 12 frames (red wiggly line) which is more meaningful for assessing whether or not a file bitrate is within spec for the player. 

As far as the bitrate is concerned, the important data here is the red wiggly line under the "Graph of average bitrates"  ( See below diagram) which is as previously mentioned a calculation of the average bit rate over 12 frames. That red wiggly line should never exceed 80Mbps

However, we can see in the below diagram that this file well exceeds the expected 30Mbps ceiling set at the encoding stage. The blue horizontal line is where the user expected the max bitrate to reach and in reality it exceed the 30Mbps limit many times throughout playback and even reached 90Mbps at some point in that file.

 

30Mbps_Video_Encode.png

In order to avoid peaks at 90Mbps like what can be seen in the above graph, it is often recommended to keep your encoding to 15Mbps with the Adobe Media encoder, which generally prevents peaks over 80Mbps in the encoded file.

However, please note that this does not mean that you always have to limit the bitrate of the encoded video to 15Mbps. Depending on the video file content and the encoder used it is possible to generate a H.265 video which would loop seamlessly with a ABR that peaks at 35Mbps like the below example.

35Mbps.PNG

The file that generated the above graph was encoded using the below ffmpeg command:

/Users/rlucinab/ffmpeg/ffmpeg8/./ffmpeg -probesize 500M -analyzeduration 500M -loglevel verbose -i /Users/rlucinab/ffmpeg/Encode/source/Disney/idle_ApplePro422HQ.mov -pix_fmt yuv420p -an -s:v:0 1920x1080 -preset:v ultrafast -c:v libx265 -x265-params bitrate=35000:vbv-maxrate=35000:vbv-bufsize=9000:bframes=2:open-gop=0:keyint=60 /Users/rlucinab/ffmpeg/Encode/source/Disney/Bitrate__35Mbps_X265_Seamless_Loop_MP4_V4.mp4

 

Question: How do I access this great video analysis tool?

1) In the DWS, locate the file on your storage media and click on the Hammer and spanner icon for that specific file.

Video_Hammer_Spanner.PNG

2) After clicking on the mentioned icon above, you will land on a new page. Whilst on that page add at the end of the url the following "&advanced=true" and press Enter.

secret_URL.PNG

3) Scroll all the way down to the page and you should find an "Analyze media file" section then click on the "GO" button. 

Go_Analyse.PNG

4) Depending on the file size/duration it may take a while for your browser to display the analysis result page.

Analysis.PNG

 

 

 

  

Have more questions? Submit a request

4 Comments

  • 0
    Avatar
    videocompany

    You talk about a "media analysis tool built-in" with XT3, XD3 and 4K players since FW 6.2+.  Can you tell me how to access this? I cannot find it on the Diagnostic Web Server nor as a method for a rovideoPlayer object.

  • 0
    Avatar
    marcel

    Hi Romeo,

    thanks for the great response!

    i could export a clip with your command on ffmpeg without hiccups

    with "bitrate=32000:vbv-maxrate=32000". On the other side i had problems

    to include the audio part into the mp4/mov with ffmpeg so It would be great if you could extend the command with the right seetings for pcm audio.

    Also i would like to emphasize to use ffworks (http://www.ffworks.net/) which

    is based on ffmpeg and is a fully functional GUI and kind of cheap.It seems that a lot of people have problems to work with ffmpeg.

    thanks again!

    marcel

     

     

     

    Edited by marcel
  • 0
    Avatar
    Romeo

    Hi Marcel,

    If you add "-c:a pcm_s16le -ar 48000"  (without the quotation marks) to the previous command instead of the -an option that should work. 

  • 0
    Avatar
    Rick Nelson

    I'd love to use this built-in diagnostic... but I cannot see the VIDEO FILE that I upload to the SD.  It's not actually listed in the file list.  Any way to locate it?  I tried looking at RAW folder view but there's just a lot of POOL folders.

Please sign in to leave a comment.
Can't find what looking for? Try to
Powered by Zendesk