Hello!
Often I get various video files with unstandart aspect ratios and I need to bring them to the standart ones by adding black borders on the edges of the frames.
I understand that any modification in the video frames requiers reencoding, because technically they become new frames and compressions alhoritms have to be computed for them again.
This is 100% necessary when we modify the frame itself (put an image or some text above the frame), but concerning black borders on the edges I don't sure, here is why:
In this case, We don't need to put any changes in the data inside the frames, the video data inside the frames could be left unedited, just the rest parts of the frame would be filled with zeros in the raw representaion.
One fact which has lead me to this idea is that when you try to add borders in AviDemux and then click the preview button you will see the final results.
You can play the video with boreder filter applied, rewind it in realtime (!!!) and it works pretty smooth withoud any frames dropped even on my low power laptop -
Everything looks like the job is already done!
So why have I do the full reencoding and spend a lot of time on it? The question is:
Is there any method to add or remove black borders witout reencoding?
+ Reply to Thread
Results 1 to 11 of 11
-
-
Not permanently, no. You can do it in other ways, though. For example, most software players will play AviSynth scripts, like so:
AviSource("Movie.avi")
Crop(0,60,0,-60)###to crop away (remove) black borders
#AddBorders(0,60,0,60)###to add black borders above and below a video
I don't use AviDemux, but I suspect it's doing something very similar (or identical) when you can play the preview. I can open that script in MPC-HC if I want to play it with black borders added or removed. -
-
@pandy: care to share some names of tools which allow to crop without reencoding?
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Proprietary tools used by companies developing codecs and associated business areas.
Decoding is unnecessary to operate in frequency domain (only DC coefficient, remaining AC coefficient equal to 0) at macro block level and as such if you can add/remove macroblock then you meet not re-encoding criteria. -
So only 'inhouse' self written tools. I knot that in theory this is possible, but I have never seen a tool (proprietary or not) that could do this and produce a still decodable output stream for a MPEG-4 based codec.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Well so called re-quantizers are same type tools - some of them are available as open source? - DVD shrink, some are used in broadcast ("smart" multiplexers). Adding or removing defined macroblocks seem to easier than re-encoding.
I saw tools used to generate synthetic bit streams where no spatial data was used at all (macroblocks, motion vectors, other aspects was defined parametrically). -
Well so called re-quantizers are same type tools - some of them are available as open source?users currently on my ignore list: deadrats, Stears555, marcorocchini
-
Some containers (MKV) allow you to specify cropping values in the header (use MkvToolNix to add them). Some players respond to those flags (MPCBE) but most don't.
-
I think this was obvious - MPEG-2 required expensive and somehow problematic dual layer DVD discs where MPEG-4 ASP and later H.264 didn't required this thus no need for such thing but as principle stays unchanged - technically feasible and nobody except rare cases need such tools.
I must say that sadly but i have almost zero coding skills thus can't provide such tool...
Similar Threads
-
My Premiere Pro exports give me little black borders on the top and bottom
By CZbwoi in forum EditingReplies: 138Last Post: 9th Nov 2016, 09:32 -
Remove black borders from DVD without loss
By DavidGGG in forum DVD RippingReplies: 15Last Post: 28th Oct 2015, 12:18 -
Changing the resolution of MP4 video by adding black band to top and bottom
By Crea in forum Video ConversionReplies: 10Last Post: 15th Aug 2015, 17:18 -
Add black title to bottom only for subs?
By strophy in forum SubtitleReplies: 8Last Post: 12th Mar 2015, 22:37 -
Remove Black Borders From Movie Video
By anime12345 in forum Video ConversionReplies: 11Last Post: 27th Jan 2015, 20:40