View Full Version : Multiple video sizes in the same source
click2
5th August 2008, 08:43
I'm trying to encode the music videos from placebo's Once More With Feeling DVD. The plan is, I want them all to total to 700MB, with both audio tracks. Codec not important; I was thinking 264/aac in mp4, but I may try VP7 for my amusement.
The complication arises from the fact that each video has a slightly different aspect ratio so there are differently-sized black bars every few minutes. I'm loath to just encode these in, but I have all the time in the world and would like to get my 700MB allocated over all the videos in a fair two-pass manner, as if i were encoding a regular DVD.
Avisynth won't let me concatenate videos with different sizes. What would be the best way of going about this?
setarip_old
5th August 2008, 09:19
Hi!
1) In light of the fact that burnable DVD media costs as little or less than than burnable VCD media, why would you want to limit the combined filesize to 700Mb?
2) You could, instead, use (freeware) DVD Flick or trial version of TMPGEnc DVD Author 3 to create a DVD with a simple menu - with each video as a separate TITLE. This would eliminate the need to concatenate the files
click2
6th August 2008, 01:31
Thanks for your reply, but I'm not really interested in backing these up; as i happen to own the original DVD, this is just for my personal interest. Thus the price of media is irrelevant, and 700MB is an arbitrary limit that i happen to be quite fond of.
Is it possible to allocate my 700MB fairly over all the differently-sized videos, without encoding black bars?
Peer van Heuen
6th August 2008, 12:41
Thanks for your reply, but I'm not really interested in backing these up; as i happen to own the original DVD, this is just for my personal interest.
Doesn't the term "backup" imply exactly that: that you own the originals?
Or did the "secondary" meaning of "backing up" get promoted from being just a euphemism for piracy? :D
...sorry, I couldn't resist that little side note
Thanks for your reply, but I'm not really interested in backing these up; as i happen to own the original DVD, this is just for my personal interest. Thus the price of media is irrelevant, and 700MB is an arbitrary limit that i happen to be quite fond of.
Is it possible to allocate my 700MB fairly over all the differently-sized videos, without encoding black bars?
...but as an answer: what would you actually expect the videos to look like, if not adding black bars?
You have some options, like resizing and cropping, but whatever you do - if the result is supposed to be one video, you'll have to decide for an aspect ratio.
click2
6th August 2008, 13:21
The first response to anything here seems to be 'did you pirate it?' (i thought i'd made it clear that everything's above board). I want a separate aspect ratio for each individual music video, such that the result would be split over several files. I could use the DVD's aspect ratio, but that would mean including black bars, and wasting bits, which i don't really want to do.
Is it possible to allocate my 700MB fairly over all the differently-sized videos, without encoding black bars?
CWR03
6th August 2008, 13:30
The easiest way I can think of is to encode the individual videos at their correct AR with one pass, dividing the running time of each video segment by the desired overall bitrate, then creating a playlist for those files. This is assuming you want something playable on a PC or a standalone player.
Sharktooth
6th August 2008, 14:33
easy, if you have the original videos resize/crop them at the same resolution and then concatenate them. that's all done within an avisynth script.
use something like:
[code]#clip1
clip1 = SomeFilterSource("clip1.blah", ... options...)
clip1 = clip1.Crop(**,**,**,**) # if needed
clip1 = clip1.AnyDesiderResizer(xxx,xxx)
#clip2
clip1 = somefiltersource("clip2.blah", ... options...)
clip1 = clip1.Crop(**,**,**,**) # if needed
clip1 = clip1.AnyDesiderResizer(xxx,xxx) # same res as clip 1
#clip3
.... same as above
clip = clip1+clip2+clip3..........
return(clip)
click2
6th August 2008, 23:16
The easiest way I can think of is to encode the individual videos at their correct AR with one pass, dividing the running time of each video segment by the desired overall bitrate, then creating a playlist for those files. This is assuming you want something playable on a PC or a standalone player.
CWR03: This is what i mean, except doing this with two-pass; i think just dividing the running time of each video segment by the overall bitrate wouldn't apply for a two-pass encode, as some videos have higher motion, complexity etc than others, so just dividing the bitrate wouldn't be entirely fair.
If that's the easiest way, is there a harder one?
Sharktooth: This involves having them all end up at the same resolution, which isn't what I want, although it brings up the possiblity of resizing everything back afterward... this would give a reasonably accurate two-pass encode i suppose, but then i'd have to make them back to normal sizes, which would be equally problematic.
LoRd_MuldeR
7th August 2008, 01:57
Well, if you capture MPEG-2 from DVB-S, you often see the Aspect Ratio switch from 4:3 to 16:9 or vice versa within the same file.
Of course the resolution remains the same, only the PAR (Pixel Aspect Ratio) changes accordingly.
I don't know if/how that can be done with H.264, but in theory you could simply change the DAR for each video/segment.
This way you could encode all videos at the same resolution (without black bars) and still display each video at the correct aspect ratio.
foxyshadis
7th August 2008, 05:44
Run the audio first - subtract its size A from 700MB, call this V. If you're backing up to x264, use the same CRF on everything. You should even be able to use fairly fast settings to get a good estimate. Once they're done, compare relative sizes, and use those ratios to fit them into V, then calculate the bitrate each will need and run each 2-pass with that bitrate. Alternately home in looking for a CRF that'll get you on the money, but that could take a lot longer. You can substitute constant quant for xvid.
For VP7 you have to specify a bitrate, iirc, no way to do that without a lot of ABX testing.
You can only futz around with AR changes as Mulder says by concatenating already-encoded files, and even then many software players don't like it, so you still have to go through the procedure.
click2
8th August 2008, 03:49
LoRd_MuldeR: I was considering something like this, but the source has encoded black bars, so to start with i'd have to crop those and scale everything to the same size, which on second thoughts would be pretty much fine
[EDIT: As a matter of fact, i remember what i didn't like about this; scaling the very wide videos to be tall allocates them bits they didn't have in the first place, that would otherwise be shared amongst all the videos; and the point of this exercise is to allocate the bits as fairly as possible..]
foxyshadis: This is pretty much what i was looking for, thank you very much. If i could be bothered, would finding the exact CRF produce a better result than the split 2-passes (noticable or otherwise)?
Peer van Heuen
8th August 2008, 09:17
The first response to anything here seems to be 'did you pirate it?'
Sorry, for that misunderstanding, I think everyone here got it that you're not pirating (then again, even my good friend Blutach seems to have gotten a hiccup from this :D ).
I just found the irony in you using "backup" as a synonym for "pirate" irresistible. After all (now being cynical) so many here are carefully using the word "backup" to imply they are NOT pirating - and your "reassignment" of that word sort of is as much as a "yeaah, sure, you're 'backing' up...." :)
Ok, enough of this already...
LoRd_MuldeR: I was considering something like this, but the source has encoded black bars, so to start with i'd have to crop those and scale everything to the same size, which on second thoughts would be pretty much fine
Just one additional thing, you might take into account if everything else gets too tricky: people usually overestimate the impact of the black bars on compression size.
It's actually close to NIL.
So if you're only about removing those black bars for that reason, you might as well consider not considering it :)
The black bars really get compressed down to pretty much nothing - it's a constant area with no changes, MPEG and Co. just love that sort...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.