Creating AVI/MPEG in Linux

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
phlux0r
Posts: 14
Joined: Sat Jul 15, 2006 12:06 am

Creating AVI/MPEG in Linux

Post by phlux0r »

I've seen a few tips here on how to crate an avi in linux from exported Moho image sequences but they're all command line tools. However, there is a nice GUI way of doing it too using Kino:

1. Export your moho animation to a sequence of images
2. Start Kino and select the Fx tab
3. Under the Output section select your target Kino file (it'll be a dv file)
4. Select the "Create" tab and in the drop-down choose "Create From File"
5. Enter the number of frames you've exported
6. Select the first file in the sequence but make sure to change the "0001" to %4d as this will indicate to Kino to read the whole sequence of images
7. Click on render and after a while you'll have a dv file in the Kino editor
8. You can now add more scenes in similar fashion
9. When you want to export your work, choose the Export tab and there you have a few export options. If you want to export mpeg1&2 select the "Mpeg" tab, for various avi formats and flash video use the "Other" tab.

I've tried this on Mandriva Linux with Kino 0.8.1. Make sure you have mjpegtools 0.8 installed and you will need ffmpeg/mencoder for the Other avi options. There is a bug in Kino 0.8.1 when exporting to mpeg1/2 where you may get an export error. Workaround: unset the Cleanup box in the advanced options and use the mpv file as an mpeg with no audio. You can
mplex the resulting mpv and mp2 files on the command line if you wish but since you don't have audio anyway, there may be no point.
[Edit] Another thing: Kino seems to work only in PAL or NTSC so export your Moho animation for either one of those as Kino will upsize your images from the sequence to the PAL/NTSC size and use the resized profiles in the export to create smaller movies.

If you want a more fully fledged DV editing suite on linux, install Cinelerra. Then you can do multitrack video and audio just like in Premiere or Final Cut... In that case I'd just import the dv file from Kino into Cinelerra and work from there as you can later export all sorts of formats from it.

HTH.
User avatar
jorgy
Posts: 779
Joined: Sun Sep 05, 2004 8:01 pm
Location: Colorado, USA

Post by jorgy »

Thanks for your tips. I hadn't really considered using Kino since I prefer not to have to mplex in the sound later.

Do you have experience using cinelerra? I've used it for a couple of tiny little things, but for anything big I get easily frustrated. I'm interested to another point of view.

jorgy
phlux0r
Posts: 14
Joined: Sat Jul 15, 2006 12:06 am

Post by phlux0r »

jorgy wrote:Do you have experience using cinelerra? I've used it for a couple of tiny little things, but for anything big I get easily frustrated. I'm interested to another point of view.
Unfortunately I have no experience with Cinerella. I'm just checking out the DV tools available for Linux at this stage looking at possible tools to create a potential workflow for DV. In other words, I'm merely just experimenting around to see what can be done with what's available. Afterwards I might decide what to spend more time on... besides, I'm rather new at animation and all this DV stuff :).
Juergen
Posts: 6
Joined: Sun Jul 30, 2006 12:17 pm

Post by Juergen »

hello,

I'd recommend to use mencoder for processing the images exported from moho. with sth. like:
mencoder mf://*.png type=png on:fps=24 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o testfilm.avi

you could build a movie called testfilm from all the *.png images in the actual directory.

mencoder also can be used to put an audiofile into youre movie container.

I know,it seems way more convenient to use a gui than a command line. The advantage of using mencoder is, you don't have to go via dv format. And you can use any resolution you want for your pictures insead of sticking to PAL or NTFS format.

Mencoder is part of the mplayer project. For lots of distros mplayer has prebuild packages.

regards Jürgen
phlux0r
Posts: 14
Joined: Sat Jul 15, 2006 12:06 am

Post by phlux0r »

I agree with you, Juergen, mencoder doesn't force any restrictions on your resulting video and is still easy to use. I was just pointing out an alternative, plus, with Kino you get the ability to do some extra editing of the video and some effects.
User avatar
phoebemonster
Posts: 5
Joined: Mon Aug 07, 2006 11:37 pm
Location: RI, USA
Contact:

Post by phoebemonster »

Hello, I've been trying to follow the Kino directions listed here, but I am very new to Moho and Kino, as well as Linux. I'm just trying to get my little moho animation into some format or another so that I can play with in Cinerella (which I also have yet to learn to use).
Sorry in advance if I'm asking dumb questions--I tried to do it by myself for a long time, with variations on the directions that I did not understand, but I still can't figure it out.

I have Fedora Core 5, and Kino 0.9.0, so maybe this is a little different?
--------
1. I exported my moho animation to a sequence of images (I tried .png first and then .jpeg in case it mattered), which then made a new image file in my folder for each frame (72 of them)

2. started Kino and selected the FX tab

3. But I had trouble with this: under Output, I would have to select my .dv file that I wanted to write to. Where do I get the right dv file to work with in the first place? And Kino says to remove the file extension, so this is removing ONLY the ".dv" part of the file, once I actually get a .dv file to work with, right? First I just left it blank, so it made the .kinofx.dv in the folder with the other images after I clicked render, but the

4. selected "create" tab and selected "create from file"

5. entered the number of frames in the sequence, (72)

6. I tried selecting the first file of the sequence, but do you mean actually change the name of the first .png (or .jpeg if that works) file from all of the frames? Because when I tried that, the image just went all black in Kino. Or did you mean changing the name of the file I was opening within Kino--then it said that file did not exist so again the image just went black. When I didn't change the name of anything, I just got 72 frames of the same 1st image that I selected.

7. I clicked on render and it made the .kinofx.dv file (is this the right kind of .dv file that you referred to in step #3?), but I don't even know if that worked when I tried to use that .dv file in step #3, because the rest of the process didn't work.

I didn't get as far as steps 8 or 9.
--------

So when this did not work, I tried getting mencoder, and then mplayer and all the requirements etc. (I installed it with yum) but nothing happened when I tried to open them (both in a terminal and normally) so I'm not sure what to do now.
Image
phlux0r
Posts: 14
Joined: Sat Jul 15, 2006 12:06 am

Post by phlux0r »

phoebemonster wrote:3. But I had trouble with this: under Output, I would have to select my .dv file that I wanted to write to. Where do I get the right dv file to work with in the first place? And Kino says to remove the file extension, so this is removing ONLY the ".dv" part of the file, once I actually get a .dv file to work with, right? First I just left it blank, so it made the .kinofx.dv in the folder with the other images after I clicked render, but the
Yes, so just type the path and filename i.e.:
<path_to_directory>/animation
6. I tried selecting the first file of the sequence, but do you mean actually change the name of the first .png (or .jpeg if that works) file from all of the frames? Because when I tried that, the image just went all black in Kino. Or did you mean changing the name of the file I was opening within Kino--then it said that file did not exist so again the image just went black. When I didn't change the name of anything, I just got 72 frames of the same 1st image that I selected.
Just select the first image file. The filenames should contain sequence numbers as rendered by Moho (xxxx0001.jpeg, xxxx0002.jpeg, etc.). What I mean is replace the 0001 with %4d. It's a wildcard essentially telling Kino to look for image files that are in sequence.
7. I clicked on render and it made the .kinofx.dv file (is this the right kind of .dv file that you referred to in step #3?), but I don't even know if that worked when I tried to use that .dv file in step #3, because the rest of the process didn't work.
That's probably because you may have not specified your image sequence properly in the previous step.

HTH
Post Reply