Ffv1rec

1.History

Before ffv1rec, there was nuppel_gatos 

    Last year i was using a ATI AIW 7500, with the Gatos drivers.

    The problem with that card is that it does not provide the same v4l interface as BT8X8 driver. So most of the capture programs simply do not work.

    So, out of frustration i hacked a little utility called nuppel_gatos, which was a port of nuppelrec.

    It used the gatos driver interface to capture, plus YUV422 to YUV420P colorspace conversion.

    It worked nicely but the ratio size/quality was not that good. After experimenting i found that i had a cruel dilemma:

    • Use nuppel, but be stuck with RTjpeg format, sync perfect, size huge
    • Use avi, could use other codec, sync *ahem* problematic

    When i speak of sync i mean real sync. Not trick at container level to resync audio and video streams which are async when taken independently.

    So, i modified the nuppel_gatos to encode video using Xvid codec in interlaced mode.

and now ffv1rec 

    Some months ago, i dropped the AIW to buy a Ti4200 (i'm a bit fan of Enemy Territory :) ) and put back the Bt8x8 card.

    Same causes, same consequences. Plus i wanted to test ffv1, a lossless codec from Ffmpeg. And here comes ffv1rec :)

    The result for the primary objectives were not good: Size good, but CPU max-out instantly.

    So to conclude this interesting piece, ffv1rec is an evolution of nuppelrec that uses the same container as nuppelrec.

    You keep the sync perfectly and are able to encode using various video codecs.

2.Main differences to nuppelrec

  • Switch from multi process to multi threads
  • You can specify an audio frequency, like 48000 for DVD conversion later using the -b switch.
  • You can store your settings in $HOME/.ffv1recrc see following chapter.
  • You can select the video codec using the -C switch.Recommended XVID or HUFFYU
  • You can select the motion search using the -M x switch. Recommended : 0 or 1
  • You can select the quantizer using the -q x switch. Recommended : 5
  • You can select the distance between key frames using the -d x switch. Recommended : 200.

3.Xvid version

    From avidemux 2.0.22 and ongoing, partial support for xvid 1.x has been added to ffv1rec, but you must build avidemux first (or at least the ./configure) before trying to build ffv1rec.

4.$HOME/.ffv1recrc

    This file stores your settings. The command line parameters will override it, so dont be shy.

    The syntax is

    • # for comments
    • opt is the same as -opt when on command line
    • opt=val is the same as -opt val when on command line

    For example, here is mine :

    Code listing .1

    C=XVID
    q=4
    M=1
    d=200
    S=1
    b=48000
    s
    W=768
    H=576
    x=200