Announcement

Collapse
No announcement yet.

Divx question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Divx question

    I've recently started messing around with the Divx codec, but I can't seem to get it to look as good as what others are doing. I was wondering if someone wouldn't mind passing along the keyframe interval, and Kb/s you have it set to.

    Also, is it better to do realtime compression (I'm running a PII-400) or to capture to MJPEG first and recompress later?

    Thanks,
    John


  • #2
    Hi gibverse.

    I'm running a P3-500 and if I try to run DivX real-time, the best I can get is about 320x240 at 15 fps. Anything more and I start dropping lots of frames. Therefore I tend to capture in MJPEG and convert.

    The default settings in the Divx codec (910 bandwidth, 1 key frame every 10 sec) tend to give me good results, but if you have a short clip you'd be better off making it 1 key frame every second. I find 3000 is also a good number to chose instead of 910 for higher quality.

    Adjusting the slider from crispness to smoothness also makes a bit of a difference, depending on what kind of scene you have to compress.

    Overall, I'm really impressed with the Divx codec, low file size, great quality.

    - Aryko

    Comment


    • #3
      Aryko, thanks for the info. I capture to MJPEG, and am now trying to render to Divx AVI, but I still can't come close to what I see others doing. Specifically, the trailers on http://divx.ctw.cc/Trailers.html
      The Bullitt trailer looks great, and only uses 4.1MB/min!! That's insane! I want that (sorry for sonding like a 2 year old). Does anyone know what I'm doing wrong? My renders wind up taking like 7-9MB/min, even at the lowest I can go.

      Thanks,
      John

      Comment


      • #4
        Transcoding from MJPEG to MPEG4 (DivX) is really a bad idea because they use entirely different noise reduction and motion compensation schemes. If you want high quality DivX, you need to transcode from raw RGB or YUY2, or capture straight to DivX. My P3-500 will capture 352x240x29.97 DivX just fine... are you using the YUY2 hack? It is really difficult to capture to DivX in real-time without YUY2...


        another key to getting DivX down to 4.1MB/min is audio encoding... don't use PCM, it is large and wasteful... use MP3 audio compression.... and also since DivX uses a variable bitrate, it is hard to predict how big the finished encoded file will be... I encoded a 127 min (640x256x23.976) clip at 900kbps and it was only 400MB and then I encoded it at 1200kps and it was only 460MB... so it is hard to tell....


        hope this helps

        Garrett
        RBryant

        Tyan 1952DLU Thunder X
        2 PIII Xeon 500Mhz (512k)
        1 512MB ECC PC100 DIMM
        Adaptec AAA-133U2
        3 18 GB U2W Cheetahs
        Jaz 1GB
        UltraPlex40Xmax CDROM
        PlexWriter 8/20 CD-R
        Pioneer 6X DVDROM
        G400 Max
        Rainbow Runner-G
        Obisidan X-24
        ViewSonic P815
        SBLive!
        Cambridge Soundworks 5.1
        3COM 3C905B-TX
        Addtronics 7896 w/12 Fans
        Mitsumi Wireless RF Kbd
        Logitec Opt. Wheel Mouse
        1.5M/256k ADSL
        Trusty Ol' Floppy

        Comment


        • #5
          RBryant,
          Yes, I'm using the YUY2 hack, and it captures at realtime on my PII-400, but its just a much larger file. Also, in MSP 6, I can't find how to have it compress the audio. My only option under audio format is PCM.

          I was using 24fps, I'll drop down to 23.976, and see what I can do without any audio until I can figure out how to get MP3 to work with Ulead.

          Out of curiosity, what capture program are you using. I don't see how that would make a large differance, but maybe Ulead's messing with the works... Should I try AVI_IO or VirtualDub?

          Thanks for all the help,
          John

          Comment


          • #6
            RBryant,

            This sounds very interesting: what do you know about motion compensation and noise reduction in MJPEG? I suppose there is no motion compensation and no noise reduction at all. MJPEG does not use temporal compression.

            Mjpeg output stream after decompression is definitely YUY2 originally. Mpeg4 input data can be either YUV of several formats, or RGB.

            So, both formats are very well suited to each other.
            What is bad:
            1. mjpeg compression artefacts, even if they are are not visible. These artefacts introduce some high frequency image components that are difficult to compress.
            2. YUY2-RGB-YUY2 conversion while you compress from MJPEG to MJPEG or MPEG4. This process gives some image quality (colors distortion) loss too.

            The influence of artefacts is easy to see:
            1. Make uncompressed movie.
            2. Compress it to mjpeg

            Make mpeg4 (or mpeg1/2 with VBR if you like) movies from 1 and 2 using the same compression settings. The movie 2 will have higher datarate, which indicates that it is more difficult to compress. This is true for any compression codec, not specifically to mpeg4, of course.

            However, if you want to EDIT captured video, mjpeg may be better. The recompression from mpeg4 to mpeg4 on transitions may produce bad distortions.

            Grigory

            Comment


            • #7
              I find myself using AVI_IO for captures (I switched something in Virtualdub and now it doesn't capture smoothly any more). Set it at 29.97 and I don't drop a single frame. A really sweet program and well worth the cost of shareware.

              For processing, I use Virtualdub to process the video and audio streams, although I'm sure there's a setting in MSP5.2 to change the audio compression.

              - Aryko

              Comment


              • #8
                Don't use Mp3 for live capture, use ADPCM. That's what I use and it takes NO CPU resources at all to use. Here's what I am doing right now: 1. Decss .Vob's to HD. 2. Demacro .Vob's. 3. Load up station and play .vob's so that they output from my decoder card into the input of my WinTv Card. 4. Load up Virtualdub and Capture. 5. Capture in Mpeg4 V2 with Data Rate at FULL. Audio set to PCM 48kz Stereo. 6. Once the Movie is done I then recompile the movie with Mpeg4 V2 but then I either shorten the Data Rate and/or use Mp3 for the Audio. Oh yeah I am capturing at 320X240 at 29.97fps in YUY2 and I and currently putting all of my DVD's onto CD. I am trying my best not to use DivX and to just use Mpeg4 because Mpeg4 kixs ass!
                C:\DOS
                C:\DOS\RUN
                \RUN\DOS\RUN

                Comment


                • #9
                  Well, I played around with this some more. I don't think MSP 6 can capture audio to anything but PCM (guess its like AVI_IO). I tried VirtualDub, but it crashed like a rock.

                  When I captured with AVI_IO, using the same settings as MSP 6 (no audio in either), the AVI_IO capture is on avg half the size. I repeat, the same bitrates, frame size, keyframe intervals, yet AVI_IO captures MUCH smaller. This may be a glitch with MSP, haven't looked into that much yet.

                  I do have 98 lock up on me while capturing after a while with Divx. I'm not sure if this is similar to my crashes using GoMotion, but it does crash. The differnece is I can get around 20-40 minutes with Divx, luck if I get 1 with GoMotion. I'm getting the feeling that I'm pushing this PII-400 a tad too much.

                  DosFreak, I'm capturing via the inputs, not riping a DVD. However I do like the idea of capturing with PCM (so I can use AVI_IO) and then just recompressing the audio portion of the AVI.
                  BTW, Divx is MPEG4, just a differnet flavor. There was a discussion about this a few days ago as I recall.

                  One last thing, I've been setting my frame rates to either 23.976, 24 or 25 fps, even though I'm grabbing from an NTSC (29.97) source. Could this be the problem? I was dropping the framerate to save size, but I can alwasy bump it up for the capture, and drop the rate afterwards.

                  John

                  Comment


                  • #10
                    Your saying that your experiencing lockups? You really shouldn't be. I first started experimenting with video capture in NT5 and then just for the heck of it I tried video capture in Windows Millenium. YUK! In Windows Millenium CPU usage jumped through the roof and I was dropping frames like crazy! So I am definetly sticking with video capture in NT 5! Also I have my P3-550 overclocked to 630. I noticed that when I was recompiling my .AVI's my system would spontaneously reboot. So I just bumped the voltage from 2.0v to 2.05 and it's rock solid now!
                    C:\DOS
                    C:\DOS\RUN
                    \RUN\DOS\RUN

                    Comment


                    • #11
                      I tried capturing to DiVX via RGB16.
                      my HD can only get 10mb/s.
                      anyways, in virtualdub, I always get dropped frames. I have to go down to 15fps
                      it works perfectly in AVI_IO 352x240@29.97
                      what I dont understand is why it takes so long to encode a divx from an existing file, yet it can encode realtime just fine.

                      Comment


                      • #12
                        Are you scaling the output while doing the DivX encoding? That takes far more time than just compressing the video.

                        Dr. Mordrid

                        Comment


                        • #13
                          no. from a MJPEG to DiVX takes forever. 7-8 frames per second for 704x480@30

                          anyways, how do I enable YUY2 in Win2k? I know I was able to do it once, but I dont remeber how.

                          also, how do I figure out what the transfer rate for a HD will be? If I get a diamondMAX40, does that mean the datarate will be 40mb/s because thats what it says on their website? my IBM drive says it should be 20mb/s, yet it is only 9. of course that is my windows drive. but my maxtor drive says its only 11, yet on the website it should be 20mb/s, and I'm not using it for anything else.

                          [This message has been edited by Enrico Ng (edited 18 June 2000).]

                          Comment


                          • #14
                            First off are you measuring your throughput using the Matrox HD Benchmark? If so the results are unreliable.

                            Download the shareware SANDRA benchmarking utility at;

                            http://www.sisoftware.demon.co.uk/sandra/

                            Its disk benchmark is far more accurate. Use the sequential write and reads as your measure, not the composite figure at the top of the result page.

                            I have found that the DiamondMax Plus 40's deliver 19-20 megs/second sequential writes consistantly.

                            This will be likely be lower with the VIA chipped mainboards as their PCI performance is less than the Intel chipped boards. I'm testing on an Asus P3B-F.

                            Dr. Mordrid


                            [This message has been edited by Dr Mordrid (edited 18 June 2000).]

                            Comment


                            • #15
                              Do you know how those 7200RPM IBMs do?
                              I'm debating wether to get a 7200IBM (22GXP or 34GXP) or a diamondmax40

                              Comment

                              Working...
                              X