beccatoria: (Default)
[personal profile] beccatoria
OKAY! For reasons best known to...some part of my brain for sure, I have made a series of tutorials to show people how to make vids on Linux. I've done this for a few reasons, firstly because there should be more vids, and my own experiences getting to grips with Cinelerra were more challenging than they would have been had there been an active vidding community to assist me, since a lot of the tutorials were aimed at different types of video editing or deeply technical. Secondly, I think more people should be aware of the option. Not only are Linux and Cinelerra philosophically free, as in open source, they're also financially free, as in zero cost. And they run much better on systems with lower end specs.

So you know, vidding has a somewhat deserved reputation as being an expensive hobby, but you really can have a program that can do fancy editing shit without spending a lot of money or having a superawesome machine.

SO BRIEFLY:

These tutorials are split into two parts. The first focuses on basics, including getting a Linux-based Operating System (I recommend Ubuntu) and setting that up, installing programs, setting up Cinelerra, basic editing on Cinelerra with a focus on what is most applicable to music videos (in my own biased opinion, of course!)

The second set of tutorials is a collection of stuff I've done over the past year that is more advanced. It's basically focused on achieving more complex effects and/or stuff that many other editing programs have presets for but Cinelerra doesn't. That's the thing about Cinelerra, it can do most of the stuff Vegas or Premiere can do, it's just not always obvious, preset-level easy, and will involve using a program that kind of looks like it was made in 1994.

SO. LET'S GET ON WITH IT:



Vidding on on Linux with Cinelerra: Tutorial 1
This tutorial comprises a brief discussion on easy ways to install Ubuntu, setting up your Ubuntu installation to play DVDs and restricted media, and installing Cinelerra, Avidemux and Audacity (the latter being two programs that you may find useful in vidding). If you already have Linux and these programs, skip this.



UPDATE 1: When I recorded this, the Synaptic Package Manager was included by default in Ubuntu, and I used it as the method of adding the Cinelerra PPA because to those coming from a Mac or Windows background, I think it is an easier way of understanding what you're doing to your system. Unfortunately, it's no longer included by default in Ubuntu. You can either install it from the Software Centre (in the same way as other programs discussed in the above tutorial), or you can just use the terminal and paste in some code to get the same result:

1. Open a new terminal (ctrl+alt+t)

2. Paste in the following lines of code:

sudo add-apt-repository ppa:cinelerra-ppa/ppa
sudo apt-get update
sudo apt-get install cinelerra-cv

It will ask you to enter your password. Do so - and don't worry that it's not showing you asterisks for each character. Hit enter.

3. You're done!

UPDATE 2: Again, when I recorded this, the libdvdcss programme that allows you to play DVDs used to be kept at medibuntu.org. That is no longer the case. The repository was deemed obsolete but an alternate (free, open source, and I believe with the same potential legal issues discussed in the tutorial) is now available:

1. Open a new terminal (ctrl+alt+t)

2. Paste in the following lines of code:

sudo apt-get update
sudo apt-get install libdvdread4
sudo /usr/share/doc/libdvdread4/install-css.sh

You may be asked for your password, again just enter it and don't worry that it's not showing asterisks. Hit enter.

3. You're done!

Vidding on Linux with Cinelerra: Tutorial 2
Cinelerra is quite good about importing a wide variety of video and audio formats. However, this tutorial details how to convert media into formats that Cinelerra can read using Avidemux and Audacity.



Advanced Tips: As I noted, Cinelerra is fine with .vob files (the type you get on a DVD). It does not work with .mkv files (the type from BluRay) "out of the box". However, it's the container it doesn't like, not the video stream inside. If you change the container from .mkv to .mp4, it should work. The easiest way to do this is to throw it into AviDemux, leave the video setting on "copy", and change the format to mp4. Convert and you've got an .mp4 file Cinelerra should accept without having actually re-encoded the video stream (so there's no loss of quality). It may give you shit about the audio. If it does so, do the same thing but convert the audio to AAC, stereo, 48khz and that should fix it.

Also as I mentioned in the vid, if you are a responsible vidder and prefer lossless codecs, you probably know more about this than me, but I do know that Cinelerra should work with MJPEG, DV and DNxHD. More detailed instructions for preparing media are available here

Vidding on Linux with Cinelerra: Tutorial 3
This tutorial details setting up Cinelerra's global settings, and then tweaking individual project settings.



Vidding on Linux with Cinelerra: Tutorial 4
Finally! Basic editing in Cinelerra!



Vidding on Linux with Cinelerra: Tutorial 5a
Panning, zooming, fading in and out (the histogram-based effects).



Vidding on Linux with Cinelerra: Tutorial 5b
Using effects and transitions.



Vidding on Linux with Cinelerra: Tutorial 6
Rendering video out of Cinelerra.



For those attempting the more complicated rendering option in the above tutorial, here is the text I pasted into the cine_render.sh script:

#/bin/bash
mpeg2enc -v 0 -r 16 -4 1 -2 1 -D 10 -E 10 -g 15 -G 15 -q 1 -b 8600 -f 8 -o $1

The command to execute the cine_render.sh script (that I type into the terminal) is:

chmod 777 ~/cine_render.sh


ADVANCED TIPS - RENDERING H264 AND/OR RESOLUTIONS GREATER THAN 720X480: Okay, so I left this out of the above because doing this is a bit complicated thanks to Cinelerra's finicky rendering options, and I wanted to keep the video tutorials as a sort of "quick start guide". So to reiterate, all of the above will still work. But since HD footage is becoming ubiquitous, I think I should include this. The steps themselves should be easy enough to follow, but I'll try to throw in some context where possible:

First a word on xvid/divx vs h264. One of the big reasons h264 is better is efficiency. With two files encoded at the same bitrate - the h264 one will look way shinier than the xvid one. But if you just pump the xvid bitrate through the roof you can approach parity of shininess, you just end up with fucking enormous files. So since xvid plays smoother than h264 (at least on my computer, I imagine a faster machine would help), if hard drive space isn't an issue for you, you may want to try this. HOWEVER, if you'd rather just use h264 (and hell, I do,) read on!

Also, there are ways of getting the mpeg render described above to work with 1280x720, but to be honest, it won't get you as good quality as the below. SO!

1. Render as an avi per the instructions in the above tutorial. However, make the following amendments:

- Choose "Mpeg-4 Video" as the video codec, not "Microsoft Mpeg".*
- Set the bitrate through the roof. I recommend 8000000 (8000kpbs) to start.** Take it down to 7500000 (7500kpbs) if it freaks out on you, but that's happened to me like once in years of doing this.
- Leave the buffer at 500000 (500kpbs) - as noted in the above tutorial, it can freak out if the percentage of the bitrate is too high or too low. I find this number works well for any bitrate between 2000kpbs and 8000kbps.
- Leave the audio on mp3 per the above, unless it gives you any shit (it's happened to me on rare occasions), in which case change it to "Twos Complement" which is an uncompressed format and should fix it for you.

* We're using this codec rather than the Microsoft one because it will provide a better-looking video file. I didn't suggest it in the tutorial as the standard codec to use because it also creates files that half the shit on your computer will refuse to play (see below).

** It's this high because (see above) this is an intermediary file, so you want to crank up the bitrate so high you're sure you've gone way beyond the quality ceiling. Size isn't an issue at this point since this isn't for distribution.

2. You will now have a video file! It will be gorgeous! There'll be some loss of quality, but it should be essentially invisible to the human eye on the average screen! Unfortunately, it will also probably refuse to play in anything other than VLC player (available from the Software Centre). You've made an intermediary file that we can encode into something sensible for distribution. Unfortunately, AviDemux is one of the the programs that probably won't be willing to play it.

That's okay! We're going to use ffmpeg! If you don't have it installed:

- Search the Software Centre for ffmpeg and install it.
- Search the Software Centre for "libavcodec-extra" and install the one you find. I believe the current version is "libavcodec-extra-53". If you have 32-bit Ubuntu install the version with "i386" in the name. If you have 64-bit install the one without "i386". You will probably need Medibuntu repositories enabled for this - see instructions in the first tutorial. This is basically a bunch of extra options for ffmpeg.

You now have ffmpeg!

3. Ffmpeg is a command line programme. If this is intimidating there are a bunch of programmes that create GUI front ends for it. WinFF is one available in the Software Centre, and I've also heard good things about Sinthgunt, but I can't speak from experience, and sometimes these programmes limit you to preset templates. So go forth and explore, but I'm going to tell you how to do this from the command line.

- Make sure the file you're converting is in your home directory (the one that is named, err, your username). New terminals open by default "in" this directory and then you won't have to worry about navigating anywhere.
- Open a new terminal (ctrl+alt+t).
- Type the following:

ffmpeg -i cinelerrafile.avi -acodec libfaac -aq 100 -vcodec libx264 -preset slow -crf 12 finalfile.mp4

But replace "cinelerrafile.avi" with the name of the file you rendered out of cinelerra and replace "finalefile.mp4" with whatever you want your final file to be called.

Hit enter! :D It will convert! :D And show up in your home directory.

The above will create an .mp4 file with aac audio, encoded with h264. The "-crf" argument is what determines the quality, the lower it is, the higher the quality (though again, you reach a ceiling at a certain point). I find that 12 - 24 is a good range, so change this if you feel your files are too large. As it encodes you will be able to see what the bitrate is within the terminal.

You can set bitrate specifically, use different codecs, different containers, etc., the above is just what I've found works most reliably for me with the best mix of quality/size. Here is the ffmpeg documentation.





MORE ADVANCED TUTORIALS! Most of these have already been posted on this LJ before, and one or two aren't totally applicable to vidding, but are collected here for posterity. The last couple are new.

Cinelerra Tutorial: Dream Glow & Edge Detection effects



Cinelerra Tutorial: Make a Lightsaber!



Cinelerra Tutorial: Masks, Moving Masks, Split Screens (Using Masks!)



Cinelerra Tutorial: Colour Pass Effect (Sin City Effect)



Cinelerra Tutorial: Colour Correction



Cinelerra Tutorial: Animated Effect



Cinelerra Tutorial: 3D Transitions



Cinelerra Tutorial: Turn Day to Night



Cinelerra Tutorial: Creating New Transitions



Cinelerra Tutorial: Texture Overlays



Cinelerra Tutorial: Title Effects (including animated & 3D)



Cinelerra Tutorial: Light Bloom/Enhancing Light Sources





Finally, a few links:

The Cinelerra CV Manual: this is the official manual for the community version of Cinelerra (which is the version we are dealing with here; see here for information as to why if you're curious). The manual looks big and intimidating and probably isn't a good first step for a total beginner, but it's very comprehensive and very useful and will pretty much answer all your questions. So it's good to link it here for posterity.

Various Other Tutorials: The official Cinelerra CV site links to various other tutorials in various languages with various focuses. It's probably the most complete centralised repository of tutorial links I've found, though you can also just plain old search YouTube.

THE END.

:)

Date: 2011-02-28 10:12 am (UTC)
From: [identity profile] gonzo21.livejournal.com
Ah, gotcha. So it's not quite so much that you just can't do this stuff on windows machines, it's just that ethically it's something you're more comfortable with, plus technically there are less crashes and the software runs faster.

I guess even on quite modern machines, video editing remains a system hog?

Is there like, a minimum sort of requirement on what sort of video card you need?

Date: 2011-02-28 12:12 pm (UTC)
From: [identity profile] beccatoria.livejournal.com
Yes exactly! Actually Windows (and Mac) almost certainly offer more polished and advanced editing programs for home use. You can buy essentially professional video editors, albeit at a price tag of hundreds or even thousands of dollars. Because of their market monopoly and the financial incentives to develop for them, and because video editing is more complex than many other types of program, Linux does still lag behind in that area when I really don't think it does in others. It's competitive in terms of what it can offer on a lower level - it has many Windows Movie Maker/iMovie level things that are actually was better than either of those. But in terms of stuff that's competitive in terms of functionality with Sony Vegas, Adobe Premiere or Final Cut Pro, Cinelerra is really the only horse in town. I don't know enough about them all to feel confident saying this, but in my experience everything I've seen people do with the first three is totally doable in Cinelerra, it just won't necessarily be an easy or elegant process to get there. But hey, Cinelerra didn't cost me $500. ;)

Regarding your actual question, yeah, video editing is a bit of a system hog, even now. But I think it probably has a worse reputation than it needs, and running Linux helps a LOT because the OS itself needs to use less of the system and so more of it's available to give to the editing program.

As an example, my last laptop was pretty good, although by no means anything close to top end (and would have had reasonably low specs by desktop standards). It had 2 gigs of RAM and a 2.0ghz dual core processor. It had a fairly low end video card - mostly that's going to be an issue for complex 3D gaming or really high grade effects compositing rather than basic video editing. With this set up I never attempted to run any of the "big names" I mentioned above, but I was running Ulead VideoStudio which...ran okay, but used to have issues with playback lag. It was totally something I could work around, but having only ten seconds of "in sync" playback whenever you started using fast cuts or adding effects to be played back in realtime was annoying. It was also something I just assumed I had to live with until I put Linux on the computer and discovered that Cinelerra, a way more advanced program, had WAY better playback even with LOADS of effects on multiple tracks. It had a bit of lag, but nothing close to what it was on Windows (on a lower end program), and it used to self-correct and catch up on the playback much better and more quickly.

Now I have a new computer (4 gigs RAM, 2.3 Ghz Core i5, onboard [i.e. kind of crappy] graphics card with 256megs dedicated RAM) it runs like a dream. Even with very complicated split screen effects, it might fall slightly out of synch for a second or two before picking itself up when playing back within the program.

Wikipedia informs me that the minimum specs for Cinelerra are 256megs of RAM and a 500Mhz processor. Frankly I think this is a little optimistic and likely a relic of a very early release back in 2003 or something when the CV version was first released; minimum specs aren't mentioned on the official site. I imagine it would install and work with that but...I wouldn't like to thin how slow it'd be. I guess if I were making a totally uneducated guess, I'd say that it runs well on 2 gigs RAM and a 2ghz processor, and you could probably manage okay with 1.5 Ghz and 1gig. But that's...a wild guess based on my own experiences with it.

Date: 2011-02-28 04:40 pm (UTC)
From: [identity profile] gonzo21.livejournal.com
So how much was the software you use for video editing?

Date: 2011-02-28 10:02 pm (UTC)
From: [identity profile] beccatoria.livejournal.com
Well now obviously, it's free! :D But back when I was using Windows, for years I used Windows Movie Maker which is free and...pretty crappy. But I stuck with it for years because of that. Finally in last eight months or so I was on Windows I tried a few different editors through free trials, but mostly I used Corel VideoStudio 12 which was in the region of $100 so about £65? Though like I said, that's cheap compared to some of the more popular editors. A lot of companies offer staggered prices too, though. So for instance I know that Sony Vegas Movie Studio is under £100 but Sony Vegas Pro is more like £400. And I think Premiere and Final Cut are more expensive again?

I believe there's a lot of piracy and/or surreptitiously doing stuff to let you reinstall a free trial in the vidding scene - though there are also a lot of people who purchase things legally - and I'll, err, leave that comment there. ;) Which again is another reason I like Linux because that kind of thing stops being an issue to wage moral war in your own mind over. And also removes a potential serious financial barrier into the hobby because realising you're stuck with Windows Movie Maker forever can be depressing in itself. ;)
Edited Date: 2011-02-28 10:03 pm (UTC)

Date: 2011-02-28 11:59 pm (UTC)
From: [identity profile] gonzo21.livejournal.com
Ha, yes, being stuck wtih bad tools is the single worst thing in the world when you're trying to do a job.

And yeah, I do think software producers price themselves out of millions of sales sometimes.

June 2020

S M T W T F S
 123456
78910111213
14 151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 23rd, 2025 07:35 am
Powered by Dreamwidth Studios