Hi. I've just learned how to get a quality copy of a DVD containing 4:3 material – I use Handbrake with anamorphic set to 'strict'. The next step is to edit the new file and I've discovered something strange. If the new file is mp4, an edited clip using Avidemux will still be 4:3. However, if the new file is mkv, Avidemux will produce a 5:4 clip even though it's in 'copy' mode. To fix this, I have to run the Avidemux clip through mkv-toolnix-gui specifying an AR of 4:3.
Stick to mp4 you might think but then you have to convert the audio because Avidemux won't allow AC3 within mp4. I'd rather keep the original audio which means using mkv.
Does anyone know why a Handbrake generated mkv (4:3) has it's AR changed by avidemux?
Are there better ways of editing such files?
+ Reply to Thread
Results 1 to 9 of 9
-
-
What sort of editing are you doing? I'm assuming it's simply cutting sections here and there? If you're doing a lot of that it's probably better to edit first, re-encode second. I'm not sure how many programs can do so but you can using MeGUI. It's Avisynth based and has a bit of a learning curve, so whether you want to try it might depend on how much time you want to spend on encoding and how much of it you're doing, but I thought I'd mention it. And if those DVDs are truly interlaced, there's a de-interlacer for Avisynth that's the best by far.
Depending on the editing you're doing, editing the original video before re-encoding it might also be an option. -
Thanks guys. The editing I'm doing is mostly the splitting of the DVD into scenes with the odd bit of deletion mid-scene. I've just completed a couple of tests:
TEST ONE. Encoded a VOB file with handbrake (A). Edited the resulting file with avidemux (B). On my TV, file (A) has the same AR as the VOB. File (B) plays slimmer. According to mediainfo, the VOB and file (A) are 4:3 while file (B) is 5:4.
TEST TWO. Made an exact mkv copy of the VOB with mkvtoolnix (C). Edited that file with avidemux (D). Encoded that file with handbrake (E). On my telly, (C) & (E) have the same AR as the original VOB but (D) (the avidemux file) plays slimmer. According to mediainfo, (C) & (E) are 4:3 while (D) is 5:4. Interesting to note how the handbrake encode restored the AR to 4:3.
Using the newest avidemux changed nothing. The handbrake settings in both tests were anamorphic/strict and crop0,0,0,0,. I can only assume that avidemux has a problem, possibly to do with interpreting the AR of a 720x576 file...
Although I could use toolnix to fix the AR of the end product in Test One, I'd go for Test Two as it has the additional benefit of more precise editing – the intervals when using avidemux are fractions of a second as opposed to Test One where avidemux jumps in mainly 10 second intervals.
However, thanks to hello_hello, I now have yet another program to investigate. Sheesh...! I'll look into MeGUI and report back. Thanks again. -
If you use MediaInfo's View/HTML menu (or View/Text) you'll probably get more detail. For the MKVs you're editing/remuxing with AVIDemux that end up with the wrong aspect ratio, MediaInfo will probably display two. Aspect Ratio and Original Aspect Ratio. When it displays both it means the video stream and the container (MKV/MP4) are probably different. I'm pretty sure "Original Aspect Ratio" is the video stream aspect ratio.
I think you'll find Avidemux is remuxing without keeping the container aspect ratio. Your TV probably uses that one, whereas Handbrake's able to use the video stream aspect ratio when you re-encode the MKV Avidemux created. I'm pretty sure my Bluray player is the same. It's the only player in the house that obeys MKV aspect ratios but it'll only use the container aspect ratio for MKV.
I'm not sure why MP4 is behaving differently. Maybe Avidemux is retaining the original container aspect ratio, or maybe it isn't and you don't know because for MP4 the video stream aspect ratio is being used by your player.
The reason mpeg2 editing is more precise is because the video can only be cut on keyframes, and for mpeg2 they're usually closer together. The default for x264 is a maximum keyframe distance of 250 frames, which would be ten seconds for 25fps PAL.
https://en.wikipedia.org/wiki/Video_compression_picture_types#Intra_coded_frames.2Fsli..._Key_frames.29
x264 is pretty good at starting each new scene with a keyframe, which tends to be where you'd want to cut, but there's no guarantee. -
Good info (yet again) hello_hello. Many thanks. I've downloaded the portable MeGUI and had a brief scan of it's buttons. It doesn't look as if editing will be as simple as it is in avidemux - would you agree? From what I've read, I got the impression handbrake was the grail of converters but does MeGUI do a more thorough job (in some folk's opinion)?
-
Shhhhh.... don't say that too loud around here or you'll risk being lynched.
Not that I'm saying Handbrake's a bad program. It's designed to give you a decent encode without the user needing to have any knowledge of video encoding, and it does what it's designed to do.
MeGUI is an Avisynth based GUI, so it creates Avisynth scripts (text files with an avs extension) for encoding, which opens up a whole new world of filters and plugins. MeGUI uses x264 for encoding as Handbrake does, so in that respect they're not any different, rather it's what you can do between decoding and encoding.
As far as editing goes, you'd create a script for encoding, or MeGUI does it for you, then you open that script with MeGUI's AVS Cutter to edit. That part wouldn't be much different to editing with Avidemux. Zone start and end points, navigation buttons, a preview, except without any need to worry about keyframes.
[Attachment 36348 - Click to enlarge]
MeGUI has a bit more of a learning curve, but there's a lot of benefits to Avisynth. It depends how much time you want to spend on it though. Once you know your way around MeGUI it's not as daunting as it might sound. It has a GUI with a preview for applying cropping, resizing and de-interlacing etc, much like you'd do it using Handbrake. You don't need to understand anything about creating scripts, MeGUI will do it for you, but at the same time you can experiment and get to know Avisynth along the way, if you want to.
The main reason I even mentioned it is because you said you were encoding a bunch of interlaced DVDs.... there's a couple of samples attached to this post. The original video is there too if you want to de-interlace with Handbrake as a comparison, but the samples in the zip file labelled Yadif shouldn't be much different to what you'd get from Handbrake, given Handbrake de-interlaces with Yadif, while QTGMC is the Avisynth de-interlacer. Getting QTGMC working is a learning curve on it's own though, and it's slow.Last edited by hello_hello; 1st Apr 2016 at 19:38. Reason: spelling
Similar Threads
-
Video file generated by h.264 cannot open.
By codec in forum Software PlayingReplies: 7Last Post: 1st Apr 2014, 14:19 -
Handbrake vs Avidemux vs Sony Vegas
By DUDERANCH in forum Newbie / General discussionsReplies: 16Last Post: 9th May 2013, 13:43 -
MP3 audio encoder differences in Avidemux, MeGUI and Handbrake
By falco2000 in forum Newbie / General discussionsReplies: 26Last Post: 26th Mar 2013, 03:21 -
Avidemux vs Handbrake
By Joshray in forum DVD RippingReplies: 3Last Post: 19th Dec 2012, 11:40 -
Editing M2TS file with AviDemux 2.6 (r8164)
By Kerry56 in forum EditingReplies: 1Last Post: 2nd Sep 2012, 11:02