Which video codec is the best and fastest?

Help
2007-05-27
2013-04-24
  • Nobody/Anonymous

    I'm experimenting with different codecs and after trying one out, the video was blocky when there was action on the screen.  I'm running with a Pentium 4 at 2.9 GHz, 786 Megs of ram, capturing an area of 800x600.  I was trying this at 15 fps.

    All I want is the smoothest and highest quality video output possible, which I'll edit in a post-production edit.

    Also, I've been having to record audio video the Sound Recorder because the default capture device records a lot of extra noise (like a high pitched electronic screech along side the microphone, instead just the microphone).

    So I've been recording audio and video with separate utilities....

    Any suggestions?

     
    • test-dr

      test-dr - 2007-05-28

      I really dont know at all. There are too many options available and some recordings cannot be done, even if the computer would be a lot more powerfull. I already thought about writing down some experiences and to sort the problems/solutions a bit.

      stick to xvidcap first:
      1. there is a big difference running it in gui-mode or not. Check it yourself with a process-monitor (good old "top" in terminal-mode?) with the same areas recorded.
      2. the automatic encoding while doing the screen-capture can be the bottleneck. xvidcap has the option to do single picture-snapshots at different fps. And more important, in single-picture-mode (-sf) it is possible to use lower fps-rates (which might be enough for a lot of non-action-like recordings).
      3. sound capture with screen-capture will never work in sync. This depends on the sound making programs. Some try to take in account the size of the sound-buffer and sound-creation-pipe - even if one trys to record the speaker output, there is the delay for the capture of this input.
      4. there is on-screen-action (like from 3d-output programs, f.ex. blender), which can only captured in full-size (disable XDamage-option in xvidcap) captures.

      the first step for me was to do single-screenshot recordings:

      this "final" example is with sound, but first testing should be done without and it uses only the non-gui method (this means you need a terminal and a bit typing skills)

      make an empty directory, change into it, so all file-actions happens there.
      mkdir mytemp
      cd mytemp
      #one line, read "man arecord" for the usage of the alsa copy output entry
      ( xvidcap --sf --cap_geometry 640x480 --fps 5.0 --gui no --file o%04d.jpg --quality 80 --auto --audio no &) && arecord -f cd -t wav -D copy out.wav; killall xvidcap
      #end of this line - you need to press CTRL-C to stop the recording, check with ps
      #then use mencoder (from mplayer) to make a video from it - this is one longer line too
      mencoder mf://*.jpg -mf fps=5 -ovc lavc -o test-xvid.mpg  -ofps 24 -oac mp3lame -audiofile out.wav -lameopts br=64:cbr -lavcopts vcodec=xvid
      #now you can use different codecs to create a video from these images and the wav-recording

      for example, i get around 60% smaller file with x264 instead of using xvid
      the bad thing doing a separate sound-recording is, the start of the sound is not in sync and more important as longer the recording lasts, the delay between video and sound is getting bigger. It is possible to do some tweaks with sox (wav-manipulating program)
      for example to cut of the first 0.5 seconds:
      sox out.wav out2.wav trim 00:00:00.5
      or to compress the recording a bit, to get it nearly in sync again
      sox out.wav out2.wav stretch 0.968

      if the cpu-usage is not too big, there is the possibilty to do the sound-recording nearly in sync with the multi-frame option like this (one long line):
      arecord -f cd -t wav -D copy | (sleep 1; xvidcap   --cap_geometry 800x600 --file test.mpg --audio yes --audio_in - --aucodec MP3 --audio_channels 2 --audio_rate 44100 --audio_bits 16 --gui no)
      # the tricky thing is the "sleep 1", because xvidcap complains about the lack of sound-input, it shows there is not enough captured sound, even the sound-capture was started first.

      and last, there are other capture-programs around one should check like recordmydesktop or byzanz(creates animated gifs) or istanbul or vidcap-plugin from Beryl or wink? .. there is always one more way you may think ....

       
    • Karl H. Beckers

      Karl H. Beckers - 2007-05-30

      > All I want is the smoothest and highest quality video output possible, which I'll edit in a post-production edit.

      All I want is lots of money without work ;)
      Your best bet is prolly the default mpeg4 if you want to post-process the video. You should make sure you've followed all performance tips (esp. around the use of Xdamage).

      > Also, I've been having to record audio video the Sound Recorder because the default capture device records a lot of extra noise (like a high pitched electronic screech along
      > side the microphone, instead just the microphone).

      What audio settings are you using?

       

Log in to post a comment.