Showing posts with label Kdenlive. Show all posts
Showing posts with label Kdenlive. Show all posts

Friday, 14 January 2011

Virtual Pianola...

In my quest to try out new things related to sound and music with my Ubuntu Studio laptop, I decided to try and emulate a pianola (or player piano), as seen in this video (you can see in the following link a real piano player in action).

The first thing was to change the preferences in MuseScore (version 0.9.6.2). In the I/O preferences tab, I selected "Use JACK MIDI output":



Then I restarted, Jack, Musescore and VMPK (version 0.3.0), but in the Jack Audio Connection Kit "Connections" view, I could see "Mscore1" in the MIDI tab as a readable client, but VMPK input only showed in the ALSA tab, so I could not connect them.




With the help of the experts at the UbuntuStudio mailing list I found out that I would require a bridge between alsa midi and jack midi: a2jmidid. The best option seems to just put "a2jmidid &" in the Jack Connection Setup "Execute script after Startup" Option, so that the bridge will be in place every time I start Jack.

With this in place, and after restarting everything, I can connect the output from MuseScore into VMPK (and also into "FLUID Synth": otherwise I will see the keys in VMPK being pressed, but we will get no sound).



Now we only need some nice music to demonstrate... and I download "Lock and Key" from http://musescore.org/en/node/6707. And everything seems to work pretty well. But I don't want you to take my word for it, so I planned to record it.

I used gtk-recordMyDesktop (version 0.3.8), which is a front-end for recordMyDesktop. With it (in the Sound tab), you can click "Use jack for audio capture", but with this option enabled I always got errors like "... exited with status: 2816. Description: Improper window specification.", so I decided to record the sound (with Ardour) and the video (with recordMyDesktop) separately, and then mix it with Kdenlive.

Kdenlive is not happy with the .ogv file created by recordMyDesktop, so first I had to convert it to an .avi file with the command:

angelv@palas:~$ mencoder -ovc lavc -ofps 30 pianola.ogv -o pianola.avi

Synchronizing audio and video is not always straightforward always, but for this video it was quite easy. The resulting video can be seen at: http://vimeo.com/18783287



Saturday, 13 November 2010

Editing videos from a Pentax Optio M40 camera

In a previous post I have a link to a Vimeo video, which was created by:
  1. recording a video with my Pentax Optio M40 camera
  2. cutting the beginning and the end of the video with the PiTiVi software
PiTiVi is not the video editing software that I would choose to do anything serious, but I had a problem with Kdenlive and OpenShot: the audio and video would be out of sync when importing the clip to any of them; but worse still, after cutting the beginning of the video, the problem just got much worse, and the audio would be out of sync by around a full second. With PiTiVi it was also out of sync, but only by a fraction of a second, so it was not too bad.

Today I decided to find a solution to this, so that I could edit the clip with Kdenlive, which is right now my preferred video editing software. The solution seems to use an intermediate software to create the clips to be imported to Kdenlive: Avidemux.

I just load the AVI file from the camera in Avidemux, select the starting and end points of the clip I want to use, and press the "Save" button. A screenshot can be seen here:


Then this clip can be imported into Kdenlive, without any synchronization problems. With Kdenlive we can now add a title, add effects, etc. and if we want a decent quality we can render it as the template MPEG-4 10000k 2-pass (which translates to:
f=mp4 acodec=libmp3lame ab=128k ar=44100 vcodec=mpeg4 minrate=0 b=10000k aspect=%dar mbd=2 trellis=1 mv4=1 pass=2).

The resulting file has perfect synchronization and can be uploaded to Vimeo without any problems and with much better quality than the one generated in my previous post. Here is the resulting video.