Hello,
I am digitizing old video8 videos with a Digital8 camcorder. So far everything is going fine thanks to your help. I managed to digitize and lightly edit the dv-avi files. Now I need to encode them to mp4 and get rid of the black bars on the sides and the horizontal line at the bottom.
The files are 720x576 pixelAR 16:15 display AR 4:3
So far I tried cropping with Handbrake and got some vertical green lines in VLC. Then I got rid of it by using multiples of 16 for the resolution.
To avoid cropping I managed to add a black bars overlay with avconv but the result is displeasing.
Then I tried different cropping values :
704x566 - display 751x566 AR 3.98:3
700x560 - display 747x560 AR 4.00:3
704x560 - display 751x560 AR 4.02:3
All those resolutions work, 700x560 seems to be optimal but before encoding I'd like to have your opinion.
+ Reply to Thread
Results 1 to 21 of 21
-
-
-
Well at first I wanted to make dvds, I thought it was easier to keep the master dv-avi files at 720x576 and add a black bar overlay to remove the noise and horizontal line at the bottom. Also I tried that with nero, I don't think it allows cropping. Also I'm discovering the options now, I'm a noob.
-
-
The plan was to make a dvd with nero and a mp4 file from a single dv-avi file. But all things considered I think I will just archive the dv-avi on a hard drive and keep the mp4s for convenience. Now I need to find out how to do that best.
frame doubled?Last edited by ackboo; 8th Feb 2015 at 13:56.
-
If the video is interlaced using Bob as the de-interlacing filter will output 50fps progressive rather than 25fps progressive. It'll look much smoother. Disable the decomb filter and select 50fps constant for the output frame rate.
Are you sure about the 16:15 PAR? For a camcorder I'd have thought 12:11 more likely, but I don't really know for sure (but I think they'd use 12:11).
A list of PARs. https://www.doom9.org/showthread.php?p=1058927#post1058927.
The mpeg4 and ITU PARs are almost the same, so they can be used interchangeably. Is that a word? Interchangeably? I guess it must be. The spell checker hasn't complained.
I don't know how much control Handbrake gives you over PAR.
Personally I stick to a minimum aspect ratio of 4:3. If need be after cropping the crud I'd crop some picture as required to take the aspect ratio back to 4:3. I don't like it being narrower. Then I'd resize to 4:3 dimensions. Anything from 768x576 or 760x570 or 752x564 down to 640x480. Whatever I can get away with without a noticeable loss of detail. It shouldn't need to be mod16. That's resizing to square pixels (anamorphic none) but the same cropping would be required for anamorphic encoding if you want a 4:3 output.
I resize to square pixels as then there's no need to rely on a player displaying the video with the correct aspect ratio. Not all players display anamorphic MKVs/MP4s correctly and will just display it as though it consists of square pixels anyway. It's personal preference though.
You'll probably find if you use a 12:11 PAR you can crop the black from the sides and what's left will be very close to 4:3 because a 12:11 PAR gives you a display aspect ratio that's slightly wider than 4:3 (about 1.366:1), or to put it another way, only 704x576 makes up the 4:3 aspect ratio. The black bars down the sides don't count. So you probably won't need to crop much extra picture top and bottom if you prefer a 4:3 output and you use a 12:11 PAR.
Unless you want to use "anamorphic custom" and work it all out yourself, I think you're stuck with whatever PAR Handbrake decides to use. Or try this:
http://www.mediafire.com/download/09v9bldu9a6hm00/YodaResizeCalculator.exe
After you select PAL 4:3 as the source there's an option to select whether it uses an ITU or generic PAR.Last edited by hello_hello; 8th Feb 2015 at 14:52.
-
I tried bob deinterlace at 50 fps, its a lot smoother. Like really a lot smoother, thanks.
Handbrake offers other methods of deinterlacing, will frame doubling work with these filters ? Is there any point in trying ?
https://trac.handbrake.fr/wiki/DeinterlacingGuide
The files are dv-avi type2, according to avprobe :
bitrate: 30385 kb/s
Stream #0.0: Video: dvvideo, yuv420p, 720x576 [PAR 16:15 DAR 4:3], 25 tbn, 25 tbc
Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
So yes it is 16:15 PAR and that is the value handbrake is using.
As long as there is no visible degradation I can crop using any resolution, right ? -
16:15 is incorrect since it's recorded with a Video8 camcorder. There is no PAR stored anywhere in an AVI; avprobe and Handbrake are just incorrectly guessing the PAR to be 16:15 (because of the misleading and improperly named 4:3 flag) but the PAR is really 12:11, as explained by hello_hello.
Yes, but it should be mod 4 at least. -
-
No, because the analog to digital conversion that is happening inside the Digital8 camcorder while it's playing Video8 tapes uses certain standard sampling rates that result in a 12:11 PAR of the digital 720x576 video frame.
The distortion between 16:15 and 12:11 is small, you won't really notice it. But still, 12:11 is the correct one. -
So I tried different things
1:1 PAR
Stream #0.0(und): Video: h264 (High), yuv420p, 702x526, 4571 kb/s, 50 fps, 50 tbr, 90k tbn, 100 tbc
12:11 PAR 704x560 - 768x560
Stream #0.0(und): Video: h264 (High), yuv420p, 704x560 [PAR 12:11 DAR 48:35], 4933 kb/s, 50 fps, 50 tbr, 90k tbn, 100 tbc
I do not see any major differences in quality or distortion. I'll keep experimenting and try to get a perfect 4:3 DAR -
The info here indicates Handbrake tries to be clever, and if the cropping exceeds 14 pixels from the sides, it switches to using an ITU aspect ratio. At least that's the way I read it (although maybe only for "anamorphic loose" for reasons I don't understand), but I do recall playing around with it ages ago and couldn't seem to get it to behave that way. I didn't run any encodes though so maybe the change in PAR isn't reflected in the display size calculation. I don't know. Maybe that info is wrong, but Handbrake's log file is pretty detailed. It'll tell you what PAR it used.
The difference in display aspect ratio is around 2.5%, according to the pixel aspect ratio. It's not huge, but there is a difference.
If you put cropping aside, a 16:15 pixel aspect ratio should be resized to exactly 4:3. ie 640x480. For a 12:11 PAR it'd be pretty close to 656x480 instead. Your examples in post #11 should have a difference in DAR of about 2.5%.
If you use 12:11, and assuming you're cropping 2 pixels top and bottom, cropping 12 pixels from left and 10 right should give you 4:3 (very small aspect error).
For a 16:15 PAR, 10 pixels left and right and 8 top and bottom gives you exactly 4:3.Last edited by hello_hello; 8th Feb 2015 at 20:27.
-
No, and no.
Decomb might de-interlace a little more selectively if the output frame rate is set to 50fps constant, I'm not sure. Theoretically it only de-interlaces where it's needed (de-interlacing where it's not needed can blur a little) but at the same time it's more prone to leaving combing artefacts behind. That's my understanding, at least.
If you're really serious about de-interlacing, you can't go past QTGMC, but it's a whole other ball game in the "getting it to work" department and you'd need an Avisynth based GUI. I'm pretty sure Handbrake uses Yadif for de-interlacing.
Some small comparison samples. Yadif vs QTGMC at 25fps and 50fps.
(and yes, for those samples I used a 16:15 PAR and it's most likely wrong, but they were just samples)
Last edited by hello_hello; 8th Feb 2015 at 20:22.
-
I have made some side by side comparisons, there is indeed a small noticeable difference.
So if I understand this right, PAL video is really 768x576,
there is only 704 usable horizontal pixels because it is video8 and 704x12/11=768
I guess native digital8 footage has 720 usable horizontal pixels and so 720x16/15=768
The best way would be to crop to 704x576 and encode with a 12/11 display aspect ratio but I need to remove a persistent line at the bottom of the video.
What tools do you use to crop and encode with the proper aspect ratio ? Is there a better way than handbrake ?
When converting to square pixels should I aim for 768 horizontal pixels?
This thread was useful https://forum.videohelp.com/threads/333461-720-x-576-question?p=2068167#post2068167 -
The "square pixel equivalent" of 704 (with 12/11 ITU PAR) or 720 (with 16/15 MPEG PAR) is 768. But neither are actually using square pixels, so don't fall into that trap.
The "line" at the bottom is most likely head switching noise, which has no visible equivalent with digital video (which is why you don't see it in the D8 footage). The BEST option, IMO, is to overlay black on top of that line area and DO NOT CROP. In fact, I would recommend that you DO NOT CROP at all. 704x576 or 720x576 (both with 4:3 or 16:9 DAR) is perfectly fine as direct source footage to handbrake.
If you absolutely need a square pixel equivlent (target player doesn't work with non-square, etc), then yes, 768 is your best choice (assuming your 576 vertical hasn't changed, and you're using 4:3 DAR). If your footage happened to be 16:9 DAR, then 1024 would be that choice.
Scott -
When it comes do DVD type 4:3 video at 720x576, I think it's pretty much always 12:11.
Newer 16:9 DVDs tend to use straight 16:9 resizing unless they have a lot of crud down each side, which would mostly be older DVDs anyway, and then they're more likely to be ITU.
It's not a hard and fast rule, but a reasonable rule of thumb.
If all you do is crop when using anamorphic encoding, the PAR doesn't change, so you could crop 10 pixels each side, two top and bottom (for example) and then encode what's left at 700x572 and the remaining picture would have the correct display aspect ratio (12:11 PAR). If you want 4:3, you might need to fiddle with the cropping a bit (the crop and encode what's left as-is option is"anamorphic strict" for Handbrake). If you resize when using anamorphic encoding, that's when the PAR needs to change so the DAR doesn't (anamorphic loose). Normally the GUI would take care of the calculations. If you want control over the pixel aspect ratio, you'd need to use "anamorphic custom".
Personally, for anamorphic encoding I'd crop the crud, then crop a bit of picture as required until the display size is 4:3 and use "anamorphic strict". If you want to resize to square pixels (anamorphic none), I don't think Handbrake lets you resize "up". The maximum width is 720. Vidcoder is an alternative Handbrake GUI that lets you resize up so you could resize to 768x576 etc.
I use MeGUI myself but it's more of a learning curve than Handbrake. It's got a resize calculator built in similar to the Yoda resize calculator I linked to. The main downside with Handbrake is it doesn't let you choose the input display aspect ratio. Many GUI's let you select ITU or non-ITU manually, and they'll use the selected method as the basis for their pixel/display aspect ratio calculations. -
I did try to make an overlay with avconv, I created a transparent png with black borders and trancoded the dv-avi to dv-avi as a test. The file remained mostly the same size. However the result was unconvincing. The black borders make my ocd sense tingle. I might resort to that but I will try other options first. An old video that looks like new is much more appealing. Frame doubling is amazing in that regard.
My main computer is unavaillable at the moment, I'll try again later. -
I'm not a fan of black borders because they don't always have clean edges and on a 16:9 display that annoys me. I can put my TV in 4:3 mode and (in the case of using my PC as a media player) stretch the 4:3 aspect ratio to 16:9 to compensate, and my TV overscans in 4:3 mode so it looks much better, although not always enough to make the edges clean. In 4:3 mode I'm pretty sure my TV uses a 4:3 aspect ratio rather than ITU, which is possibly why it doesn't always overscan quite enough, although using a PC at least it's not hard to stretch the picture a tad to compensate, but when the alternative is to crop the crud, resize to 4:3 (or use anamorphic encoding) and not have to worry about anything else.....
-
hello, I got my pc back and installed megui with qaac and qtgmc. There is indeed a difference in quality. Megui is a bit different from what I am used to. Can someone tell me the best way to do batch processing with megui. Do I have to generate a script for each file?
Also, I use lanczos to upscale the frames, there are many options, should I try something else?
sample code with a dv-avi source 720x576 cropped to 700x560 resized to 736x552
Code:AVISource("C:\myfile", audio=false).AssumeFPS(25,1) #deinterlace QTGMC( Preset="Slower", EZDenoise=1, NoisePreset="Slow" ) crop(6, 4, -14, -12) LanczosResize(736,552) # Lanczos (Sharp) #denoise
-
I still think you've used the wrong pixel aspect ratio. Change the Input DAR to "PAL ITU 4:3" in MeGUI's script creator if you're not using that already and let it calculate the aspect ratio distortion. After the copping you've applied you'll probably end up with a resizing more like 752x552. Or you might be able to reduce the top and bottom cropping a bit if you've cropped extra to make the aspect ratio exactly 4:3.
Personally I think resizing to a slightly wider than 4:3 aspect ratio is a good thing if the cropping and input aspect ratio allows it, because mostly I'd be viewing the video on a 16:9 TV and if the picture's a little wider, the pillarboxing will be a little narrower.
MeGUI has a OnClick encoder. It does batch encoding. It's highly configurable. I've not used it much myself but you can create AVS templates with the script creator and add those templates to a OneClick encoder configuration. The OneClick encoder can auto-crop and resize etc but if you want to ensure each video is cropped the same way you could disable cropping and resizing and use an AVS template that includes it instead. That sort of thing.
I use Spline36Resize myself but there's not much difference between Spline and Lanczos. -
hello, I posted a sample here :
https://forum.videohelp.com/threads/371577-Encoding-Video8-with-Megui-and-QTGMC?p=2387660#post2387660
This project is nearing the end, I got qtgmc running and I managed to do some good encodes, anamorphic and resized. Thanks a lot for your input.