Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
15th June 2020, 16:40 | #1 | Link | |
Registered User
Join Date: Sep 2006
Posts: 2,197
|
At which step does AddBorders get applied?
I want to crop parts of a movie, encode it and add black bars again afterwards because Intro and End are full frame and I cannot have different ARs within the same file.
so what I would like to be able to do is Crop -> encode -> Addborders all within the same encode. Is this possible? E.g. with Quote:
__________________
Laptop Lenovo Legion 5 17IMH05: i5-10300H, 16 GB Ram, NVIDIA GTX 1650 Ti (+ Intel UHD 630), Windows 10 x64, madVR (x64), MPC-HC (x64), LAV Filter (x64), XySubfilter (x64) (K-lite codec pack) |
|
15th June 2020, 16:57 | #2 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Nope.
__________________
Groucho's Avisynth Stuff |
15th June 2020, 17:01 | #3 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
If it can be done, then can crop in Avisynth, and addborders using eg ffmpeg during encode, no idea how to do that. [perhaps x264 can also add borders, dont know]
Avisynth only processes uncompressed video/audio, nothing whatever to do with encoded clip. Simplest would be to just trim into 3 parts, intro, main, exit, and use crop/addborders on main, however LetterBox is better option than crop/addborders, does it in single step, and faster. And of course splice before encode eg Intro ++ Main ++ Exit.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
15th June 2020, 17:08 | #5 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
I was referring to this:
I'm rather sure that this is impossible with any encoder. However, I'm certainly not the source of all knowledge...
__________________
Groucho's Avisynth Stuff |
15th June 2020, 17:16 | #6 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
anyways, qyot27 seems to have it well sussed out. EDIT: Crap, gotta run like hell to try catch shop open.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
15th June 2020, 18:26 | #7 | Link |
Registered User
Join Date: Sep 2006
Posts: 2,197
|
unfortunately my smart TVs cant deal with linked chapters or ordered chapters in matroska.
__________________
Laptop Lenovo Legion 5 17IMH05: i5-10300H, 16 GB Ram, NVIDIA GTX 1650 Ti (+ Intel UHD 630), Windows 10 x64, madVR (x64), MPC-HC (x64), LAV Filter (x64), XySubfilter (x64) (K-lite codec pack) |
15th June 2020, 18:40 | #8 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,420
|
The thing you're essentially asking for is either a variable resolution file (which arguably *might* be possible with MKV, but most probably not; MPEG-2 TS can get around it via streaming chunks, where each chunk can have its own resolutionı), or variable anamorphic flagging per-frame/GOP (which AFAIK, nothing supports). Capable software or hardware players will do auto-letterboxing/auto-pillarboxing if the AR of the video doesn't match the display AR, but to have resolution changes in a single file one of the segments has to be hard letterboxed/pillarboxed beforehand, and that cannot be done at playback, it has to be done before encoding.
ıyes, this is what happens when watching an online stream from TV broadcasters, at least in the US. The main program may be a constant resolution, so long as your internet connection is good, but the advertisements can vary wildly. If you're not careful, a stream downloader could bork your output file if you don't compensate for this. So either you fix the sections of the video using Trim so you can keep the 4:3 content untouched while letterboxing the 16:9 parts (or Trim so you can pillarbox the 4:3 sections and leave the 16:9 ones alone) and Splice them back together at the end of the script before giving the script to the encoder, as StainlessS suggested, or you can have the segments as separate files with their own properties and attempt to do whatever is possible to make it seamless on playback (if being played off a USB stick, just having the files named sequentially might trick the TV enough to be passable, with a pause between the segments being more/less noticeable based on the TV...if the TV is set to just autoplay the next file and not go back to the file menu). If MKV won't work for the purpose, you're probably out of luck. A playlist file is a dumb measure that, again, a TV probably can't handle, and probably won't be seamless even on a computer. |
15th June 2020, 18:57 | #9 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,420
|
Example of a 640x480 video with 4:3 intro/outro and 16:9 hard-letterboxed main segment, switching it to a 16:9 848x480 video so the main segment looks correct on modern TVs, with the intro/outro pillarboxed:
Code:
v=FFMS2("input",atrack=-1) v1=v.Trim(0,5000).AddBorders(104,0,104,0) #adds pillarboxing to sides of 640x480 video to make it 848x480 v2=v.Trim(5001,25000).Crop(0,64,0,-64).BilinearResize(848,480) #crops existing letterboxing from 16:9 segments, resizes to 848x480 v3=v.Trim(25000,0).AddBorders(104,0,104,0) #adds pillarboxing to sides of 640x480 video to make it 848x480 v1 ++ v2 ++ v3 #puts all three segments back together Last edited by qyot27; 15th June 2020 at 19:03. |
|
|