Best settings for compressing AVI files from 720x480 Camcorder

Discuss encoding for devices and presets.
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

Hi - I am a Handbrake noob but love the software. I have been googling and reading various posts and articles and thought I would ask for your advice once and for all.

I have a lot of video files on my HDD from 2004-2008 that came from a Canon camcorder. They are .AVI format and 720x480 30p. They are each anywhere from 30 seconds to 4 minutes in length.

For whatever reason I just realized that I can do some major compression on these files with Handbrake so I can keep them looking very similar but taking up about 1/10th the HDD space and converting them to .MP4 files which will be more universal for playback in the future as well.

Now my problem is deciding what is the "right" setting to use before I launch into a process of going into each folder and setting up (manually I guess) batch encodes for each of the video files, running the encodes, and then ultimately deleting the AVI files forever.

I have run encodes of the same file on 1080p FAST, HQ, SuperHQ, and also 480p Fast, HQ, SuperHQ. I see that the resulting files have different file sizes and bitrates, but honestly I cannot "see" the difference between any of the outputs when I watch the files on my PC 27" monitor.

So my questions - I would like to create my own Preset.....

1) I think I should just use a 1080p preset because it doesn't matter (the 480p quality will be retained and there is no "upscaling")?

2) between the different presets it seems the biggest difference is the RF quality. Since I still want to have these as the "master" should I go with the SuperHQ RF = 18 even if I can't "see" the difference between 18, 20 or 22? I know file size will be larger but it is still a lot lot better than AVI. Or if I can't "see" the difference since this is SD content, then who cares and I should just go for smaller file size because there is still enough visual data there?

3) the HQ and Super presets include a "surround" track. Since my camcorder videos are coming as 2 channel stereo, I assume I should delete that second surround track as it just adds more audio kbps (and presumably file size) for no reason yes?

4) should I leave the file output as .m4v or change Handbrake settings to call the file .mp4? I've read they are basically the same. Any reason I would want it to be called mp4? I would prefer not to have to go back later and rename hundreds of files as mp4 instead of m4v. I read that m4v was for Apple compatibility but I don't know if that is dated info or not.

5) I don't understand "Encoder Level" - on the 480p Presets it uses Encoder 3.1 and on the 1080p presets it uses 4.0. I think it is better to use a "newer" encoder so 4.0 vs 3.1 yes? Does the higher level encoder do better quality for a given file size? There were some cautions about device compatibility with using higher encoders so that is why we shouldn't just change the encoder to 5.2 right? Between 3.1 and 4.0 are there other considerations between the two?

Thanks in advance for the advice.
Deleted User 13735

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Deleted User 13735 »

!. Use the PRESET that matches your video resolution and frame rate -- no need to monkey with the settings! They were made especially for you.
2. You cannot upscale SD to HD in Handbrake GUI -- nor would there be any reason for you to do so.

3. For individual assistance, the part where you post your encoding logs, which you so conveniently deleted, and which would reveal your source properties, are required. It is probably DV-AVI, but just how the heck would anyone here know??? They are not discretionary.
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

musicvid wrote: Fri Feb 12, 2021 8:20 pm !. Use the PRESET that matches your video resolution and frame rate -- no need to monkey with the settings! They were made especially for you.
2. You cannot upscale SD to HD in Handbrake GUI -- nor would there be any reason for you to do so.

3. For individual assistance, the part where you post your encoding logs, which you so conveniently deleted, and which would reveal your source properties, are required. It is probably DV-AVI, but just how the heck would anyone here know??? They are not discretionary.
Ok thanks, I am new to this forum. So to be clear, my AVI source material shows as 720x480 (640x480) 29.97fps, 1 audio tracks. So then I should be using a 480p Preset I take it. And since I have 1 audio track I should delete any "surround" second track if I am choosing a preset that includes surround.

Below is the activity log when I open this AVI file. All my other AVI files would be similar.

So can you suggest the best preset for this one? I see it says something about being interlaced or telecined and "you should do something about that"

I originally assumed I could just use the standard 1080p preset since it was still going to just process this at 720x480 but I see now that I need to match the preset to the underlying original source.

Input #0, avi, from 'D:\My Documents\My Videos\Final Clips 2008\Disc 1\Andrew Haircut.avi':
Duration: 00:00:47.41, start: 0.000000, bitrate: 28862 kb/s
Stream #0:0: Video: dvvideo, yuv411p, 720x480 [SAR 8:9 DAR 4:3], 25000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[15:36:07] scan: decoding previews for title 1
[15:36:07] scan: audio 0x1: pcm_s16le, rate=48000Hz, bitrate=1536000 Unknown (pcm_s16le) (2.0 ch) (1536 kbps)
[15:36:07] scan: 10 previews, 720x480, 29.970 fps, autocrop = 0/0/0/0, aspect 4:3, PAR 8:9
[15:36:07] Title is likely interlaced or telecined (6 out of 10 previews). You should do something about that.
Deleted User 13735

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Deleted User 13735 »

480 p30 Fast Preset.
Anything slower or bigger is simply overkill for your 4:1:1 video capture.
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

musicvid wrote: Sat Feb 13, 2021 12:11 am 480 p30 Fast Preset.
Anything slower or bigger is simply overkill for your 4:1:1 video capture.
Excellent - thank you.

One threshold question though before I launch into this project. Am I being stupid to do this? (throwing away the video quality and bitrate in the DV-AVI files just to save HDD space) To my eye I cannot tell the difference now - however is there any reason in the future that I would want to have that less-compressed DV-AVI? These are home videos of my kids shot in SD so I guess I'm not expecting to turn them into a 4K masterpiece 10 years from now, but as I am not an expert in video, I wouldn't want to delete all my AVI files only to regret it for some reason that I missed today
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by mduell »

Given how fast 480p will encode, I'd use slower x264 settings for this archival type encode.

If you're going to edit them in the future, I'd also keep an encode (from the original AVI source) using the Production Standard preset.

And check the results carefully for combing/etc before you toss the originals.

TBH, given the cost of disk and the size of 480p DV, I'd just keep the originals.
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

Also can I trouble you to recommend the Preset for some AVCHD (.m2ts) I have from Sony and Panasonic cameras around 2011-2015:

Very much appreciated!

This is 1920x1080 60p, I believe. In the General tab in Handbrake I don't see a 60p option (I think there used to be in earlier versions). Should I go find a 1080p60 from another tab like "Vimeo 1080p60" or in Devices tab there is "Chromecast 1080p60" etc?

[19:15:48] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[19:15:48] Found the following PIDS
[19:15:48] Video PIDS :
[19:15:48] 0x1011 type H.264 (0x1b)
[19:15:48] Audio PIDS :
[19:15:48] 0x1100 type AC3 (0x81)
[19:15:48] Subtitle PIDS :
[19:15:48] 0x1200 type PGS Subtitle (0x90)
[19:15:48] Other PIDS :
[19:15:48] 0x1001 type Unknown (0xff) (PCR)
[19:15:48] stream id 0x1100 (type 0x81 substream 0x0) audio 0x1100
[19:15:48] stream id 0x1200 (type 0x90 substream 0x0) subtitle 0x1200
[19:15:48] hb_ts_stream_getPEStype: EOF while searching for PID 0x1011
[19:15:48] stream doesn't seem to have video IDR frames
[19:15:48] scan: decoding previews for title 1
[19:15:48] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[19:15:48] scan: audio 0x1100: ac3, rate=48000Hz, bitrate=256000 Unknown (AC3) (2.0 ch) (256 kbps)
[19:15:49] stream: 17 good frames, 0 errors (0%)
[19:15:49] scan: 10 previews, 1920x1080, 59.940 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[19:15:49] scan: supported video decoders: avcodec qsv
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

mduell wrote: Sat Feb 13, 2021 1:27 am Given how fast 480p will encode, I'd use slower x264 settings for this archival type encode.

If you're going to edit them in the future, I'd also keep an encode (from the original AVI source) using the Production Standard preset.

And check the results carefully for combing/etc before you toss the originals.

TBH, given the cost of disk and the size of 480p DV, I'd just keep the originals.
Okay thank you for this advice. I have done some more thinking and calculating and I like your idea of maybe I do nothing and save myself lots of time right now. I am thinking this:

1) makes no sense to convert to Production Standard even though it is fast encode, because file size went from 160 MB to 141MB - not worth the time to do this part vs just leaving them AVI for now

2) I realize that only half of my videos are AVI files, that is about 200 GB. So at a 10:1 reduction I could save 180GB which is good. But then the rest of my videos are AVCHD 1080p60 (see question above about proper filter) and it seems like I may only get a 3:1 reduction there, so on those 200GB I save less space - 120GB. I guess 300GB is good to save, but as you said HDD space is cheap and I am already backing up on multiple physical HDDs periodically

I was starting this project in advance of backing up videos to the cloud for emergency backup. I was thinking it would be simpler to shrink them and then put them up on a cloud site. Maybe I should just upload them to Google Photos before June 2021 while it is still free and that can be my worst case backup? Or is it easier/better to pay some money and put them as AVI files up onto something like Amazon 1 TB paid option?
Deleted User 13735

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Deleted User 13735 »

Your source is 4:1:1 chroma subsampling. It's ok to not know what that means, but the capture (by usb?) is of lower quality than anything Handbrake presets are capable of producing. It will come out 4:1:0, about the same quality as VHS. If you want to take more time, or create larger files, feel free to say it is the best it can be.

At the risk of repeating myself, you can't make a silk purse from a sow's ear.
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

musicvid wrote: Sat Feb 13, 2021 3:25 am Your source is 4:1:1 chroma subsampling. It's ok to not know what that means, but the capture (by usb?) is of lower quality than anything Handbrake presets are capable of producing. It will come out 4:1:0, about the same quality as VHS. If you want to take more time, or create larger files, feel free to say it is the best it can be.

At the risk of repeating myself, you can't make a silk purse from a sow's ear.
Thanks and I get it on the 480p DV AVI. Yes now that I recall it was digital video onto MiniDV tapes that were then transferred via FireWire to the PC.

But what about my other posting about .mts and .m2ts files that are 1920x1080 and 60p frames? What is the best Preset for that? I don't see a listing for that in the General tab
Deleted User 13735

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Deleted User 13735 »

But it's there in other tabs, including Web, Devices and Production. I think you need to start testing and comparing results to suit your own eyes, only. We simply don't know what is "best" for "you," only enough to steer you away from mistaken thinking.

Probably the easiest for you, since it is unfamiliar, is to choose a 1080 p30 General preset, and change the frame rate to Same as Source.
Done.
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

mduell wrote: Sat Feb 13, 2021 1:27 am Given how fast 480p will encode, I'd use slower x264 settings for this archival type encode.

If you're going to edit them in the future, I'd also keep an encode (from the original AVI source) using the Production Standard preset.

And check the results carefully for combing/etc before you toss the originals.

TBH, given the cost of disk and the size of 480p DV, I'd just keep the originals.


Hey guys sorry I want to swing back one more time and ask my question not about Presets, but about AVI vs Mp4

The files in question (see activity log above) are camcorder clips that I have ALREADY "edited" in the sense that I have combined/joined clips together, cut out any long bad parts, etc. While never say never, I don't envision myself needing to take the files and edit them more.

WHAT I AM TRYING TO UNDERSTAND IS AVI VS MP4 AS STORAGE. The files are from an era where AVI was the standard for "compression". Today computers are much faster so my understanding is that Mp4 can now hold a similar VISUAL QUALITY as the AVI but in much smaller file size. But I am not fully understanding of what I will lose if I decide to convert these files to MP4 for archiving. I know the bitrate decreases but if my eye cannot tell the difference, what does it matter? BASICALLY I AM HOPING YOU CAN TELL ME IS THERE A TIME IN THE FUTURE WHERE I WILL REALLY NEED OR WANT THE AVI SOURCE FILE, OR HAS THE WORLD MOVED ON AND THUS I WOULD NEVER NEED IT? (would there be an H.275 for example in 20 years that I would want to take the AVI source files and recompress there? or would I just convert H.264 to H.275)

I now have 1TB of OneDrive storage and I was starting to upload the yearly video file folders to it. I only have about 400GB of video in total, so I can certainly just upload the AVI files and leave them there. It was just taking so long that I once again circled back in my mind to really wonder FOR 480P SD VIDEO WITH THE PARAMETERS SHOWN IN THE ABOVE HANDBRAKE ACTIVITY LOG IN EARLIER POST, CAN YOU THINK OF A REASON I WILL LATER WANT TO HAVE THESE .AVI FILES AT ALL? The compression factor is like 8:1 or 10:1 so that is why I wonder whether I should just shrink them so they will upload faster, transfer back and forth more easily if I switch cloud providers in the future, etc.

Basically I just don't know beyond the "they look very similar to me" what I am missing and I am afraid of making a choice that I regret later once I delete the AVI files

Thanks
Deleted User 13735

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Deleted User 13735 »

In a sentence, a reasonable x264 MP4 file from AVI motion video can be 5-10 times smaller without visible loss of quality.
Put another way, that should be 99% or better quality retention of the original.
Unless your originals are very important to you, I would go with x264 for storage, because the format is going to be around for a long time.
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

musicvid wrote: Sun Mar 07, 2021 11:29 pm In a sentence, a reasonable x264 MP4 file from AVI motion video can be 5-10 times smaller without visible loss of quality.
Put another way, that should be 99% or better quality retention of the original.
Unless your originals are very important to you, I would go with x264 for storage, because the format is going to be around for a long time.
Ok thanks

I will run a few more tests and decide. On the one hand it is silly if I have 400GB and access to 1TB of cloud storage to worry about shrinking them down. But on the other hand my gut keeps telling me that the reality is for their use as remembrance videos of our kids’ childhood moments, their quality as MP4 will provide the exact same “memories” as if I leave them in full 26000 bitrate AVI.

I have one more somewhat unrelated question but just to further my understanding of H264 and compression etc. If I run something through handbrake at R20, and the file size is X and bitrate Y, and then I run THAT FILE through again, and then again, and again, does the file size keep shrinking each time, and the bitrate smaller, and the quality gets worse and worse? Or at R20 are there certain compression tricks that the system uses to keep quality at a given level, and then running through again and again doesn’t really change further because the system knows it has already used its tricks for what it can keep as a static piece of the picture vs moving, etc, and so it can’t keep adding to those compression shortcuts each time?
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by mduell »

The AVIs are better for editing than an efficient H.264 encode. You could also make an editing-read H.264 encode using the HB Production presets, and storing both that and a heavily compressed version may still be smaller than the AVI.

Yes, every generation of encode loses a bit of quality. People generally aim so they can't notice the first one, but run it through 100 times and you'll just have blobs of color.
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

mduell wrote: Mon Mar 08, 2021 6:00 pm The AVIs are better for editing than an efficient H.264 encode. You could also make an editing-read H.264 encode using the HB Production presets, and storing both that and a heavily compressed version may still be smaller than the AVI.

Yes, every generation of encode loses a bit of quality. People generally aim so they can't notice the first one, but run it through 100 times and you'll just have blobs of color.
Thanks that is helpful color as well. I guess it just depends if I really am ever going to edit the little 2 minute clips of kids blowing out birthday candles etc. There will ALWAYS be some form of Handbrake or successor I assume so it’s not like at some point I will wake up and find that all those AVI files are now unwatchable. However for future screen sharing, or putting up on a TV via USB drive, or whatever, it would still be much easier to have a 200MB file vs a 1.5GB file of very similar visual quality
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

mduell wrote: Mon Mar 08, 2021 6:00 pm The AVIs are better for editing than an efficient H.264 encode. You could also make an editing-read H.264 encode using the HB Production presets, and storing both that and a heavily compressed version may still be smaller than the AVI.

Yes, every generation of encode loses a bit of quality. People generally aim so they can't notice the first one, but run it through 100 times and you'll just have blobs of color.
Also for what its worth, I just ran the AVI video through “Production Standard” on HB. The file size is basically the same or a tiny bit larger than the original AVI file, the bitrates are very similar, yet the Production MP4 file has really noticeable “lines” in the video while playing back on PC. Horizontal lines that make it look like I am watching the video through some sort of screen or filter. I assume it is something wrong in one of the settings that I would need to fix for this video source. I’m not going to use the Production since there is no file size savings anyway, but the added lines don’t help

Also what do people generally use for audio bitrate for home movie files? Is the 160 standard setting plenty good for dialogue and wind noise etc or is there any reason to up it to 192 or 256 or 320 since it is “only a few more MB” of resulting file size. Since it isn’t music I would guess it doesn’t matter that much
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by mduell »

You need to add deinterlacing or decombing since your source is interlaced. May help shink the file size a bit.
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

mduell wrote: Thu Mar 11, 2021 3:47 pm You need to add deinterlacing or decombing since your source is interlaced. May help shink the file size a bit.
Thanks. I added this and it does look better, however at Production Standard the file size increased from 1.9GB to 2.2GB, so I won’t bother doing this approach.

Is the issue for editing a compressed AVI file that the intermediate frames are no longer there? So if you tried to run something in slow-mo then it wouldn’t look crisp? I’m trying to understand what are the implications to “editing” if I decided to go ahead and turn all the AVIs into Mp4s (even though I probably won’t want to edit them in the future)
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by mduell »

Slow-mo isn't the problem, but there's a lot of predicted or bi-predicted frames in the small H.264 version, which the editors struggle with for decode performance.
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

I went ahead and converted all the AVI files to MP4 and then uploaded those MP4 to the cloud backup. I really did a lot of side by side viewing and as you said, cannot see any difference to my eyes, and sure feels better uploading 15GB of data rather than 150GB worth for the same video. I did keep a copy of the AVI originals on my local HDDs since there is excess space on them, figure it can’t hurt as a just in case, but if anything ever happened there then I am very happy to have the MP4s as my backup, and much easier to work with them (upload/download/share with others)

Now my question moves to later years where I have a bunch of M2TS files in AVCHD coming from my Sony camera I was using during that time period. They are 1920x1080 and 60p, so pretty high bitrate. I had a couple files that I already combined a long time ago, probably in Sony Playmemories Home, so they are “edited” and still M2TS. On those I did a conversion in Handbrake at both R20 and R22, same as source (so 59.94 FPS) and I cannot detect any differences in side by side viewing on 2 windows with the original M2TS. File size is about 40-50% of M2TS original.

So question is, same “answer” as before where you guys would say that if I am ever going to edit them together (where I take 5 clips into one movie for example) then I should just leave them in M2TS for now until I do that? Or if I converted all the clips at R20 and then kept them all as MP4s, I could still join them later in Shotcut or something. If I did that and then exported that file, I am doing a second conversion and so would be losing another generation of quality in that case right? Or is there an easy way to later import several MP4 files into a program and then export them without re-encoding?

Obviously the space saving for these clips is now 50% instead of 90% like I had with the 480p AVI files, so wondering whether I should be converting them all to MP4 again and tossing the M2TS files or whether not worth it. I was using the R20 and Very Slow setting on Handbrake just to ensure I was preserving a good quality, even though I honestly had trouble seeing any difference between the R20 and R22 versions. Maybe R22 a little softer when paused on a frame vs R20 but hard to tell.

Any thoughts on this question now that we are talking about 1080p60 and AVCHD sources would be appreciated thanks
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by mduell »

If you're going to edit later, keep the originals or make an editing-friendly (which will probably not be much smaller) encode with the Production presets.

For lossless merging you can use ffmpeg or mkvmerge or probably one of the mp4 muxers for your platform. You can do this with the M2TS files or with MP4 files, assuming the relevant specs match (frame size, framerate, etc).
Hogan773
Posts: 13
Joined: Fri Feb 12, 2021 2:25 pm

Re: Best settings for compressing AVI files from 720x480 Camcorder

Post by Hogan773 »

mduell wrote: Thu Apr 01, 2021 9:32 pm If you're going to edit later, keep the originals or make an editing-friendly (which will probably not be much smaller) encode with the Production presets.

For lossless merging you can use ffmpeg or mkvmerge or probably one of the mp4 muxers for your platform. You can do this with the M2TS files or with MP4 files, assuming the relevant specs match (frame size, framerate, etc).
Ok thanks. If I did editing later I would want it to be on an easy timeline platform like Shotcut etc. At that time I guess I would then run an export that would re-encode at chosen CRF etc so that would be same as running it through Handbrake now.

So I guess for now I will just upload them to the cloud in M2TS format and then as I may edit some of them over time I can convert them to MP4s when final. I don’t have the time or desire at the moment to edit together 9 years worth of movie clips that I’ve captured into larger clips, but may do so in the future (e.g. taking 7 30 second clips from a trip to the apple orchard and cutting them together into a single file called “Apple Picking 2013”)
Post Reply