How do I encode lossless?

  • Henrik

    Henrik - 2010-04-26

    What encoder and format should I choose to encode entirely without quality
    loss in Lives?


  • Salsaman

    Salsaman - 2010-04-26


    there are two possibilities for this. If you just want to back up a clip for
    later use in LiVES, you can just use the backup and restore options in the
    File menu (.lv1)

    If you want to encode to an actual playable video format, you can select the
    mencoder_encoder plugin and the flv1 (lossless) format. You will then be able
    to play this back in mplayer and possibly other applications.

  • Henrik

    Henrik - 2010-04-26

    Thanks for the quick response!

    I actually remember trying the ffv1 option before, but had trouble opening the
    resulting file in Avidemux. Now I realized it was Avidemux's fault and not
    Lives', since the file actually works fine (and looks great) in both Xine and
    Mplayer. Using mencoder, I can make a Huffy video out of it if I wanna edit it
    with Avidemux.

  • Salsaman

    Salsaman - 2010-04-27

    Cool !

    If you send me the commandline you are using to make the Huffy video, I can
    add that format to the encoder as well.

  • Henrik

    Henrik - 2010-04-28


    But bear in mind that I'm a bit of a newbie at this, and I don't know exactly
    what I'm doing.

    I issued:

    mencoder source_video.avi -o output_video.avi -ovc lavc -oac copy -lavcopts

    This makes a huffy using the lavc codec (while simply copying the audio).

    Before doing this, I tried this command:

    mencoder source_video.avi -o output_video.avi -ovc lavc -oac copy -lavcopts

    But it gave me this error:

    videocodec: libavcodec (640x480 fourcc=55594648 )

    Error: YV12 is not supported by huffyuv; use vcodec=ffvhuff or format=422p

    In the end, I don't know which option is the best generally.

    Also note that Avidemux is probably supposed to be able to read FFV1 videos,
    since it can encode that format (at least it's in the list of encoding options
    within the program). Maybe my problems stems from the fact that I'm using an
    old version of Avidemux.

  • Salsaman

    Salsaman - 2010-04-28

    Ah, you just brought my attention to something...for png the colourspace
    should be BGR32 and for jpeg it should be 422P. I have made some slight
    changes to the mencoder_encoder in svn to reflect this.

    If you make a huffyuv or ffvhuff from png images then you will lose quality,
    because the colourspace will be converted from RGBA to YUV. You could minimise
    the losses by specifying format=444P (no chroma subsampling), but it will
    still be lossy. You probably wont notice because most likely the player will
    do a RGB -> YUV conversion when writing to the graphics card, but there will
    be losses in the actual video file.

    I don't know how avidemux works, but it would be best to keep to one
    colourspace, e.g.

    png -> ffv1 (RGBA32) -> avidemux (RGBA32)

    less preferable:

    png -> huffyuv (444P) -> avidemux (YUV444p)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks