Kino Video Editor
 
  Kino / dvgrab
Latest News
Download
Features
Requirements
Screen Shots
  Support
User Guide
HOWTOs
FAQ
Mailing Lists
Contributed Code
  Development
Project Vision
Developer Guide
Source Code
Current Developers
Report a Bug
  Community
Success Stories
Discussion
 

Summary
Using DV Pipe mechanism you can adjust the parameters for your preferred export format and save them for later convenient use from inside Kino. I will show you what I did to export a movie into DivX with custom bit-rate and crop band size values.



DV Pipe allows you to pipe the DV output of Kino engine into a standard input of an encoder program. Which program should be called and its parameters are specified in shell scripts. One of these scripts will be executed when you push the Export button in GUI.

To access DV Pipe Settings Dialog choose "Export" and then "DV Pipe" tabs in the GUI. You will see there the Tools and Profile dropdown lists. With the Tools you choose a shell script file to be executed to create the pipe, with the Profile the right section of the file is selected. There are three scripts currently distributed with Kino 0.7, and they can be found at /usr/local/share/kino/scripts/exports (with default installation preffix).

I needed to change the parameters for DivX output format, because the preconfigured settings would produce DivX files either too big or of too bad quality, besides that, my camera has a small defect and I have to crop 8 lines from top of each frame to get rid of black stripe that should not have been there in the first place. So I would use "FFMPEG DivX Export" option in the Tools dropdown list, but as I said there is no suitable Profile for me there. Now I am going to add a Custom profile into the corresponding shell script and put there a line with all the needed parameters for my setup. The file that is executed if "FFMPEG DivX Export" is selected has a name ffmpeg_divx.sh and can be found in the folder named above.

FFMPEG encoder program has the right options for me - namely
-b bitrate
set the video bitrate in kbit/s (default = 200 kb/s)
and
-croptop size
set top crop band size (in pixels)
so I would just add them into the command line for FFMPEG. In the file ffmpeg_divx.sh we can see a section "# Profiles" in the first function "usage". There I add a new line "echo Profile: Custom" at the end of the list, and it will be shown later in the GUI's "Profile" dropdown list.

Further down the file there is a case statement in function "execute", I add there one more choice

"3" ) ffmpeg -f dv -i - -f avi -deinterlace -s 640x480 -b 1300 -croptop 8 -acodec mp3 -ab 192 -y "$file".avi ;;

which is actually a copy of the choice number zero but you can see that I have added -croptop and changed -b (bitrate) parameters to suite my needs. That's all to it. Once the script is saved, next time I start Kino this profile will be available there and I will be able to export my movie in my customized format.

P.S. Actuall line I have added has even more changes:

"3" ) ffmpeg -f dv -i - -f avi -deinterlace -s 4cif -b 1300 -croptop 8 -cropbottom 8 -acodec mp3 -ab 96 -y "$file".avi ;;

I select "4cif" format i.e. 704x576, because usually I edit PAL DV videos which have 720x576 format, but then to keep aspect ratio I crop 8pixel bands from the top and the bottom - "-croptop 8 -cropbottom 8". My videos are mostly non-musical, so mp3 bitrate of 96kbit/s should be more than enough, thus "-ab 96".




| Printer-friendly page |