Real time encoding problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IztokT
    Junior Member
    Junior Member
    • Nov 2001
    • 11

    Real time encoding problems

    I have WinTV TV tuner card, and I wanted to capture live TV programs with VirtualDub using DivX 4.11 codec. I've changed already a lot of setting, but I always get the same problem.
    At the begginig the capture is OK with CPU load from 20-100%, but after cca 5 min, there is constant 100% CPU load with a lot of frame droping.
    I have read a lot about not enought powerfull computers for realtime capturing (mine is also an old one: Celeron 366 with 64MB RAM), but I don't understand why at the begginig everything is OK and then not. Where's the catch?

    Iztok
  • benderman
    Digital Video Specialist
    Digital Video Specialist
    • Nov 2001
    • 770

    #2
    Your computer ist really too slow for direct capturing with DivX (except you use 160x120 with a maximum of 10fps). The effect you described depends on the limited size of your computers memory. Virtualdub copys the videoframe in a buffer in the RAM and copys it from there to DivX. While the buffer ist not totally full ther wont be many dropped frames. But if DivX encodes to slow the buffer will be full sooner or later and VD dropps the next frames.
    With a 366-Celeron you should use an simple codec like MJPEG or Indeo (fast compression) with high bitrates and reencode it to DivX later. Then you should be able to capture with no dropped frames up to 384x288x25fps.
    don't trust in guides

    Comment

    • SunTV
      Junior Member
      Junior Member
      • Nov 2001
      • 3

      #3
      Real-Time capture on low-end systems

      Hi there!

      A 366 is too slow? That is just plain nonsense. Let me tell you something about my experiences with capturing. First to begin with are my system specifications:

      Pentium 2 with 350 Mhz
      320 MB 100 Mhz SDRAM
      4.3 Gb Western Digital Harddisk @ 5400rpm
      nVidia TNT2 Ultra with TV-out
      Pinnacle PCTV Studio Rave Capture Card

      Yes, the totally out-of-date system you would say. Since I have no money to invest in a new system, this is all I have for DivX playing and I have never seen one movie play bad on the system. Lucky me. Now let’s talk encoding: real-time-live-encoding using VirtualDub 1.4.7 and the latest DivX 4.11 codec.

      Since I am the type of guy who expects max-of-the-max performance from his system, I have been disappointed a numerous times. But not when it comes to real time video capturing. Of course, the 640*480 resolution starts dropping frames at 18 fps, but I have plenty of time playing around with that when my system is updated. Anyway, at Nicky’s pages I’ve read that 640*480 is overkill, but when you see the capture images, they tend to ´kill´ the 384*288 quality by far. You want 640*480, trust me. Maybe it’s because I live in the Netherlands and we have cable in every house (with 36 channels). Resolution provided by the cable company is very high, meaning there is a huge difference between 640*480 and 384*288 capturing. VHS sucks cause it kills the high resolution of the programs.

      About the capturing I do: I use the latest VirtualDub (1.4.7. I believe) with the latest DivX 4.11 codec and my settings are:

      Audio: PCM 32000Hz 16 bit Stereo @ 125 K/sec
      Video: 384*288, YUY2
      Compression: DivX 4.11, Fastest, 1-pass-quality (VBR) @ 95%
      Capture settings: 25 frames per second

      Remember, this is all on a P2 350Mhz / 320Mb with only 1,5GB free disk space. When I start capturing it takes at least 5 minutes to drop only 1 frame (which I do not like; it could cause audio synch problems) capturing high-action shots. ´Normal´ programs show no loss in 30 minutes

      A few days ago I started capturing a scientific BBC program. It was an ideal test, because it had low-motion fragments (when the hosts talked) and lots of high-motion scenes. One of them was a test of a helicopter cabin crashing into water. It was simulated in a basin/pool and the screen was filled with heavy-motion water for about 5 minutes. A true hell for the right compression and certainly at real-time. But at 25 fps using the above settings I only dropped 10 frames in 5 minutes. It was quite amazing. I have to tell the processor occupancy was only at about 85% (and yes sometimes at 100% when most of the water was there to fill the screen). Usually the average occupancy is about 70%.

      Why 1-pass-quality Variable Bit Rate @ 95%? Well, I’ve tested a lot with Constant Bit Rate (CBR) using different kinds of bit rates (780 / 910 / 1000 / 1500 / 2000 / 3000) and the low and high motion compression between 2 and 12 using ´fastest´ compression. The best result was a combination of those, but was terrible in comparison to the VBR @ 95%. Namely faces of people talking where a bit blurred and the entire picture looked a little bit vague. Using 1-pass-quality VBR, things looked amazingly well. I recorded some more programs and when some friends came by my place I tricked them by letting them view the capture, without them knowing that they were watching a capture. I asked them if they saw anything strange / different and the only thing they said was that the ´logo´ of the channel was a bit blurry and sometimes it looked like there was a tiny ´filter´ on the entire screen. When they saw my mouse pointer move across the screen they were amazed.

      I also tried to use FAST in stead of FASTEST compression and then take about 90 to 93% quality (other settings kept the same), but my system just can’t handle that for too long. It works and looks amazing, but after 2 minutes, I start losing frames. Anyway, I am quite happy with my settings as they are now and am capable of ´taping´ any kind of program @ 384*288 @ 25fps I want on my inferior P2 350.

      Greetings, Marc Koster
      Rotterdam, the Netherlands

      Comment

      • benderman
        Digital Video Specialist
        Digital Video Specialist
        • Nov 2001
        • 770

        #4
        Sure, if you use the "fastest" option it is possible, but the quality is not better than Indeo or JMPEG. And these codecs aren't hacked so they should produce less errors. That works even on a 300MHz-Celeron with 44kHz/16bit/stereo-PCM with a cpu-use of 80% or lower.
        don't trust in guides

        Comment

        • UncasMS
          Super Moderator
          • Nov 2001
          • 9047

          #5
          i totally agree with benderman

          a system like that IS too slow for hq rt encoding!

          use mjpeg picvideo2 with max settings and encode to divx in a second step.

          you would have to de-interlace in most anyway and that will kill your machine trying all that in one go!

          Comment

          • omarh
            Member
            Member
            • Nov 2001
            • 97

            #6
            hi SunTV,

            Are you able to play back divx movies at 640x480 without losing frames or without getting audo sync problems with your computer?? I know you can't encode them real time at that resolution but i'm talking about playback.

            I noticed with my P3 733mhz machine, I can't play back 720x480 divx movies unless i set the post-processing down a notch or two. Otherwise the audio sync gets totally messed up.

            Comment

            • benderman
              Digital Video Specialist
              Digital Video Specialist
              • Nov 2001
              • 770

              #7
              Hi omarh, I played DivX/mp3-movieson my old Celeron 337 (little overclocked from 300). 'The playa' workes fine with every res, but i also have to lower the post-processing. With other players like 'wmp' or 'MicroDVD' a few extra-MHz would be better. On an athlon 500 and 700 it workes fine with highest post-processing. Maybe your system is a little overloaded (i.e. with background-programms). But don't worry, the high post-processing dosen't make too much difference.
              don't trust in guides

              Comment

              • omarh
                Member
                Member
                • Nov 2001
                • 97

                #8
                I think my computer has always been a bit slow...maybe its the apollo pro 133 chipset or something...
                i dunno!!

                But my P3 at work (450) withi BX chipset, seems to be almost better at playing movies than my 733 at home. weird.

                maybe you're righit about too many background things in the way.

                Comment

                • SunTV
                  Junior Member
                  Junior Member
                  • Nov 2001
                  • 3

                  #9
                  Geting the best out of low-ens systems with capturing

                  Hi guys, here’s my reply.

                  -1-
                  ----------------------------------------
                  Benderman:
                  Sure, if you use the "fastest" option it is possible, but the quality is not better than Indeo or JMPEG. And these codecs aren't hacked so they should produce less errors. That works even on a 300MHz-Celeron with 44kHz/16bit/stereo-PCM with a cpu-use of 80% or lower.
                  ----------------------------------------
                  Of course I´ve tried Indeo and others but they still can’t touch the real-time DivX 4.11 capabilities looking at file-size and quality. By the way; FASTEST @ 95% still looks a lot better then FAST @ 90%. Actually they’ve put in FASTEST especially for real-time capturing. One more thing: I know it´s probably better to capture uncompressed or Mpeg and then convert to DivX, BUT I only have 1.5 GiGs free HD space… On a new P4 system with 512 Mb and maybe a 80 GiG HD you can afford to do that. Remember this thread is about low-end systems trying to get the best capture possible.

                  -2-
                  ----------------------------------------
                  UncasMS:
                  i totally agree with benderman
                  a system like that IS too slow for hq rt encoding!
                  use mjpeg picvideo2 with max settings and encode to divx in a second step.
                  you would have to de-interlace in most anyway and that will kill your machine trying all that in one go!
                  ----------------------------------------
                  Well like I said before: my sysem cannot capture @ 640*480*18fps without dropping frames after 15 seconds. You, me, everybody wants 1 thing in real-capture: small files with high resolutions @ 25fps. Right? So what I am trying to do is get as close as possible to that resolution of 640*480. The one closest is 384*288. So I tried to play with that one, expecting it to be a bit blurry and perhaps still to big of a resolution. But I was wrong; it works perfectly to me.

                  Nicky sais: “Concerning resolution, you should always keep in mind that VHS video is roughly 320 x 240 pixels. Even so it may be best to keep to 352 x 288 PAL or 352 x 240 NTSC if you wish to follow VCD standards.” Since the 384*288 (4:3) is an even higher resolution it’s quite easy to understand that it’s acceptable to use when you want to replace your VCR with your harddisk. And it IS acceptable. By the way, in the Netherlands we have PAL-B. So to me DivX 4.11 does a great job by capturing and compressing in 1 step and still get the same “clear” picture as I get from VHS. I tested it numerous times: capturing and taping programs at the same time and then comparing the results. But I have to say this does not happen when you use CBR. The 1-pass-quality VBR @ 95% still is the best to me.

                  In the end you are right about that High-resolution real-time capture, because again I cannot do that, but that was not the problem of this thread in the 1st place.

                  -3-
                  ----------------------------------------
                  Omarh:
                  Hi SunTV, are you able to play back divx movies at 640x480 without losing frames or without getting audo sync problems with your computer?? I know you can't encode them real time at that resolution but i'm talking about playback. I noticed with my P3 733mhz machine, I can't play back 720x480 divx movies unless i set the post-processing down a notch or two. Otherwise the audio sync gets totally messed up.
                  ----------------------------------------
                  Well let’s just say I have loads of DivX movies and they are all high quality. Not one time was there a good DVD rip that caused my system to go slow, skip frames or worst: lose audio synch. Of course there are bad rips out there, but I am talking about the good ones here. The ones that count. Windows Media Player or Zoomplayer work fine with every resolution, but I also have to lower the post-processing (What do you expect from an original P2 350 which is not overclocked?). In the past, when there wasn’t any DivX 3.2 or DivX 4.x, but the plain old 3.11, the best player for my computer was (and perhaps still is) “Ravisent Cinemaster 2000”. It has a shitty interface, but quality/speed is extremely good. I noticed I did not mention my motherboard: an Asus P2B i440BX 100Mhz. Never gave me any problems whatsoever. And the OS I use is Windows ME. About those background programs: the only 3 things loaded permanently in my system memory are “Explorer”, “Systray” and my firewall.

                  -4-

                  What more can I say? I have a low-end system capable of capturing real-time DivX with 25 fps and at VHS quality. Can’t complain here, but it still isn´t high res…

                  Greetings, SunTV

                  Comment

                  • techno
                    Digital Video Master
                    Digital Video Master
                    • Nov 2001
                    • 1309

                    #10
                    Hi, why don't you just capture it in a good res with YU12 and NO RECOMPRESSION and 25fps with PCM CD-quality audio? You can use AV_IO to split the files over several files then use TMPGENC to encode it to MPEG2 and then to DIVX. when capturing in DIVX 4.11 or DIVX 4.xx, it is not good at captuing because it wan't designed to capture directly. You can use DIVX 3.11alpha fast motion, 6000kbps and 10-11smooth if you want to capture directly to DIVX. I have done this many times for one hour TV programmes and it gives me near DVD quality results. I can post up a wee sample if you wish. But you should do what I said at the beginning here.

                    Thank-you

                    Techno

                    Comment

                    • benderman
                      Digital Video Specialist
                      Digital Video Specialist
                      • Nov 2001
                      • 770

                      #11
                      Hi Techno, all the YU/YUV-modes are not very good. When you reduce the the color-depth the even a little bit of noise will cause a very noisy video. Also uncompressed video is only usefill if you have a cpu with 200-300MHz and a fast HDD. PCM is the best even if you have a fast cpu because it's the best to capture sound and video in sync.
                      don't trust in guides

                      Comment

                      • benderman
                        Digital Video Specialist
                        Digital Video Specialist
                        • Nov 2001
                        • 770

                        #12
                        Techno, why do you convert the captured avi to MPEG-2 and then to DivX? You can directly convert the (uncompressed) avi to a divX-avi.
                        don't trust in guides

                        Comment

                        • techno
                          Digital Video Master
                          Digital Video Master
                          • Nov 2001
                          • 1309

                          #13
                          Yes, Mr Benderman. You can capture the settings I use on a Pentium 2 200MHz and it works perfectly, the picture quality I get is brilliant. The colours are very good, just like on the TV. You will lose 1-3 frames every 2-3 mins which is not a big deal. You don't really need a fast hdd, I have both 5400RPM and 7200RPM and it works brilliantly.

                          Thanks

                          Techno

                          Comment

                          • techno
                            Digital Video Master
                            Digital Video Master
                            • Nov 2001
                            • 1309

                            #14
                            Hi again, Mr Benderman. The reason for this is because I can do editing and also produce even higher quality from MPEG2, I then convert it to DIVX. This also reduces the file size if I do it this way.

                            Thank-you

                            Techno

                            Comment

                            • benderman
                              Digital Video Specialist
                              Digital Video Specialist
                              • Nov 2001
                              • 770

                              #15
                              I really can't see how converting to mpeg-2 could help to increase the quality. Why not open the (uncompessed) avi in VirtualDUB, use all the cool filters (noise reduction, deinterlace, clipping, resize...) to increase the quality, then save directly to avi?
                              don't trust in guides

                              Comment

                              Working...