Bitrate question just for basic understanding

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
Chaiavi
Posts: 5
Joined: Mon May 01, 2017 5:48 am

Bitrate question just for basic understanding

Post by Chaiavi »

Hi,

I have ripped dvds in the old days, and I am talking 5-10 years back.

Anyway, I am trying to rip a VHS which was converted to a DVD (of my sibling's wedding).
The quality is of course quite shi$$y.

I remember that in the past I encoded the DVDs to divx/xvid with about 800kbps (virtualdub anyone?).
And the quality was quite good.
The size of the video was about 700mb for a movie of 90 minutes (all of those are approximations, but are close to the actual numbers)

I understand that I can't make the quality of my sister's wedding better than the original (although, I can deinterlace and other filters)


Here is my question:
I googled around and saw that today the best option is to use h264 codec (using the x264 encoder) - please forgive my ignorance here :-(
I googled around and saw that people say the bitrate I should use is 4000kbps at least !?
I used Handbrake (fast 720p), and the file took several gigs of HD.

So the question is:
If the codecs got better in the last several years, how come the file size just got bigger ?


Am I doing something wrong here ?



I really don't understand this, I will really appreciate an informative answer
Woodstock
Veteran User
Posts: 4620
Joined: Tue Aug 27, 2013 6:39 am

Re: Bitrate question just for basic understanding

Post by Woodstock »

Without your encode logs, we can't know either.

Some guesses - you are now faithfully rendering the static that was recorded.

And anything that had a VHS source is not going to require a high bit rate to render, because it isn't even 480i resolution.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Bitrate question just for basic understanding

Post by JohnAStebbins »

As Woodstock said, we need to see your log. We don't know if you changed any of the "Fast 720p30" settings. Your other statements about bitrate etc indicate that you may have. 4000kbps is higher than necessary unless you are attempting to make an archival copy to preserve the video without losing any more quality. I have a recent DVD encode where I used HandBrakeCLI's default quality setting (RF 22) and the resulting bitrate was around 1600kbps.

VHS is usually difficult to encode (resulting in larger than normal files) due to the amount of noise in VHS recordings.

My suggestion would be to show us your encode log so we can sanity check your settings, then add some denoise filtering to your encode. You'll also want to deinterlace. You'll probably have to experiment with the denoise options to see what works best for your particular video since the amount of noise in VHS recordings is highly dependent on the recording equipment used and in this case the equipment used to transfer to DVD. The NLMeans denoise filter has a tune option for "Tape" that is probably a good option here. BradleyS may have some suggestions for you on this. He knows a thing or three about the denoise filter. Don't bother with bitrate unless you have strict bitrate of file size constraints. Use HandBrake's default constant quality settings.
Chaiavi
Posts: 5
Joined: Mon May 01, 2017 5:48 am

Re: Bitrate question just for basic understanding

Post by Chaiavi »

Thank you Woodstock & JohnAStebbins so very much.

HB has just finished encoding the video.

I have encoded two videos (which were on that DVD-from-VHS disk).
For example: The second one which is 184 minutes long is 5.3 GB BIG!

Logs can be found here
Woodstock
Veteran User
Posts: 4620
Joined: Tue Aug 27, 2013 6:39 am

Re: Bitrate question just for basic understanding

Post by Woodstock »

When this transfer from VHS to DVD was done, did you do it yourself, or have a service do it?

It appears that the source disk has encryption on it, which would be unusual for a "home grown" conversion.

Does the resulting file play back normally, or does it look scrambled?

If scrambled, you probably need to use a tool like MakeMKV to give you an unencrypted video to work with. While handbrake can read DVD structures, it does NOT remove encryption.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Bitrate question just for basic understanding

Post by JohnAStebbins »

Have you looked at the encoded file? Does it play correctly? Even home made DVDs usually have encryption. And your log indicates you have nothing installed to decrypt the disc. The encoded video may be garbled. Encoding video that hasn't been decrypted will result in large files.

If the video isn't garbled, there are other factors that can result in larger files. Was the footage shot with a hand-held camera? Is there lots of jumpy motion? This would make files larger as would other high motion scenarios.

FYI, the final bitrate of each stream in the file is written at the end of the activity log. In this example, your video bitrate was 3067kbps

Code: Select all

[20:39:02] mux: track 0, 106824 frames, 1638528601 bytes, 3067.69 kbps, fifo 2048
[20:39:02] mux: track 1, 200294 frames, 85563617 bytes, 160.19 kbps, fifo 4096
Chaiavi
Posts: 5
Joined: Mon May 01, 2017 5:48 am

Re: Bitrate question just for basic understanding

Post by Chaiavi »

@Woodstock I took the VHS tape to a guy which had a hardware unit which transferred the VHS to the DVD, it created it with IFO files and VOB siles.
(He took 10$ for each tape), the whole process was done without an intermediate computer, the hardware unit did it all (read the VHS and wrote it directly to the DVD).

I am not sure about the encryption thing, but the mp4 file HB has created from that DVD (5 GB mp4 file) can be run and the video is playable.

Do you think that hardware device lowered the quality of the video ?
I still have the original, so I can look for a real VCR and transfer the video using RCA (I think), I will do it if it will give me better quality.

@JohnAStebbings The video is not garbled, I can see and enjoy the wedding, you are right, there are many jumpy parts, and if i did encode it in 3067+160kbps it does explain the big output file :-(

I will try to play with it some more to see if I can do anything to make the output smaller without losing quality
Woodstock
Veteran User
Posts: 4620
Joined: Tue Aug 27, 2013 6:39 am

Re: Bitrate question just for basic understanding

Post by Woodstock »

DVD video quality exceeds that of VHS tape, but, in a VHS-transfer situation, you are limited by the quality of the tape reader and the digitization circuits used, as well as how far the tape had already deteriorated. You WILL have "noise" in the video, the question is, how much?

I would take the DVD and read the data to your hard drive. MakeMKV can usually do this, although some non-commercial disks can have non-standard problems. This will copy exactly what is on the disk to the disk as an MKV file, with no changes to the encoding. If encryption was NOT used on the disk, you can use Explorer to copy the entire contents of the disk to a directory, and let handbrake read it from there.

Once you have it on your hard drive, you have several options - one is to simply use it as-is; there is no degradation to deal with, past the initial encoding to make the DVD. As either an MKV file or a "DVD file system in a directory", a lot of players can deal with it directly.

The other is to spend some time using different settings in handbrake to get more towards your target. As John mentions, there are a number of different noise filters that can clean up the appearance of the video, and allow it to be compressed smaller (noise takes lots of "bits" to encode). And you can have handbrake encode just a few seconds or minutes of video to each time, and review the results, without further risk of damage to the original DVD.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Bitrate question just for basic understanding

Post by JohnAStebbins »

Since the video plays correctly, it's just a matter of tuning your settings to get your preferred file size to quality trade-off. You might try stronger denoise setting just to see if it helps. You can also try a slower video encoder preset (e.g. medium or slow instead of fast). Slower encoder presets translate into better quality and/or smaller file size. The video preset options are on the video tab. But my guess is that to reduce the file size you are going to have to give up some quality. Try experimenting with the quality slider on the video tab. I'm guessing you can reduce the file size quite a bit without noticing a significant loss of quality because the original quality is already so low.
Chaiavi
Posts: 5
Joined: Mon May 01, 2017 5:48 am

Re: Bitrate question just for basic understanding

Post by Chaiavi »

Guys, thank you so very much.

This is one of the most informative threads, I am saving it into my browser's favorites.

I am off to some experimenting :-)
Post Reply