release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > DocsIndex > VideoTutorial

RVF Conversions and Similar

Out-Of-Date Alert

This describes "the old way", using the command line tools. It still works, and for Linux users is the only way by now. For Windows users, we now have a DirectShow filter which does the conversion in a single pass, plus a point-and-click GUI application which even does batch conversion. This is the recommended way, it is a lot faster and way more easy to use.

Look here for the comfortable way:
http://www.rockbox.org/twiki/bin/view/Main/VideoDirectShow

Introduction

This is a simple tutorial (or, at least, as simply put as possible) on how to convert your video files to RVF (Rockbox Video File), to be played on the Archos Recorder / FM Recorder / V2 line.

Other option is to get the GUI Video Conversion Tool from John Wunder, a GUI wrapper around the described command line tools, which can be downloaded from http://home.ripway.com/2004-2/66978/RockVideoRelease.zip. (Windows users only)

See also Fabian Merki's msi-rvf-gallery, a Java program for building RVF movies out of individual JPEGs.

How To Convert AVI to RVF (Windows)

This Process Is For Windows Users Only

  • Convert your movie file to an AVI file, uncompressed, and with the size: 112x64. There are quite a few programs out there that will do this for you, so I will leave this step up to you. One such program is "BPS Video Converter" available online. Use google if you need.
  • Note down the frame rate of the AVI file. If your conversion tool does not display it, check the properties of the AVI file in Windows explorer. It should tell you the frame rate. If the frame rate is not 29.97 fps, you will need it later
  • Download the tools required here: http://www.rockbox.org/twiki/pub/Main/VideoTutorial/tools.zip Unzip to a PATH, such as C:\RVF, that is easily remembered.
  • Press START on your taskbar, choose RUN and type in the box (minus quotes): "command" You should now be looking at a command prompt. If you don't know basic DOS commands, here is what you need to know: Use 'cd' to change dir (format: cd [dir]) IE: "cd .." to go UP one, "cd ROCKBOX" to enter a path "ROCKBOX"
  • Navigate to your PATH in DOS prompt, using "cd" as illustrated above.
  • Run the file, avitoyuv, which was in the packet you earlier downloaded, using the format:

   avitoyuv [input.avi] [output.yuv]
       

For example, if your AVI movie is called "filename" then you'd put in the following:

   avitoyuv filename.avi filename.yuv
       

OPTIONAL: You can name the output file differently, whatever you specify it will be called. INFO: This can take long to convert.

  • Now run the file, halftone, which was in the packet you earlier downloaded, using the format:

   halftone [input.yuv] [output.rvf]
       

If the input frame rate is not 29.97 fps, add -movie_fps [fps] to the end of the line. For example, if your YUV output from step 5 is called "filename" and the frame rate is 25 fps, then you'd put in the following:

   halftone filename.yuv filename.rvf -movie_fps 25
       

OPTIONAL: You can name the output differently, again. INFO: When this is done, a long list will appear on your DOS screen and you will be back at the command prompt again.
  • Next step is adding sound to your video file. Run the tool avi2wav using the format:

        avi2wav [input.avi] [output.wav]
       

For example, if your original file is called "filename" then you'd put in the following:

        avi2wav filename.avi filename.wav
       

OPTIONAL: You can name the output differently.
  • The extracted audio file must be in mp3 format, so you have to convert the WAV file into MP3. One option to make this is using the LAME codec. You can download the win32 binary from http://mitiok.cjb.net. One format used with LAME (good quality/size) is:

         lame --preset standard [input.wav] [output.mp3]
       

For example, if your audio file is called "filename" then you'd put in the following:

         lame --preset standard filename.wav filename.mp3
       

OPTIONAL: You can name the output differently. Also, you can use other wav to mp3 tool, or even use other options in the lame command. NOTE: The --preset standard will give you a VBR file, so if you want a CBR file, just change the preset to --preset cbr [kbps], where [kbps] is the Constant Bit Rate desired.
  • Now we have to merge the sound with the video, so run the rvf_mux tool found in the packet you've downloaded, using the format:

        rvf_mux [videoinput.rvf] [audioinput.mp3] [output.rvf]
       

For example, if your video file from step 6 is called "filename.rvf" and the audio file from step 7 is called "filename.wav" then you'd put in the following:

        rvf_mux filename.rvf filename.mp3 filename_av.rvf
       

NOTE: You can use any name for the output file, but it's recomended that the name is not the same name used in the input video file.
  • Copy the .rvf output to your jukebox, load up a recent daily build and plugins, and kick back and watch the movie!

How To Convert Most Videos to RVF (Linux)

Credits go to Brian King's original email here: http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-12/0670.shtml

What you need:

Converting the movie

Obviously change filenames accordingly

  1. transcode -i original.avi -z -Z 112x64 --export_asr 0.8 -y ffmpeg,null -F mjpeg -o rock.avi
    Take a look at the line that says "encoding fps". If this is 29.97 (ntsc) don't worry, but if it's anything else (like 25 for PAL) you'll need it later. the -y ,null line doesn't export audio because this didn't work me for some reason (we'll do it in the next step). If you don't have ffmpeg, you can use transcode's own library - replace "-y ffmpeg,null -F mjpeg" with "-y mjpeg,null".

  2. tcextract -i original.avi -x mp3 > rock.mp3
    This extracts just the audio from the movie, it's part of the transcode package.

  3. avi2yuv rock.avi > rock.yuv

  4. halftone rock.yuv rock.rvf
    Add "-movie_fps 25" to the end of the line if you need to as per #1.

  5. rvf_mux rock.rvf rock.mp3 rock_av.mp3

You can then obviously delete rock.{avi,yuv,mp3} and place/rename rock_av.rvf on your jukebox. Good luck!

Compiling halftone.c

Compile it including the math library, else it would be missing the pow() function:

   gcc -o halftone halftone.c -lm
   

Somebody before was missing the -lm and hand-coded the function like this:

   double pow(double base, double exp) {
     double i, ret=base;
     for (i = 0; i < exp; i++)
       ret = ret * base;
     return ret;
   }
   

Which is wrong, since it works only with integer exponents. pow() is used for gamma correction, a non-integer exponent.

Sample Clips

Some video clips can be found here:
http://rockboxvideo.redbreva.co.uk/
http://www.rockbox.org/newvid/

Credits

Video tools, player: JoergHohensohn

Tutorial: ZakkRoberts, GadiCohen
  • make_rvf: a very simple script to simplify the conversion

I Attachment Action Size Date Who Comment
halftone.zipzip halftone.zip manage 4.5 K 30 May 2005 - 20:15 JoergHohensohn source code for the video converter
make_rvfEXT make_rvf manage 0.8 K 26 Sep 2004 - 14:08 GadiCohen a very simple script to simplify the conversion
rvf_mux.zipzip rvf_mux.zip manage 9.7 K 30 May 2005 - 20:16 JoergHohensohn source code for the audio+video multiplexer
tools.zipzip tools.zip manage 118.5 K 30 May 2005 - 17:52 JoergHohensohn the command line tools (Win32 compiled)
r17 - 02 Apr 2021 - 20:46:07 - UnknownUser


Parents: DocsIndex
Copyright © by the contributing authors.