Non Linear video Editing with LML33 Linux Media Labs, LLC 2002-Apr-06 Table of Contents 1 Notational Conventions 2 System Requirements 3 Installation 4 Capturing AV stream 4.1 Capturing NTSC video 4.2 Capturing PAL video 5 Playing back AV stream 6 Editing with MainActor Sequencer 7 Creating VCD, SVCD, DVD and DivX4 clips 7.1 NTSC video 7.1.1 VCD (352x240) 7.1.2 SVCD (480x480) 7.1.3 DVD 7.2 PAL video 7.2.1 VCD (352x288) 7.2.2 SVCD (480x576) 7.2.3 DVD 7.3 DivX4 encoding 7.4 'transcode' utility documentation 8 Burning VCD, SVCD, DivxCD 8.1 VCD burning 8.2 SVCD burning 8.3 Divx CD burning 9 Playing movies 9.1 Mplayer 1 Notational Conventions Your input is designated with $, for the command shell input prompt, and with # for superuser mode input. 2 System Requirements * RedHat Linux 7.2 or higher * Kernel 2.4.7 or higher * CPU 300 MHz or more (1 GHz recommended) * RAM 64 Mb or more (512 Mb recommended) * EIDE or SCSI-2 HDD (separate HDD specially for your video clips recommended) * Any video card (1024x768 or higher resolution recommended) * LML33 capture card 3 Installation Please install NLE software from LML CD: $ mount /mnt/cdrom $ su Password: # cd /mnt/cdrom/contrib # sh softwareInstall.sh Please install zoran v4l driver (also from LML CD): # cd /mnt/cdrom/LML33 # sh lml33install.sh # exit For SMP systems : # cd /mnt/cdrom/LML33 # sh lml33installSMP.sh # exit Also you can install zoran v4l driver from source: /mnt/cdrom/LML33/driver-zoran.tar.gz. Please don't forget exit superuser mode. After installation your system is ready for NLE. 4 Capturing AV stream Connect your AV signal source to LML33 input. Connect LML33 output to TV set or TV card. This is useful for monitoring capture process. Now your system ready for capture. 4.1 Capturing NTSC video 1. Go to your video clips directory, for example: $ cd ~/clips 2. Prepare for capture (rewind video tape, or tune camera) 3. Launch lavrec: $ lavrec -f A -i n -d 1 -a 16 -r 22050 -R m -l 100 -s -w clip1.avi after that you will prompted for pressing Enter when ready to capture Press 'play' button on your VCR and press enter on PC keyboard simultaniously. Capture process starts. 4. For stopping capture you just need to press Ctrl+C. 4.2 Capturing PAL video 1. Go to your video clips directory, for example: $ cd ~/clips 2. Prepare for capture (rewind video tape, or tune camera) 3. Launch lavrec: $ lavrec -f A -i p -d 1 -a 16 -r 22050 -R m -l 100 -s -w clip1.avi after that you wil prompted for pressing Enter when ready to capture Press 'play' button on your VCR and press enter on PC keyboard simultaniously. Capture process starts. 4. For stopping capture you just need to press Ctrl+C. 5 Playing back AV stream You can play back captured AV stream on LML33 output: $ lavplay clip1.avi 6 Editing with MainActor Sequencer Launch MainActor Sequencer: $ maseq First of all you need to create AV profile. 1. Specify stream resolution: 720x480 for NTSC video and 720x576 for PAL video 2. Specify FPS rate for Export and for Timeline (29.97 for NTSC and 25.00 for PAL) 3. Also specify audio parameters. Defaults is 44.100 KHz (High Quality), Stereo, 16 bit. Save this profile for further use (for example with 'LML33 profile' name). You can insert your clip into Timeline: right click on video (Va, Vb) track and pick up 'Insert Multimedia...'. Import dialog appears. By default you need just press OK button. Browse file system, select your clip and press 'Open'. Wait for clip importing (it may looks like MainActor hangs up). After that you will see 'film' icon near mouse pointer when mouse pointer flights over timeline. Click left mouse button on desired timeline place. Now clip is inserted into timeline. You can slice it, insert other clips, create transitions from one clip to other, apply special effects and other. For details please read MainActor Users Manual. You can export you MainActor project to AVI file (rendering): In 'File' menu select 'Export'. Specify wanted parameners (quality, resolution and other) and press 'Save' button. After pressing render process starts. During render you can see currently rendering frame in preview window. Rendered AV stream you can play back on LML33 using lavplay program. 7 Creating VCD, SVCD, DVD and DivX4 clips You can transcode LML33 AV stream (MJPEG) to low bitrate formats. For this you can use 'transcode' program. 7.1 NTSC video 7.1.1 VCD (352x240) Video CD's have a restricted format for audio (MP2, 44100 Hz, 224 kBits/s, stereo) and video (MPEG-1, 352x240, 1152 kBits/s CBR) parameter. $ transcode -i clip1.avi -x af6 -k -V -J dilyuvmmx,dnr -C 3 -y mpeg -F v,4 -E 44100 -b 224 -o result $ tcmplex -o result.mpg -i result.m1v -p result.mpa -m v 7.1.2 SVCD (480x480) Super Video CD's have a less restricted format for audio (MP2, 44100 Hz, 32-384 kBits/s, stereo) and video (MPEG-2, 480x480, up to 2600 kBits/s VBR) parameter. The preset profiles take care of the SVCD2.0 specification. The default profile bitrate is 2376 kbps. $ transcode -i clip1.avi -x af6 -k -V -J dilyuvmmx,dnr -C 3 -V -y mpeg -F s,2 -E 44100 -b 128 -o result $ tcmplex -o result.mpg -i result.m2v -p result.mpa -m s 7.1.3 DVD Possible frame parameter combination: 720x480, 704x480, 352x480 and 352x240. For a video frame size of 352x240, resizing can be delegated to the export module with "-F d,4", but this frame size is currently broken in the exncoder, all other values require use of transcode's resize options. The profile default bitrate is 9800 kbps. $ transcode -i clip1.avi -x af6 -k -V -J dilyuvmmx,dnr -C 3 -y mpeg -F d -E 44100 -b 128 -o result $ tcmplex -o result.vob -i result.m2v -p result.mpa -m d 7.2 PAL video 7.2.1 VCD (352x288) Video CD's have a restricted format for audio (MP2, 44100 Hz, 224 kBits/s, stereo) and video (MPEG-1, 352x288, 1152 kBits/s CBR) parameter. The preset profiles take care of the VCD2.0 specification. $ transcode -i clip1.avi -x af6 -k -V -J dilyuvmmx,dnr -C 3 -y mpeg -F v,1 -E 44100 -b 224 -o result $ tcmplex -o result.mpg -i result.m1v -p result.mpa -m v 7.2.2 SVCD (480x576) Super Video CD's have a less restricted format for audio (MP2, 44100 Hz, 32-384 kBits/s, stereo) and video (MPEG-2, 480x576, up to 2600 kBits/s VBR) parameter. The preset profiles take care of the SVCD2.0 specification. You may try to increase th bitrate for higher quality (X)SVCD. Most consumer DVD/(S)VCD player can cope with that. This is done with a profile file xsvcd.prof, which contains the following entries: #(S)VCD profile for improved quality fixed_vbv_delay = 1 vbv_buffer_size = 230 cbr = 1 cbr_bitrate = 4000000.0 quant_value = 2 qscale_type = 0 vbr_mux = 0 video_buf_size = 230 use_comp_bitrate = 1 and will bump up the bitrate to 4000 kbps. The additional profile parameter are passed with the file name as a 3rd argument to "-F". $ transcode -i clip1.avi -x af6 -k -V -J dilyuvmmx,dnr -C 3 -V -y mpeg -F s,3,xsvcd.prof -E 44100 -b 128 -o result $ tcmplex -o result.mpg -i result.m2v -p result.mpa -m s 7.2.3 DVD Possible frame parameter combination: 720x576, 704x576, 352x576 and 352x288. For a video frame size of 352x288, resizing can be delegated to the export module with "-F d,1", all other values require use of transcode's resize options. $ transcode -i clip1.avi -x af6 -k -V -J dilyuvmmx,dnr -C 3 -y mpeg -F d -E 44100 -b 128 -o result $ tcmplex -o result.vob -i result.m2v -p result.mpa -m d 7.3 DivX4 encoding For obtaining DivX4 encoded movie you can use such transcode parameters: $ transcode -i clip1.avi -x af6 -k -V -J dilyuvmmx,dnr -C 3 -y divx4 -o result.avi 7.4 'transcode' utility documentation For detailed documentation on transcode please refer to man pages or transcode homepage: http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode/index.html 8 Burning VCD, SVCD, DivxCD Burning tools vcdimager and cdrdao installed on your system when you launched softwareInstall.sh script , also you can install them from LMLCD/contrib directory. 8.1 VCD burning Capture your video and encode it as discribed in 7.1.1 chapter, after this run: $vcdimager -t vcd11 Mpeg1clip.mpg $cdrdao write videocd.cue 8.2 SVCD burning Capture your video and encode it as discribed in 7.1.2 chapter, after this run: $vcdimager -t svcd Mpeg2clip.mpg $cdrdao write videocd.cue 8.3 Divx CD burning Capture your video and encode it as discribed in 7.3 chapter, after this you can write your Divxclip.avi using mkisofs and cdrecord tools or using X-CD-roast as you wish. No need for special CD stucture for DIVX CD burning process. 9 Playing movies For playing your movies 'mplayer' package installed installed on your system when you launched softwareInstall.sh script , also you can install from LMLCD/contrib directory. 9.1 Mplayer just run : mplayer -vo sdl Mpeg1or2movie.mpg or mplayer -vo sdl DivxMovie.avi Enjoy. (required step:)