Handbrake - place 4:3 video in 16:9 container

I have a DVD of a show I’m converting that was running during the transition to digital and the way the DVD is designed I’m needing to merge two MKV files into one in order to allow Plex to see it (since a “movie” with just extras isn’t an option). The DVD itself is just a bunch of clips the user selects from the on screen menu.

I’ve used Handbrake to convert everything and MKVtoolnix has been a great tool for merging MKV files. However, there’s two videos I want to merge where one is 4:3 and the other is 16:9. It’s not ideal, but I want to “place” the 4:3 video inside a 16:9 frame and pillarbox it. Currently my efforts have either resulted in the 16:9 video being squashed to 4:3 or the 4:3 being stretched to 16:9.

Advice appreciated!

You can’t do that.

There are times when two files are so different, they can’t be ‘merged’ and this is one of those times.

I’m an Apple guy so this might not apply to you…but I’d just use some kind of video editing software to combine the clips manually and then output a new file. I use Final Cut all the time and I’m not sure if it can import an MKV file (I’ve never tried that) but there are other formats that Handbrake can output that it can handle fine…iMovie could probably do it as well. On a Windows PC or Linux, I don’t know what the equivalent software would be.

The problem is the aspect ratios are different. VideoReDo can do what you describe, but the 4:3/16:9 issue could be the show stopper.

It’s possible Plex could treat them as ‘2 Parts’ that will play consecutively:

Movies Split Across Multiple Files

Movies that are split into several files (e.g. pt1, pt2), can be played back as a single item if named correctly. The split parts must be nested inside their own folder, named as usual for the movie. Name the files as follows:

  • /Movies/MovieName (release year)/MovieName (release year) – Split_Name.ext

Where Split_Name is one of the following:

  • cdX
  • discX
  • diskX
  • dvdX
  • partX
  • ptX

…and you replace X with the appropriate number (cd1, cd2, etc.).

/Movies
   /The Dark Knight (2008)
      The Dark Knight (2008) - pt1.mp4
      The Dark Knight (2008) - pt2.mp4

Notes :

  • Not all Plex apps support playback of stacked media
  • All parts must be of the same file format (e.g. all MP4 or all MKV)
  • All parts should have identical audio and subtitle streams in the same order
  • Only stacks up to 8 parts are supported
  • “Other Videos” libraries or those using the “Plex Video Files Scanner” do not support stacked content.

Then you find out how badly Plex mishandles 2 Parters, but it still could be an option.

https://support.plex.tv/articles/naming-and-organizing-your-movie-media-files/

Again, I have no idea what kind of a computers you guys are using and I don’t know what kind of software you have available. But to be clear, what I’m talking about is using a video editor (like Final Cut or iMovie or Davinci Resolve or Premiere or whatever…I think Davinci might even have a free trial) to create a new 16x9 video…import the two clips into the video editor, drop in your first 16x9 video clip, then after that, add in a 16x9 black background and put your 4x3 video on top of it (which would result in a 4x3 video inside a 16x9 frame and pillarboxed). Then export the whole thing as whatever kind of file you want that Plex can handle (or that you can later run through Handbrake). End result is a 16x9 video with a portion of the video displaying a squarish video in the middle of the screen with black bars on either side of it.

Well, @liammiller can do all of that - maybe - but looking at it from over here the PITA factor has already kicked in making me look for something ‘quick and dirty’.

Not to mention the ‘software’ equivalent for PC is wildly expensive - VideoReDo cost me a $C-Note years ago - the Free software that can do ‘some’ of this stuff is the Hand-Grenade Approach (you get what you pay for) and probably won’t be suitable in the end, unless you have some pretty low expectations/high crap-tolerance.

:slight_smile:

If I were doing it (if it were important to me), I’d crop the 4:3 to 16:9 (chop from the bottom up) handbrake that, then handbrake the 16:9 (to have a ‘very similar’ version), then blend those two by some means, but then there’s that pesky PITA factor to consider.

Another possibility is putting those guys in a TV Show Library to have them play consecutively from On Deck, once you Match to the Personal Media Agent and Hand Edit everything - and here comes that old PITA factor again…

There are a few options, requiring more than an entry-level skill set, some more labor/cost intensive than others. PTIA Factor - Variable.

I get where you’re coming from, but I have a pretty good understanding of video editing so when I look at the problem he’s trying to solve and what he’s already done…that’s where i see a PITA. I doubt it would take me more than 5 minutes to have a useable file if I went at this with Final Cut. And while I’ve never personally used it, Davinci Resolve is a pro level piece of software (owned by BlackMagic…maker of all kinds of awesome cameras and filming equipment), and they offer a ‘somewhat’ light version for free (on Mac, Windows & Linux) that I’m sure could also produce a better outcome than any combination of what’s already been tried.

I would try Avidemux. You can get it here:
http://avidemux.sourceforge.net/download.html

It’s not as quick and easy as Handbrake is, but it will let you add borders. You’ll have to do some calculations to get the proper size of the borders to add to get the 16X9 frame, and for sure you’ll have to read at least part of the manual. It’s free, and does a decent job once you get the hang of it.

There’s also meGUI (MeGUI download | SourceForge.net) I use it all of the time, and prefer it over Handbrake. I haven’t used Handbrake for about 10 years because I prefer the results from this program. You can’t add borders from the graphical interface, but you can edit the scripts it creates to add borders.

As mentioned, it will not likely be quick and easy. Framerates might need adjusting, one video might be progressive, the other interlaced, etc and you’ll need everything identical to merge into one file. Be prepared for a big learning curve. :face_with_head_bandage:

@liammiller - here’s a quick and dirty way to do it with Avidemux. The whole process took about 5 minutes with Avidemux and then I just joined the two files with MKVToolNix. The videos both had identical frame rates and audio, so it was virtually painless. They were two music videos, one 4X3 and the other 16X9 ripped from a DVD.

This will create a 852X480 video. Close enough to 16X9 in my books, and Plex will recognize it as a 480p video.

Start Avidemux
Drag and drop your 4X3 Video into the Avidemux window, or use “File… Open…”

Next, on video output, select MpegAVC (X264), and for audio Output select AC3 (Aften)

You will need to set some filters, I’d start with these ones, and add them in exactly this order:
(you add filters by double clicking on them)

First Filter: under Interlacing, add the Yadif filter. Keep the defaults.
Second filter: under Transform filters, the swsResize filter.
… select NTSC 720X480 DAR 4:3 Par 8:9 as the Source PAR
… select 1:1 (square pixels) as the Destination PAR
… under Resize Dimensions set Width to 640, and Height to 480
Third Filter: under Transform, add the Add Borders filter
… Left Border - 106
… Right Border - 106
… Top Border - 0
… Bottom Border - 0

You can preview the final output by clicking the Preview button while you have the “Add Borders” filter selected.
You can also see a step by step process that each filter does in the chain, by selecting the filter, and hitting preview if you want

Close the Filter Manager. The video on the avidemux window doesn’t change, (or it didn’t for me, anyway)

Choose File… Save… and that’s it. You should end up with a pillar boxed 4X3 video inside a 16X9 frame

You will need to go through a similar process to get the 16X9 in the same format.
You want to end up with a 852X480 video, so basically the same bit of tweaking in the filter section with some different settings.

First Filter: Interlacing Yadif filter
Second filter: Transform - swsResize
… select NTSC 720:480 DAR 16:9 Par 32:27
… select 1:1 (square pixels) as the Destination PAR
… under Resize Dimensions set Width to 852, and Height to 480
(No borders this time)

Close the filter manager and save the file. Use MKVToolNix to append/join the files in the order you want.

You may not need to use the Yadif filter, depending on the source files. You can experiment to get the results that suit you.

1 Like

There ya go, folks - easy as… cake.

:wink:

Using what I have in the Media-Hoarder’s toolkit I would:

Crop the 4:3 video to 16:9 by cropping down 16 to 22 pixels from the top (to fix ‘air-head’), but no more (to stave off ‘the talking chin’) then crop up from the bottom until you get a 16:9 image in Handbrake, then Handbrake an MPEG-2 version - then Handbrake an MPEG-2 version of the 16:9.

With both of those in hand, load 'em up in VideoReDo (works best with MPEG-2 - as you may have guessed by now) and Frame Accurate Edit a perfect working version with no borders, glitches, or anything else that would ‘give it away’ - Handbrake that back to 264 and… there you go.

What have we learned?

If there’s a will, there’s a way - PITA: Variable (Wildly).

1 Like

My usual workflow would be entirely with MeGUI, but it’s a little more complicated to try and explain, 'cause it’s not always user friendly. I’ve been using it for years, so I could whip up the same thing in a few minutes. The end result would be one file, no merging required. Sometimes I crop the 4X3 video to 16X9, and sometimes I just use the pillar box cause I want to keep the original appearance.

The end result is kinda like watching a movie that has some scenes filmed with an IMAX camera. The aspect changes from 2.4:1 to 16:9 depending on the scene. The black bars are just in a different spot in this case.

Right, you and I would use what we’ve been using ‘for years’ - because we know how it works - to get the best end-product possible.

@liammiller is going to have to change gears completely - because what he’s been using isn’t working (but recent tips and tricks of the trade may have given him new ideas).

Or he may fall back to ‘Stacked Plex Versions’ - if they work - until the necessary skills/tools are developed over a LONG career to ‘revisit’ the project later.

Note: If you needed a good ‘Project’ to practice with - this seems like a good one.

Yeah - like you, I find myself re-visiting a bunch of my earlier projects. Why, oh why, would I have done it like that in the first place?

1 Like

That’s what happens when the Geriatric Fiddlers arrive… memory lane.

I too am remembering the many ‘failures’ that got us where we are today.

How lucky is @liammiller ?
I wish I had us around when I was standing in a pitch black room full of Grues - with no Lamp…
(if you get that reference - you’re ancient - perfect material for membership in The Geriatric Fiddlers)

:wink:

Wow you guys - super useful information! Thank you so much.

Of course the result I’m going for is the more difficult option - I don’t want to be cropping anything.

I worked in the motion picture industry for 10 years and seriously considered just pushing these videos together in a NLE system and I may still attempt that, however the rendering process is what kills me. As @JuiceWSA and @leelynds have both commented - I’d prefer something quick and dirty. It’s likely this video will be something that only I will be enjoying on my server. Seeing that I don’t have a DVD player anymore I’m just wanting to digitize my library and preserve them the best way possible before they go into a box in a closet.

Gonna play with the suggested ideas and circle back! Cheers :smiley:

2 Likes

That’s the key. There is no pressure to get it right (before you send the DVD back to Netflix).

Just yesterday, in fact, I progressed into the first Family Guy Star Wars Parody - Blue Harvest. I noticed the encode wasn’t up to the ‘current standards’ so out the DVD came, 5 minutes in MakeMKV and 10 minutes in Handbrake and I had a ‘Current Version’.
(My DVD Player blew up 7 years ago with ‘Fried Green Tomatoes (1991)’ in it, is still in it, and if I cared I’d get that DVD out of it, but it’s holding up the TV and I don’t want to have to re-arrange the wire jungle).

No pressure.

Ok, so I’ve added the two files and added -part 1 and -part 2 – they play perfectly and the chapters remain intact.

However, now my Extras (-other) have doubled up. Is there something I’m missing here? Is having a -part 1 and -part 2 messing with how plex is seeing the extras I’ve added? In the directory there’s only one instance of each extra.

*Edit - scratch that. I deleted the directory and just re-added the files and it seems to have cleared it up.

Glad you found a suitable method.

Regarding your extras:

Things will be fine with stacked versions in the folder with the extras.
IF you have more than one ‘version’ (4K/1080p, for instance) that MUST go in a folder outside the folder with the extras and furthermore if you have extras and versions, the folder with the extras and that version MUST be indexed first. Versions go on after and do NOT go in the same folder with the extras.

That’s not in the handbook.
That comes from a night class on ‘Disappearing Extras’ at the university of Hard Knocks.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.