Announcement

Collapse
No announcement yet.

Dr Mordrid - Matrox MJPEG compression hack?

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

  • Dr Mordrid - Matrox MJPEG compression hack?

    Doc,

    A while back you mentioned in a thread how to change some registry settings for the G400TV so as to capture at a higher quality/lower compression ratio in PC-VCR than what was selectable. I think you offered something that gave a 3:1 compression ratio or something like that.

    What I want to do is the opposite - I want to capture at a higher compression ratio/lower quality than is offered in PC-VCR (10.3:1 at 352x288)

    Why would I want to do that, you say? I am capturing tv shows mainly, especially documentaries, and then burning them to VCD. The quality isn't that important to me, I'm watching it on a 30 year old Rank Arena TV. I just need them to be VCD compliant for my Akai DVD player.

    On the station that plays these shows, a documentary runs for about 55mins, no ads, and at the lowest quality compression 10.3:1 at 352x288, PC-vcr reaches the 2 gig mark (Win98SE) at about 47 min, and then restarts another capture. When I try and paste them together in VirtualDub, there is a small gap of missing footage, but worse still, sometimes VDub cannot append them because the frame rate changes ever so slightly between the 2 captures. So I have to do my joining post-mpg in TMPGEnc, which is fiddly etc. If I can capture the show in 1 take, it would speed up the processing procedure considerably.

    Is it possible to do a registry hack like you did, but for higher compression? Or is greater than 10.3:1 outside the the hardware specs for the Zoran chipset?

    If it isn't possible, I could do software MJPEG capture, if its compression ratio can be varied enough - I have the PICVideo MJPEG codec, but have only used it post-capture. I have heard about doing it. What is the procedure, and what tools and programs do I need? I'm not sure if my system is fast enough to do it (P3-450), although I'll only be capturing at VCD PAL resolution. My matrox HD benchmark result is 11.98MB/s

    Thanks,
    Graham


    Setup:

    Windows 98SE
    P111 450
    Gigabyte BX6E motherboard
    Seagate 20.4G Barricuda
    LG 8400B CDRW
    Creative 48x CDROM
    256MB RAM
    Marvel G400-TV
    Creative AWE64G sound card
    Turtle beach Malibu sound card

    Powerdesk 5.25
    Video Tools 1.51
    VirtualDub 1.4d
    HD benchmark result 11.98MB/s

  • #2
    MJPeg isn't your best option.

    Get the latest Win9x drivers that have YUY2 enabled (or apply Flying Dutchmans patch to those that don't) and capture using the DivX codec and the AVI_IO capture tool.

    With those installed set up AVI_IO to use YUY2 and the 352x288 frame size as the FORMAT and the DivX codec as the COMPRESSION & save the settings. Set the audio setting to one of Matrox's standard settings. You can opt to use the default 15 fps and still get decent DivX playback, but with lower audio quality.

    Once you get your feet wet a bit you can play with the DivX parameters to tune your settings. You'll get very small files & higher quality than MJPeg at the same bitrate.

    Now that you can capture set up the G400's DualHead/DVDMAX options to scale to the source and to use frame based video when playing back DIVX files. The output will go to your TV at higher quality than you would expect, but you will have to use the Playa DivX player and not MediaPlayer.

    Because of the use of source scaling any 16:9 DivX movie downloads you get *should* automatically letterbox on a 4:3 TV.

    Dr. Mordrid

    Last edited by Dr Mordrid; 2 December 2002, 00:40.
    Dr. Mordrid
    ----------------------------
    An elephant is a mouse built to government specifications.

    I carry a gun because I can't throw a rock 1,250 fps

    Comment


    • #3
      Thanks, Doc! DivX never even crossed my mind for a capture codec I've always used it post-capture compressing. As for watching it on the TV via the TV out, that's not a concern, as I'll be TMPGEnc'ing it to mpg VCD for DVD player TV viewing anyway.

      Cheers, Graham

      Comment


      • #4
        DivX captures at a bit lower quality than it encodes from another format unless you have a fast enough system to use the higher quality settings.

        But hell....if you're going to MPEG it anyhow.....

        Do you happen to have a copy of VideoStudio or MediaStudio about? Their capture modules can use the YUY2 capture mode and compress the stream to MPEG on the fly. They even have VCD presets.

        Now it's my turn to DUH!! I just noticed that you have a PIII/450.

        That may or may not limit you a bit with DivX. You'll have to try it for yourself since my systems are much faster than that and DivX as we now know it wasn't around when I did have systems that speed.

        VCD MPEG shouldn't be a problem though. I've done VCD captures with VS and MSP with as low as a Celeron/466, and that system only had a 66mhz FSB and 128 megs of ram vs. your 450mhz/100fsb/128megs.

        Dr. Mordrid

        Last edited by Dr Mordrid; 2 December 2002, 00:51.
        Dr. Mordrid
        ----------------------------
        An elephant is a mouse built to government specifications.

        I carry a gun because I can't throw a rock 1,250 fps

        Comment


        • #5
          I just tried software codec capture using VirtualDub and the early Divx3.11 codec I had lying around on my system, and at 352x288, it worked fine. I started as a default setting, about 50:1 compression, and it looked fair quality, a bit fuzzy, but I only need about 15:1, so I'll try that and see how the quality is at that ratio - I presume the less compression->less CPU load. This will give me about 1 hour of capture, which is perfect. My P3/450 seemed to handle it OK, no dropped frames or sound out of sync in the quick test I did. I'll have to also try the latest DivX to see the results.

          But the biggest wild card was using the PICVideo codec. Once I could get my G400TV to let me use the DivX, then using PICVideo was easy. The results looked great!! Even at quality setting 12 (about 20:1 compression), it looked 95% as good as the Matrox hardware MJPEG at 10:1. I'd almost get a whole 90 min movie at that rate in one capture! As I'm only capturing free-to-air programs with a reception that can be dubious quality anyway, onto VCD to be viewed on a 30 y.o.TV set, I'm pretty happy with the result

          Thanks Doc for your help,

          Graham

          Comment


          • #6
            We aims to please

            Dr. Mordrid
            Dr. Mordrid
            ----------------------------
            An elephant is a mouse built to government specifications.

            I carry a gun because I can't throw a rock 1,250 fps

            Comment


            • #7
              I've brought this old thread back to life because I would be very interested in lower compression rates for the RRG hardware MJPEG chip. Doc, do you still have a note lying around somewhere on how to change the compression rate to bitrates higher than can be selected normally?

              Comment


              • #8
                Setting the WayBack Machine for a few years ago I have this for the RainBow Runner Studio, but not for the RRG.....
                You can increase the data rate for RR video captures from the normal 3 megs/second to ~4 megs/second or more, BUT let's get this understood up front:

                This procedure has its limits;

                1. You can only do this when capturing with the Media Studio VidCap program and NOT the RR Remote Control.

                2. You have to have a HD and controller capable of handling the extra speed. Because of system overhead you may need a drive capable of 8 megs/second or more to pull this off.

                3. You have to have a relatively fast machine. I'd say 233mhz or better. I put my RR on my son's K6/233 and it worked fine. Your mileage will vary. My machine has a K6-2/300 overclocked to 350 and a Fasttrak RAID0 array so....

                4. You have to edit the dreded REGISTRY to do this. IF this makes you squeemish, DON'T DO IT.

                That out of the way, here's how you do it:

                Click on Start/Run and type Regedit, then hit return. Once in Regedit go to the following key:

                My Computer/HKEY_LOCAL_MACHINE/SOFTWARE/Matrox/Rainbow
                Runner/0/VidCap/Current Values/MJPeg/MJPegQuality

                The value there should be 50 if the RR Remote Control is set for 704x480x30 frames/sec. This number represents Kilobytes/image field.

                Increasing this up will increase the data rate and thereby the quality of the vidcap. You figure the bytes/second by this method: MJPegQuality * 2 (number of fields) * 30 (frames/second) = kilobytes/second.

                If you change this setting to 68 you will get ~4 Megs/sec, but it may not be be stable on many systems. I have tried it up to 84 which gave ~5 megs/sec but like I said; your mileage WILL vary.

                UPDATE: Some who have tried this report that their machine would not overclock past a setting of 80. c'est la vive....

                Matrox will only support this up to 50 (~3 Megs/sec) because it is the most stable setting. If you use values above 50 and it doesn't work DON'T BUG MATROX (or ME)!

                To try this out click on (Default) in the right panel of Regedit, change the value to 68 and then click OK. Close regedit and reboot to lock in the new setting.

                When you go into VidCap select Video Format from the menu and click on the Set Video Size button. Note that NONE of the radio buttons are selected. DON'T select any of them!
                IF you look at the compression ratio and data rate it will reflect the faster setting. Cancel your way out and try a capture.

                REMEMBER: this works in Media Studio VidCap ONLY.

                If it doesn't work, just change it back to 50 and be satisfied that you tried ;-)

                Just for the record:

                Using 704x480x30fps you get 5.1:1 compression (3.809 mp/s)
                Using 352x480x30fps you get 3.2:1 compression (3.047 mp/s)

                I have to say that the 3.2:1 setting is great for captures off VHS, 8mm and Hi8 tape and uses a lot less HD space than the 5.1:1 setting.

                Just as an experiment I captured 20,000 frames, from the TV, with each setting to my Fasttrak/Maxtor DiamondMax 2500 RAID0; no lost frames.

                Then I tried provoking a problem; I changed channels on the TV while capturing under both settings. This consistantly produced 4 consecutive drops, but the RR picked up and kept on recording cleanly for the rest of the run.
                Dr. Mordrid
                Dr. Mordrid
                ----------------------------
                An elephant is a mouse built to government specifications.

                I carry a gun because I can't throw a rock 1,250 fps

                Comment


                • #9
                  Thx! I'll try it and let you know wether it works.

                  I plan to test it on a G400/RRG WinXP combo with the 2.10vt/MV-patch/XP-patch/MPJEP patched drivers/utils.

                  Comment


                  • #10
                    Hey Doc,

                    it's a joy to read those ancient threads. Things like "relatively fast at 233Mhz" have entertaining value these days. What we're writing today, will be funny in 2 years again, I guess...
                    -Off the beaten path I reign-

                    At Home:

                    Asus P4P800-E Deluxe / P4-E 3.0Ghz
                    2 GB PC3200 DDR RAM
                    Matrox Parhelia 128
                    Terratec Cynergy 600 TV/Radio
                    Maxtor 80GB OS and Apps
                    Maxtor 300 GB for video
                    Plextor PX-755a DVD-R/W DL
                    Win XP Pro

                    At work:
                    Avid Newscutter Adrenaline.
                    Avid Unity Media Network.

                    Comment


                    • #11
                      the settings seems to be absent in the registry with the VT 2.10 drivers in XP... ah well... too bad

                      Comment

                      Working...
                      X