VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. 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?
    Quote Quote  
  2. 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.
    Quote Quote  
  3. As Manono said, you can use an Avisynth script (or one of the newer script languages) with an appropriate software player, or use crop/zoom if available in the player and/or TV you're watching on.
    Quote Quote  
  4. Originally Posted by November View Post
    Is there any method to add or remove black borders witout reencoding?
    Yes (with some limitations) but you can't buy or download such tool easily.
    Quote Quote  
  5. @pandy: care to share some names of tools which allow to crop without reencoding?
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  6. Originally Posted by Selur View Post
    @pandy: care to share some names of tools which allow to crop without reencoding?
    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.
    Quote Quote  
  7. 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
    Quote Quote  
  8. Originally Posted by Selur View Post
    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.
    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).
    Quote Quote  
  9. Well so called re-quantizers are same type tools - some of them are available as open source?
    Sadly I only know of re-quantizer tools for MPEG-2 not MPEG-4 content.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  10. 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.
    Quote Quote  
  11. Originally Posted by Selur View Post
    Well so called re-quantizers are same type tools - some of them are available as open source?
    Sadly I only know of re-quantizer tools for MPEG-2 not MPEG-4 content.
    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...
    Quote Quote  



Similar Threads