From Image Sequence to Video File
This guide is about the work flow after you have rendered your animation and want to create a video file, with a proper quality to distribute your video. To compress your animation into a useable video file, you will need some programs. Don't worry they are all open source:
- VirtualDubMod http://virtualdubmod.sourceforge.net/
- AviSynth 2.5 http://avisynth.org/
- MeGui http://sourceforge.net/projects/megui
- eventually MvTools http://avisynth.org.ru/mvtools/mvtools.html
Download and install them.
I will assume that your animation is an image sequence, which you need to assemble and compress.
Assembling image sequence with VirtualDubMod (VDM)
- drag the first image of the sequence into VDM, it should find and append the rest of the image sequence
- go to video->frame rate or press ctrl-r
- click Change to
- enter the desired frame rate (it should be the same frame rate with which you created your animation in blender, e.g. 25)
- press OK
- choose Full processing mode in the Video menu
- assure that Uncompressed RGB in video->compression (ctrl-P) is selected
- go to file->save as and save the file wherever you have enough space
- close VDM
Compressing with MeGui
- open MeGui
When this is the first time you start MeGui, you should be connected to the internet, thus MeGui can download all needed files to work properly.
- when you are asked to update MeGui press Yes
- in the following window everything should be selected
- press Update
- at a certain point MeGui will ask to import some profiles
- select all profiles by clicking on the first entry, scroll to the bottom of the list and while holding down shift click on the last entry
- press Import
- do the same for the audio and XviD profiles
- restart MeGui
Now MeGui should work properly and you can go on.
- go to Tools->AviSynth Script Creator (ctrl-R)
- choose a proper video input (your video file you want to compress)
- by default Resize is checked, uncheck it when you don't want to resize the video resolution
- press Save and save the file wherever you want (might be practical to save it in the same folder as the video file)
- you can now change the Video Output to one you want
At this point it's time to choose the Codec, Video profile and the File format you want. As this is a quick and dirty guide i will not go further into the details of it and just use my favourite settings.
- Codec: x264
- File format: MKV
- Video profile: HQ-Slowest
Just so much, x264 is an open compressor using the h.264 standard which is also used for e.g. HDTV. The MKV file format is an open standard free Container format (AVI, ASF or MP4 aren't open source). This Video profile will result in a nearly lossless, good compressed output.
- press Enqueue
- when the message Incorrect Colorspace [...] pops up, just press Yes and confirm the next message by pressing OK
- go to the Queue panel, there should be two entries waiting to be processed
MeGui uses so called Workers to process queued jobs. The advantage is that you can tell MeGui to work on more than one job simultaneously. That means that you need at least one worker to start encoding.
- create a worker by going into Workers->Create new Worker
- name it somehow and press OK
- job2 needs job1 to be processed before job2 can be processed so you can assign both jobs to one worker by selecting both jobs, right click onto them and choosing the worker you just created out of the Send to worker sub menu
- now everything is set up for starting the compression, do so by clicking onto Start
After the processing is done you can mux your audio stream by using one of MeGui's muxers, which you can find under Tools->Muxer
When you want to use MvTools to e.g. increase the fps or other tools which need YV12 colorspace in the first place, the work flow looks a bit different. Before using MeGui you have to convert the RGB colorspace in which your video file probably is into the YV12 colorspace:
- create an empty txt file
- rename it to yv12.avs
- open it with a proper text editor and add the lines:
- the file address needs to be edited to point to your video file you want to convert
- save the text file
- this text file ("yv12.avs") is now a so called AviSynth script
- open VDM
- drag the AviSynth script into VDM
AviSynth "intercepts" the video data, applies the script and sends the data to VDM (or any video player you opened the script with). When you want to read more about AviSynth (whats possible, which plugins are out there,etc...) go to http://avisynth.org/ but be warned it's a deep rabid hole.
- check if AviSynth works properly by going in VDM into file->File Information, beside FourCC code: should stand something like FourCC:[YV12][...] and beside Decompressor: something like Xvid[...]
- when AviSynth isn't working the line beside Decompressor: should say Uncompressed RGB24, then you need to find out why AviSynth isn't working (perhaps a mistake in the script or try to reinstall AviSynth or ....)
- now everything is working, go to video and select Direct stream copy
- save the video
- when everything worked the file size of the new YV12 video file should be smaller than the old RGB video file