VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    i have a ton of xvid clips i encoded. some in 4:3 and others in 16:9 ratios

    i searched around google and found a few methods/tools to accomplish. some methods work and others (ie ffmpeg) do not, while the ones' that do work are combersome to do, whether on single or multiple files. its getting tiresome now. currently using mpegmodifier for this. plus, re-writing the avi file seems waistfull. so, i want to write something similar to what i wrote for the hauppauge hvr-1600 card where i corrected problem with opening the mpeg file and without re-writing a new mpeg.

    now, i just need something faster and easier to do, like an on/off batch switch or obtain from a list and i just check off what i want to changed on the fly. what i will write for the tool, is the user (thats me) will drag the initial file into its window and whatever (avi) files are in folder, this way the files are always at fingertips.

    so now i'm digging through the avi via hexing around (vdub) but that is also clumzy. i am not sure where this info is written. i am thinking that will have custom write a tool to open two files in binary format and do a quick compare/stop and show some data, etc., until i find what i'm looking for.

    does anyone know where inside the avi file this info is kept ?

    thank you in advanced.
    Quote Quote  
  2. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by vhelp View Post
    ...
    does anyone know where inside the avi file this info is kept ?
    ...
    Assuming you mean the container and not the mpeg-4 bitstream:

    Originally poted by Alex Noe

    The Open-DML AVI standard includes a VIDEOPROPERTYHEADER for video streams, which allows to indicate the output resolution in the sense of Matroska's DisplayWidth and DisplayHeight elements.

    The problem is that DirectShow does not read those values (at least the DirectShow documentation does not mention support for this feature). MPEG4 has an aspect ratio stored in the bitstream as well, and ffdshow as well as a few other decoders use this aspect ratio, raising the wrong impression that anamorphically encodec video would properly work in AVI. But truth is, AVI is as unsuitable for anamorphically encoded video as OGM.
    currently using mpegmodifier for this
    It's amazing, the year is 2012, and so far nobody has "translated" MPEG4 Modifier to a serious language such as C or C++.

    Quote Quote  
  3. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    unfortunately, i know nothing about bitstreams let alone calculating/decoding them. i don't know if working with bitstream means bit-shifting a byte within the bitstream or something else. but if i knew where it was i would probably be that much closer. then i could take two very short clips and compare them (the bit-streams) to see what is different about the two, be it a byte or bit or group/range.

    i d/l'ed the soruce to mpeg4modifier, knowing it would be c-something, and knew i wouldn't understand it let alone the mind of the person who wrote the routines, even just the routine for dealing with the aspect ratio in the bitstream. it seems to be the MPEG4FrameModifier.cs file. i search quickly and found many places dealing with aspect ratio this and that.

    i have two vdub hex window opened on two clips..the clips being 16x9 and 4x3 encoded. i'm going cross-eyed looking at it. impossible to find difference this way. next i'll re-encode the two clips to something much smaller size,like 30 frame or less. i only need to see internal details, not video quality/playback. so the only alternative is to custom write something for doing this.

    i'm still googling.. . .. .
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    vhelp,

    What you might want to do is create a short (10sec?) piece of BLACK video. Set it to 720x480. Encode it with Xvid twice from this same source: once as 4:3 and once as 16:9. DO NOT change anything else in the encoder settings (framerate, bitrate, GOPlengths, quality, etc).

    Then you'll actually have something to compare via hex editor (for the bitstream info).

    You might also want to look up something known as a "RIFF viewer" which will show the encapsulated (aka "chunk") style structures within the container file.

    Scott
    Last edited by Cornucopia; 1st Feb 2012 at 04:38.
    Quote Quote  
  5. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    thanks for the tip about encoding a 'black' scene, thats a good idea..didn't think of that. might help. about the riff structures...you can turn that feature on/of in vdub's hex utility menu. once you scroll around in the right pane the status bar text will update to the actual field name of the riff.

    el huggunte was correct in that its a bitstream thing--not an avi container. in my initial google searches, i saw reference to a dwPictAspectRatioX/Y and thought it was a simple thing to look up in an avi and make quick updates to, then some more google searching turned up info that it is a function of ms wmv format, not old xvid/avi. i'll play around with some more searches and ideas and decide where i want to go next. bitstream details is not my forte but i'll give it a try at least.
    Quote Quote  
  6. Create two files with Mpeg4Modifier, one 4:3 the other 16:9. Then

    fc/b file4x3.avi file16x9.avi

    Click image for larger version

Name:	hex.png
Views:	585
Size:	123.5 KB
ID:	10760

    But in the end, you're going to have to parse the AVI structure and xvid video structure if you're looking to properly patch files yourself.
    Last edited by jagabo; 1st Feb 2012 at 21:12.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!