Video editing with Cinelerra

After recommending Movavi to a friend who uses Windows, i wanted a video editor for Linux as well. I didn’t really like the first few i tried (Openshot, PiTiVi) because they tended to crash a lot and provided a lot less features than Movavi did.

At a second try, i tried cinelerra, which seems to be great, and seems to offer everything i want.

One caveat: In the standard configuration, video playback is real slow. This can be changed in the settings/preferences menu by changing the video renderer to x11 opengl. And while at it, best change the audio source to alsa (from oss). This fixes the slow playback problem.

Screenshot - 04.01.2015 - 18:44:11

Another thing you want to do is add the line

kernel.shmmax=0x80000000

to /etc/sysctl.conf to get rid of that pesky message when cinelerra starts. This is 2 GB of shared memory, which is quite a bit less than what your machine should have nowadays.

Cinelerra, like a lot of programs, take quite a long time to render the output. Fortunately, there’s a batch renderer as well – add your render definitions to the batch list, then call cinelerra -r from the command line when you’re finished, and it’ll render your files in the background.

One thing i like about linux programs is that normally, they use simple ascii files for configuration. Cinelerra is no exception. So, it’s quite easy to write a little perl script that gets a list of cinelerra project definition xml files as arguments, and creates render definitions from them. So i’ll just call perl projgen.pl *.xml from the directory my xml files are in, then cinelerra -r, and all videos will get rendered again. If i’ll change my preferences sometimes in the future, i can re-render everything with very few manual interaction.

The things i’m missing:

  1. Video size detection. Whenever i load a new file, i’ll have to adjust the track and output size to the new video, and i haven’t found a way to auto-set them to the current video. Current solution: open the file in vlc, and use view codec information.
  2. Video size scaling. If the dimensions of the output video are different from the input video, the video won’t get scaled; just cropped / put on a larger, empty canvas. I think i’ll have to check ffmpeg or avidemux for that one day.
  3. Capturing an image from a video. Right now, i work around that by selecting a few frames from the video, then render to jpeg destination. Still a bit clumsy, but the best way to do it i found.

5 thoughts on “Video editing with Cinelerra

  1. igor_ubuntu

    //Video size detection.. .. open the file in vlc, and use view codec information ..//
    Ein Rechtsklick in das Resources-Fenster öffnet ein Kontextmenü:
    Info.: Sie erhalten detaillierte Informationen zu dem Medium.

    //i’ll have to adjust the track and output size to the new video, and i haven’t found a way to auto-set//
    Ein Rechtsklick in das Resources-Fenster öffnet ein Kontextmenü:
    An Projektgröße anpassen
    An Framerate anpassen

    From Manual:http://cinelerra-cv.org/docs/cinelerra_cv_manual_en.html#SEC140
    The output size is set in either New when creating a new project or Settings->Format. In the Resource window there is another way to change the output size. Right click on a video asset and select Match project size to conform the output to the asset. When new tracks are created, the track size always conforms to the output size specified by these methods.
    When rendering, the project’s output size is the final video track size where the temporary pipeline is rendered into.
    If the output size is larger than the temporary then the image transferred from the temporary will fit inside the Output Track. Any space left on the Output is left blank.

    Reply
    1. gbl Post author

      Thank you for your comment.

      However, the problem is that when i load a new video, the size of the tracks will not get adjusted. For example, i’m editing a 640×480 video, am done, and close the project. Now, i open a different, 720×576 video. The video clipsize, shown when i right-click the newly loaded video asset, is still set set to 640×480! Right click and select Match project size just re-copies the wrong 640×480; unfortunately, i haven’t found a ‘set the asset size and/or the output size to the real size of the loaded track’.

      Reply
  2. igor_ubuntu

    //The video clipsize, shown when i right-click the newly loaded video asset, is still set set to 640×480!//
    Wo machst du das – “right-click the newly loaded video” ? Im Resources -Info ?
    Oder im Menü “Track Size” (Right click on a track -> track’s menu) ?
    Oder im Menu Einstellungen / Format ?

    5.2.1 Insertion strategy
    http://cinelerra-cv.org/docs/cinelerra_cv_manual_en.html#SEC89
    Replace current project
    All tracks in the current project are deleted and a set of new tracks are created to match the source file. Project attributes are only changed when loading XML.

    8.2.6.1 Track size
    http://cinelerra-cv.org/docs/cinelerra_cv_manual_en.html#SEC141
    Select Resize Track (Right click on a track -> track’s menu) to resize the track to any arbitrary size. Alternatively you can select Match output size to make the track the same size as the output.

    8.2.6.2 Output size
    http://cinelerra-cv.org/docs/cinelerra_cv_manual_en.html#SEC142
    In the Resource window there is another way to change the output size. Right click on a video asset and select Match project size to conform the output to the asset. When new tracks are created, the track size always conforms to the output size specified by these methods.

    Cinelerra Anleitungen (auf Deutsch)
    https://www.youtube.com/playlist?list=PLxMC0gN6SN_3a4SNpzYYxgUb93mVk9QcP

    Video4Tux/playlists – Linux-Videoschnitt (auf Deutsch)
    https://www.youtube.com/user/Video4Tux/playlists

    Linux-Videoschnitt mit Cinelerra
    http://www.pc-magazin.de/ratgeber/linux-videoschnitt-mit-cinelerra-127940.html

    Videoschnitt-mit-Cinelerra
    http://www.linux-community.de/Internal/Artikel/Print-Artikel/LinuxUser/2006/04/Videoschnitt-mit-Cinelerra

    Ist der Sachverhalt für Sie nun verständlicher? 🙂
    Wenn nicht, dann sage mir einfach nochmal, was genauer du nicht verstehst.

    Reply
  3. gbl Post author

    Thank you, i misunderstood your first answer. Right clicking tracks in the program screen shows the dimensions cinelerra will apply to the movie, while using Info in the resource window works correctly. See http://youtu.be/nHKwDPcD86g. (I admit it’s bad, but that’s how it is with your first attempts.)

    Reply
  4. igor_ubuntu

    // -loading does not change the track size//
    //-does not change the track size the output size//

    Einfügestrategie:

    -Ersetze aktuelles Projekt
    ODER
    -Ersetze aktuelles Projekt und hänge Spuren aneinander
    Egal – Project attributes are only changed when loading XML !!

    Also, nach der Ladung der benötigten Medien (ohne Projekt) hast du jetzt diesen Weg:

    – Schritt 1 : Resources -> Right click – Match project size
    – Schritt 2 : Right click on a track -> track’s menu – Match output size
    —–
    Oder
    – Datei -> Neu ( Menüeintrag zum Anlegen eines neuen Projekts)
    – die Ladung der benötigten Medien
    ** Einstellungen -> Format -> Bildformatgröße – daß ist die Größe des End-Resultates “the project’s output size”**
    —————————————
    —————————————
    // -by the way, these disappearing frame previews area real annoying bug i have//
    – No, it not an bug. The program works completely correctly.

    http://cinelerra-cv.org/docs/cinelerra_cv_manual_en.html#SEC140
    The size of the temporary and the size of the output in our compositing pipeline are independent and variable. This fits into everything covered so far. The camera’s viewport is the temporary size. Effects are processed in the temporary and are affected by the temporary size. Projectors are rendered to the output and are affected by the output size. *** If the temporary is smaller than the output, the temporary is bordered by blank regions in the output. If the temporary is bigger than the output, the temporary is cropped ***

    http://cinelerra-cv.org/docs/cinelerra_cv_manual_en.html#SEC142
    If the output size is larger than the temporary then the image transferred from the temporary will fit inside the Output Track. Any space left on the Output is left blank.
    If the output size is smaller than the temporary then some of the temporary video will be cropped out.

    The size of the viewport (camera) is defined by the size of the current track.
    The camera’s viewport is the temporary size 8.2.6
    The temporary size is defined as the track size. Each track has a different size 8.2.6.1

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *