Log in

View Full Version : Typical size for Blu-Ray re-encoded to 960x540?


Sgt_Strider
15th December 2011, 11:25
I'm sure you guys are aware that Blu-Ray rips are huge. I basically want to reduce resolution by half so that I can watch it on my iPhone 4S. Let's say that a typical Blu-Ray rip is 35GB with multichannel audio. If I were to re-encode it to 960x540 with excellent quality settings with handbrake and either 5.1 multichannel AAC or downmix it to stereo AAC or MP3, what should I expect for my file size? Are there any calculators out there to help me figure this out as well?

Thanks!

Bloax
15th December 2011, 11:41
You could try encoding the first 600-1200 frames, and divide the size by duration in seconds.

Oughta give you a pretty good idea about how much the whole movie would be, though there's a good deal of variance.

Sgt_Strider
15th December 2011, 13:30
You could try encoding the first 600-1200 frames, and divide the size by duration in seconds.

Oughta give you a pretty good idea about how much the whole movie would be, though there's a good deal of variance.

I'm kind of hoping for something less tedious.

nm
15th December 2011, 14:00
Why do you need to know the file size? Encode with CRF 18 and worry less. :)

The average video bitrate will probably end up between 1 Mbps and 3 Mbps, depending on the source complexity.

amtm
15th December 2011, 20:21
There is no typical size. It's source dependent.

Ghitulescu
15th December 2011, 20:36
If I were to re-encode it to 960x540 with excellent quality settings ....

With excellent quality the size is quite big, with normal quality the size is much lower.

If you don't understand the answer please revise the question :)

nibus
15th December 2011, 22:22
On average CRF18 will land about 1.5-2gb for most films at 540p.

amtm
16th December 2011, 00:54
On average CRF18 will land about 1.5-2gb for most films at 540p.

Assuming what source characteristics?

nibus
16th December 2011, 03:28
Assuming what source characteristics?

Most live action material

Sgt_Strider
16th December 2011, 12:05
Why do you need to know the file size? Encode with CRF 18 and worry less. :)

The average video bitrate will probably end up between 1 Mbps and 3 Mbps, depending on the source complexity.

What is CRF 18?

I want to know so that I can determine how many movies will fit into my iPhone 4. I've already gave a brief statement about my source information. I'm looking for an educated guess and Doom 9 is the best place to ask.

Sgt_Strider
16th December 2011, 12:06
Most live action material

Can you explain with some details on how you arrive at that conclusion?

Sgt_Strider
16th December 2011, 12:15
Also where an I read up on CRF and what the numbers mean? Is this the same as VBR?

Are there any tools or rules to help me determine the optimal video bitrate?

nm
16th December 2011, 12:22
What is CRF 18?

In HandBrake: "Constant Quality" at RF 18.

Read more about CRF here: http://mewiki.project357.com/wiki/X264_Settings#crf

Are there any tools or rules to help me determine the optimal video bitrate?

CRF encoding is that tool.

I want to know so that I can determine how many movies will fit into my iPhone 4. I've already gave a brief statement about my source information.

When using CRF, bitrate depends a lot on the video content. You didn't say if the movies are animation or live action, fast-paced or talking heads, grainy or clean etc.
If you are encoding clean cel animation, it may be possible to fit many times more high quality videos to the phone than when encoding grainy adventure movies without denoising.

Groucho2004
16th December 2011, 12:31
Since you mentioned that you intend to use Handbrake:
It only took me 1 minute to find this:
https://trac.handbrake.fr/wiki
and
https://trac.handbrake.fr/wiki/ConstantQuality

It has answers to pretty much all your questions. But it's so much easier to just dump a question into a forum and let others do the work, isn't it?

nibus
17th December 2011, 01:04
Can you explain with some details on how you arrive at that conclusion?

Also where an I read up on CRF and what the numbers mean? Is this the same as VBR?

Are there any tools or rules to help me determine the optimal video bitrate?

Just my experience from encoding 30-40 of my Blurays to qHD (960x540), most of them being live action.

CRF is specifying a quality, not a bitrate. It is nice because to an extent it takes the guessing out of encoding. The lower the number, the higher the quality. CRF18 is viewed as nearly transparent to a lot of people. However I usually go lower - 17 on average, but sometimes as low as 15 for CGI.

Sgt_Strider
17th December 2011, 08:57
Just my experience from encoding 30-40 of my Blurays to qHD (960x540), most of them being live action.

CRF is specifying a quality, not a bitrate. It is nice because to an extent it takes the guessing out of encoding. The lower the number, the higher the quality. CRF18 is viewed as nearly transparent to a lot of people. However I usually go lower - 17 on average, but sometimes as low as 15 for CGI.

Thanks for the information. That's pretty much what I gather from my research.

Was there any testing done to determine CRF 18 is the minimum for good quality/size ratio? Did you notice a big difference with CRF 17? Won't that mean even bigger file size? What kind of file sizes are you getting with your CRF 17 encodes? Can you give me some examples?

Sgt_Strider
17th December 2011, 08:58
In HandBrake: "Constant Quality" at RF 18.

Read more about CRF here: http://mewiki.project357.com/wiki/X264_Settings#crf



CRF encoding is that tool.



When using CRF, bitrate depends a lot on the video content. You didn't say if the movies are animation or live action, fast-paced or talking heads, grainy or clean etc.
If you are encoding clean cel animation, it may be possible to fit many times more high quality videos to the phone than when encoding grainy adventure movies without denoising.

I'm looking for a general setting as my library consist of various genres. The CRF quality settings only apply to video right? For audio won't I have to use something else?

nibus
17th December 2011, 10:07
Thanks for the information. That's pretty much what I gather from my research.

Was there any testing done to determine CRF 18 is the minimum for good quality/size ratio? Did you notice a big difference with CRF 17? Won't that mean even bigger file size? What kind of file sizes are you getting with your CRF 17 encodes? Can you give me some examples?

I don't know as far as tests go, but it does seem to be a consensus that I've heard.

The difference between 17 and 18 is mostly in the small details like grain, fades, and color gradients. The size difference probably averages somewhere around 15-30% larger for CRF17 though it's going to be different for every source.

It also depends on your x264 settings, for example a preset --placebo encode will usually take less bitrate then a faster preset, though with substantially longer encoding time. Also --no-dct-decimation and a raised --psy-rd will also increase bitrate. So with these settings in mind, it's possible to have a CRF18 encode that would be larger than a CRF17 encode.

I'm looking for a general setting as my library consist of various genres. The CRF quality settings only apply to video right? For audio won't I have to use something else?

On 540p for a "one size fits all" type of setting I would recommend:

x264.exe --preset slower --crf 18.0 --deblock -2:-2 --output "output" "input"

You can also bump up the b-frames to increase compressibility:

x264.exe --preset slower --crf 18.0 --bframes 8 --deblock -2:-2 --output "output" "input"

You can also further tweak each encode for it's source by using tunings:

Live action:
x264.exe --preset slower --tune film --crf 18.0 --deblock -2:-2 --output "output" "input"

Animation:
x264.exe --preset slower --tune animation --crf 18.0 --deblock -2:-2 --output "output" "input"

Sources with a lot of grain (usually raises bitrate):
x264.exe --tune grain --crf 18.0 --deblock -2:-2 --output "output" "input"

The more b-frames and reference frames the slower it will encode. So try these settings and adjust them to suit your taste and processor speed. Raising deblock (to say 1:1) will give you encodes a softer look but will compress better.

Try running some test encodes on various sources and see if you can tell a difference between 17 and 18 and if so, if 17 is worth the size increase.

For audio, it depends on what you will be playing it on. For maximum compression go with AAC; for maximum compatibility go with Mp3.

nm
17th December 2011, 10:14
Was there any testing done to determine CRF 18 is the minimum for good quality/size ratio?

CRF 18 usually gives transparent quality, which means that even an expert has hard time to see the difference to the original when playing the video back at normal speed. With same settings, CRF 17 increases bitrate by 13 %. The quality difference is probably only visible when switching between frozen frames. Definitely not on an iPhone display at normal playback speed. I think CRF 20 to 22 would be fine if you only play the videos on your phone's display.

I'm looking for a general setting as my library consist of various genres.

Yep. CRF is the general setting for that case.

The CRF quality settings only apply to video right? For audio won't I have to use something else?

Many audio encoders have a VBR encoding mode with a setting for quality level. HandBrake's user interface only seems to support bitrate-based audio encoding though.

Sgt_Strider
17th December 2011, 10:20
I don't know as far as tests go, but it does seem to be a consensus that I've heard.

The difference between 17 and 18 is mostly in the small details like grain, fades, and color gradients. The size difference probably averages somewhere around 15-30% larger for CRF17 though it's going to be different for every source.

It also depends on your x264 settings, for example a preset --placebo encode will usually take less bitrate then a faster preset, though with substantially longer encoding time. Also --no-dct-decimation and a raised --psy-rd will also increase bitrate. So with these settings in mind, it's possible to have a CRF18 encode that would be larger than a CRF17 encode.



On 540p for a "one size fits all" type of setting I would recommend:

x264.exe --preset slower --crf 18.0 --deblock -2:-2 --output "output" "input"

You can also bump up the b-frames to increase compressibility:

x264.exe --preset slower --crf 18.0 --bframes 8 --deblock -2:-2 --output "output" "input"

You can also further tweak each encode for it's source by using tunings:

Live action:
x264.exe --preset slower --tune film --crf 18.0 --deblock -2:-2 --output "output" "input"

Animation:
x264.exe --preset slower --tune animation --crf 18.0 --deblock -2:-2 --output "output" "input"

Sources with a lot of grain (usually raises bitrate):
x264.exe --tune grain --crf 18.0 --deblock -2:-2 --output "output" "input"

The more b-frames and reference frames the slower it will encode. So try these settings and adjust them to suit your taste and processor speed. Raising deblock (to say 1:1) will give you encodes a softer look but will compress better.

Try running some test encodes on various sources and see if you can tell a difference between 17 and 18 and if so, if 17 is worth the size increase.

For audio, it depends on what you will be playing it on. For maximum compression go with AAC; for maximum compatibility go with Mp3.

Thanks for the information. I'm not worried about encoding time. I plan on letting the computer run while I'm at work and when I'm asleep. Besides, I have a Core i5 750 clocked at about 4ghz so it shouldn't be too bad. I'm striving to achieve a good balance between quality and file size. Encoding time is the least of my concerns.

If possible, can you give me some examples of movies that you've encoded with either CRF 17 and or 18 and what their sizes are? I'm just trying to get a rough general idea in my head.

Sgt_Strider
17th December 2011, 10:24
CRF 18 usually gives transparent quality, which means that even an expert has hard time to see the difference to the original when playing the video back at normal speed. With same settings, CRF 17 increases bitrate by 13 %. The quality difference is probably only visible when switching between frozen frames. Definitely not on an iPhone display at normal playback speed. I think CRF 20 to 22 would be fine if you only play the videos on your phone's display.

I'm planning on playing the videos on an iPad 2 and a future Playstation Vita which also have a similar resolution screen. I'm not concerned in the quality of stills when the movie is paused. I just don't want to see soft and blocky movies when it's in motion.

In terms of bitrate and file size, what's the difference between CRF 18-20?

Again, may I ask where and how it was determined that CRF18 is where full transparency is at? Was there a series of tests that were done to conclude that was the minimum to achieve that goal?



Yep. CRF is the general setting for that case.



Many audio encoders have a VBR encoding mode with a setting for quality level. HandBrake's user interface only seems to support bitrate-based audio encoding though.

Do you have any suggestions on something other than Handbrake then? I only mentioned it because there are a lot of guides out there that uses Handbrake.

Furthermore, since I'll be using the iPhone 4 and iPad 2, it's not likely that I'll get much benefit out of multichannel audio. Should I still encode a multichannel AAC or MP3 file and let the software players downmix it or I should downmix it into a stereo file myself?

nm
17th December 2011, 11:09
I'm planning on playing the videos on an iPad 2 and a future Playstation Vita which also have a similar resolution screen. I'm not concerned in the quality of stills when the movie is paused. I just don't want to see soft and blocky movies when it's in motion.

You'll start seeing softness and blocks at CRF 23 and higher. Just encode a few movies or shorter clips at various CRF settings and see what they look like.

In terms of bitrate and file size, what's the difference between CRF 18-20?

About 24 %.

Again, may I ask where and how it was determined that CRF18 is where full transparency is at? Was there a series of tests that were done to conclude that was the minimum to achieve that goal?

No. It's just a value that many people on forums such as Doom9 seem to end up when testing things themselves. But it's highly personal and depends on how good the viewer is at spotting differences. While CRF 18 is usually transparent for video enthusiasts, I wouldn't be surprised if an uneducated viewer considered CRF 22 transparent.

Do you have any suggestions on something other than Handbrake then? I only mentioned it because there are a lot of guides out there that uses Handbrake.

Well, HandBrake is a nice and simple tool. I don't really know which GUI would suit you better. Maybe MeGUI or StaxRip.

You'll need to learn a lot about command line tools and especially AviSynth if you want to do advanced things better.

I wouldn't be overly concerned about audio unless you use high quality headphones. HandBrake's AAC encoder (FAAC) is pretty bad though. LAME MP3 at 192 kbps would be better if your devices support it. Don't waste bits to multichannel audio when you only listen to a stereo downmix anyway.

Sgt_Strider
17th December 2011, 11:32
You'll start seeing softness and blocks at CRF 23 and higher. Just encode a few movies or shorter clips at various CRF settings and see what they look like.



About 24 %.



No. It's just a value that many people on forums such as Doom9 seem to end up when testing things themselves. But it's highly personal and depends on how good the viewer is at spotting differences. While CRF 18 is usually transparent for video enthusiasts, I wouldn't be surprised if an uneducated viewer considered CRF 22 transparent.



Well, HandBrake is a nice and simple tool. I don't really know which GUI would suit you better. Maybe MeGUI or StaxRip.

You'll need to learn a lot about command line tools and especially AviSynth if you want to do advanced things better.

I wouldn't be overly concerned about audio unless you use high quality headphones. HandBrake's AAC encoder (FAAC) is pretty bad though. LAME MP3 at 192 kbps would be better if your devices support it. Don't waste bits to multichannel audio when you only listen to a stereo downmix anyway.

I do have a pair high quality Shure earphones. Are you saying that I should downmix the track then? If so, is there something that I need to be aware of when downmixing a multichannel audio file?

nm
17th December 2011, 13:28
I do have a pair high quality Shure earphones. Are you saying that I should downmix the track then?

Yes. You might want to use a high quality lossless track or at least DTS core as a source. And make sure that you are using a good AAC encoder or Lame at a high bitrate, if MP3 works.

Use eac3to for decoding and downmixing. It can also encode audio with Nero AAC Encoder (which is ok) and remux the movie to MKV, which is easier to handle with FFmpegSource in AviSynth.

Sgt_Strider
17th December 2011, 19:18
Yes. You might want to use a high quality lossless track or at least DTS core as a source. And make sure that you are using a good AAC encoder or Lame at a high bitrate, if MP3 works.

Use eac3to for decoding and downmixing. It can also encode audio with Nero AAC Encoder (which is ok) and remux the movie to MKV, which is easier to handle with FFmpegSource in AviSynth.

What's the difference between downmixing the track myself versus using a multichannel track, but let the software player downmix it for me? I'm afraid that by downmixing it myself, the quality won't be as good as letting the software player do it for me.

nm
17th December 2011, 19:32
What's the difference between downmixing the track myself versus using a multichannel track, but let the software player downmix it for me?

The difference is bits wasted on keeping information that you don't need. If you want high quality audio, multichannel AAC needs almost 200 kbps higher bitrate than stereo (128 kbps is probably enough for that).

I'm afraid that by downmixing it myself, the quality won't be as good as letting the software player do it for me.

The question is, do you trust the player more than eac3to. I certainly wouldn't.

Sgt_Strider
18th December 2011, 00:28
The difference is bits wasted on keeping information that you don't need. If you want high quality audio, multichannel AAC needs almost 200 kbps higher bitrate than stereo (128 kbps is probably enough for that).



The question is, do you trust the player more than eac3to. I certainly wouldn't.

Good point and I wouldn't use 128kbit/sec. I'm probably going to use MP3 due to its wide hardware support. I think LAME 3.97's 192kbit/sec is enough to encode a transparent MP3 file.

nm
18th December 2011, 04:42
I think AAC audio is more widely supported in MP4 files. I don't even know if MP3 audio tracks work within MP4 files on iDevices. It's not listed on Apple's page as a supported combination.

Sgt_Strider
18th December 2011, 10:45
I think AAC audio is more widely supported in MP4 files. I don't even know if MP3 audio tracks work within MP4 files on iDevices. It's not listed on Apple's page as a supported combination.

I'm planning to use a third party software on iOS.

Btw, how do I extract and add the subtitles to the MKV file. I don't think Blu-Ray support SRT files.

sneaker_ger
18th December 2011, 11:14
First you should figure out what your player needs. They usually support at least one of the following subtitle formats in mkv: srt, sub, pgs, ass and often external srt files with the same file name as the video file. PGS is the subtitle format used by Blu-Rays, sub the DVD format.

nm
18th December 2011, 13:05
I'm planning to use a third party software on iOS.

And does Playstation Vita play MP3 audio tracks?

Sgt_Strider
19th December 2011, 00:56
First you should figure out what your player needs. They usually support at least one of the following subtitle formats in mkv: srt, sub, pgs, ass and often external srt files with the same file name as the video file. PGS is the subtitle format used by Blu-Rays, sub the DVD format.

DVD's subtitle format is SUB?

Then what about SRT? I've just learned that the player only support SRT. Will the conversion from PGS to SRT be fully transparent?

Sgt_Strider
19th December 2011, 00:59
And does Playstation Vita play MP3 audio tracks?

Yea it will, but I don't have one to test since it haven't launched in North America yet.

nm
19th December 2011, 01:55
Do you have a source of information? I don't think the built-in media player supports MP3 in MP4 in any PSP model.

DVD's subtitle format is SUB?

It's SPU, but VobSub is very similar (mostly a dump of SPU data).

Then what about SRT? I've just learned that the player only support SRT. Will the conversion from PGS to SRT be fully transparent?

Nope. PGS is bitmap-based, so you need to run it through an OCR tool to convert it to text-based SRT. Hard-coding would be easier, but you probably don't want to ruin the video with rendered subtitles?

7ekno
19th December 2011, 21:20
I want to know so that I can determine how many movies will fit into my iPhone 4. I've already gave a brief statement about my source information. I'm looking for an educated guess and Doom 9 is the best place to ask.

How many movies do you want to fit on it?!?

Take total size of storage, divide by number of movies to store, use that number as the target bitrate for a 2-pass fixed size encode ...

As for answering CRF18, there is no real exact answer as it will depend on your process ... for example, on older movies encoded with VC-1 (ie Total Recall, Running Man, etc) I use MCTemporalDenoise() (ie default settings) and at 540p it's 960MB after MCTD, but if I do not denoise it ends up 2022MB ...

7ek

Blue_MiSfit
19th December 2011, 22:20
If you're in a hurry, 1 pass ABR usually isn't as bad as you might think ;)

Sgt_Strider
20th December 2011, 07:45
Do you have a source of information? I don't think the built-in media player supports MP3 in MP4 in any PSP model.



It's SPU, but VobSub is very similar (mostly a dump of SPU data).



Nope. PGS is bitmap-based, so you need to run it through an OCR tool to convert it to text-based SRT. Hard-coding would be easier, but you probably don't want to ruin the video with rendered subtitles?

How will the subtitles be like after conversion to SRT? What's the easiest way to do this? Do you know of a guide that will help me through this?

Sgt_Strider
20th December 2011, 07:45
How many movies do you want to fit on it?!?

Take total size of storage, divide by number of movies to store, use that number as the target bitrate for a 2-pass fixed size encode ...

As for answering CRF18, there is no real exact answer as it will depend on your process ... for example, on older movies encoded with VC-1 (ie Total Recall, Running Man, etc) I use MCTemporalDenoise() (ie default settings) and at 540p it's 960MB after MCTD, but if I do not denoise it ends up 2022MB ...

7ek

I don't have a specific number, but I'll just delete and re-add movies as needed.

I never even asked for a precise number because I know it'll be different with each movies. A rough estimate was what I was looking for. So 2 GB it is then...

Sgt_Strider
20th December 2011, 07:46
If you're in a hurry, 1 pass ABR usually isn't as bad as you might think ;)

Why would I be in a hurry when I have close to a bleeding edge machine?

nibus
20th December 2011, 09:08
How will the subtitles be like after conversion to SRT? What's the easiest way to do this? Do you know of a guide that will help me through this?

http://forum.doom9.org/showthread.php?t=162633

Sgt_Strider
20th December 2011, 12:02
http://forum.doom9.org/showthread.php?t=162633

Thx for the suggestion. If I was ripping DVDs, would I still need to convert the subtitles or that there won't be any issues with it?

Asmodian
21st December 2011, 03:18
DVDs use BMP type subs too and will need to be OCR'ed similar to BD subtitles if you want them as a SRT.

Sgt_Strider
22nd December 2011, 12:15
DVDs use BMP type subs too and will need to be OCR'ed similar to BD subtitles if you want them as a SRT.

Just curious, which disc format used SRT base subtitles?

nm
22nd December 2011, 13:51
Just curious, which disc format used SRT base subtitles?

There is no standardized disc format that uses SRT. However, NTSC DVDs can have text-based closed captions for the hearing-impaired. Blu-ray also supports text-based subtitles, but I don't know if any discs actually have them. Even though these formats could be directly converted to SRT, the hearing-impaired subtitles would be quite annoying to read.

mindbomb
26th December 2011, 05:55
Just curious, which disc format used SRT base subtitles?

i dont think any, but something similiar to srt exists for mp4 for internet media and such.