@an3k yea I agree. Here’s some other “fun things” to think about. I’m sure you know this but others might not so I’ll post some info concerning MO and why it’s the way it is.
VBR=Variable Bit Rate. The file is encoding using the amount of bits needed to match the target quality. Some frames will use less bits while others will use more bits. But all frames/scenes should match a certain quality “standard”. You can’t calculate file size.
CBR=Constant Bit Rate. There is an imposed bitrate set for all frames. You can calculate file size pretty easily since you know the time of the file and the bitrate that will be used. You can pretty much assure this file can be streamed within a certain bandwidth limit. All frames pretty much use the same bitrate. The problem with this is that not all frames need X bitrate and other frames need more than X bitrate to match a certain quality. So some frames will be capped and will be blocky on playback given there isn’t enough bits to convey what’s going on.
SOME OF THE USES OF MEDIA OPTIMIZER:
1: the "raw archiver. The op who rips blu rays and wants to keep the original online. Has some devices that can’t play these raw files due to bitrate or codecs and will get lots of buffering during transcoding (ie bitrate exceeds device limit or VC-1 codec and one CPU core limit of ffmpeg). This person will want to create an mp4/h.264/aac/ac3 type files. At present MO won’t keep more than 2 audio channels so “surround sound is lost” with MO.
-
Person with limited upload speed or with monthly data caps that shares their server. Needs will slightly differ but this person will probably want the highest quality video they can “stuff” into something like 720p/4Mb for remote sharing and will keep/use their original media for in house use. This person could also be a #1 user above as well.
-
Person wants to stream to small screen devices such as smart phone or tablet. Maybe just wants to have a version pre-transcoded that will sync without the wait. This same person could also have the need for #1 and #2 above.
Now here’s the rub. Say your main “objective” was to use the lowest bitrate you could for the quality you expect to have. You try and create a 720p/3Mb version of a file (with current settings) but notice it’s almost good enough but you see “blocking” or artifacts in some scenes. You have to go back and try 720p/4Mb which now looks better to you. So because you have no control over CRF during file creation you settle on 4Mb version.
The problem:
Here is the major problem. Typically when we convert our files externally using my scripts, handbrake,
xMedia recoder, etc we convert/transcode these files using VBR and a target CRF. Variable Bit Rate in a nutshell only uses enough bits to convert the media while meeting the CFR we set. So you can’t calculate what the bitrate will be or the file size (unless doing a two pass encoding). What we can expect is that the media (regardless of bitrate or size) will encode to the quality level we set with the CRF. The level of compression you achieve depends on the source material. If it’s “grainy” looking for example it’s going to take a lot more bits. If it’s an animation it’s most likely going to require far less bits.
Now these VBR files are totally fine when playing back locally or usually when streamed locally. They will usually even play just fine remotely assuming the bandwidth in between is sufficient.
If you now put a limit on bandwidth available (client or server) things change drastically in the Plex world (maybe not as much on other platforms). Here is what I’m getting at. Assume there is only 4Mb pipe available and we are doing a progressive download of an MP4/264/AAC video:
If I put a file with an average 4Mb encode on my webserver and give you a link you will probably be able to play it without much issue. If you watch the same video via Plex it will probably stop/start/stutter a great deal. Any of the frames with higher than 4Mb bitrates won’t get to the client fast enough and will cause stuttering.
The web based version might also stutter once or twice but nothing like the Plex served version. Why?
Plex does not BUFFER content like most other services. Remember when you had limited bandwidth and wanted to watch a YouTube video you would start it then pause it to let the video download a bit before watching it? Plex doesn’t do this.
So the 4Mb version played back via the browser/webserver will be buffering the content. Since the content is variable the browser will be filling the buffer during lower bitrate frames to try and stay ahead of the frame you are viewing. This gives you much more “wiggle room” with videos that have spikes in the bitrate.
Now coming back to the Plex world. Since we don’t have this buffering we can’t do the same. These bitrate spikes cause us much more problems. We have to take a different approach than VBR (variable bit rate) and need to move to CBR (constant bitrate) encoding. This means we will “CAP” the bitrate at 4Mb in this case to assure that no scene uses more than this. Scenes that don’t really need this 4Mb rate will still use it. It’s basically “leveled” at 4Mb.
So without a “buffer” you can’t ride out the higher spikes and need to “chop” or limit the bits which causes blocking or lower quality scenes especially in fast action sequences. Quality of video always suffers using this approach.
All of this is an over simplification but illustrates a few things.
Why do I bring this up? Plex is designing MO to function in the CBR camp and not the VBR which might be perfect for many people. It depends on WHY people are using MO in the first place. Plex is totally ignoring what we MAY WANT.
VBR would be better for those:
a. just trying to be able to pre-encode problem files that contain codecs which force transcoding and only use a single core such as VC-1. Quality is still the biggest concern to this user.
b. those trying to pre-transcode files to limit the amount of monthly bandwidth used. Examples are those on Comcast with a 300Gb monthly limit. VBR is better than CBR in this case because it’s not a “pipe” issue but an overall usage limit you are trying to achieve. You want the bits spread around the file where they are needed for quality and not artificially limited only at the frame level. Quality is most important while “fitting” an average bitrate for the file.
c. those trying to pre-transcode stuff for SYNCing. This is similar to the above situation. You want something with good quality you can transfer to your device in a timely manner but want the bits spread throughout the file where needed. Again you want the highest quality you can get for X overall size file.
d. IF AND ONLY IF we had “normal buffering” in the plex clients then VBR could very well be better for those with true “pipe” limits. The VBR encode will have many frames using much less than the average so the buffer builds. Those frames that go above the average will cause the buffer to get smaller. As long as there is some bits in the buffer then client will play without stuttering or pausing.
CBR is better when:
a. you have a fixed pipe available that absolutely can’t be exceeded at any time AND there is no concept of client buffering to help ride out the spikes in bitrate.
So while many of us may prefer to pre-transcode using VBR we are stuck in CBR land with MO at present. We get degraded quality because of this.
I go back to the OP post and request we get the configurations PER JOB (not global) to setup the transcode based on OUR SPECIFIC NEEDS.
Carlo