I have been creating a some screencasts and posting the same on my blog recently. The list of videos have been linked in a separate videos tab. But whenever I uploaded the video onto youtube, it would complain that it is not able to detect any audio stream on my videos. That triggered an interest in experimenting with adding a sound track to one of my videos. I started searching on the net and tried to get some audio clips filed under "Creative commons" license. I found a webpage (Legal Music For Videos) which lists many sites which showcase good audio content. I narrowed down the choice of tracks to two of them and finally choose the first one.
Now comes the hard part of muxing / mixing of the audio track onto videos. Two potential candidate emerged that can easily mix audio streams onto video files. Both are command line tools (mencoder , ffmpeg). I saw sample code for both of them here. I also found that in order to use mencoder(based on mplayer), i had to un-install mplayer2-as-mplayer as it conflicts with mplayer backend :-(. I did not want to do this and opted for ffmpeg instead.
The command to mix the audio into video is pretty basic
I choose one of my recent videos and tried to add the sound track. I substituted the file names as appropriate and got the below command and it did produce a output file. But when i played the output video i found that audio kept playing even after the video had ended. I realised that this was due to the audio track length being greater than that of video.
After making a few more search I found this page which talked about using the "shorten" option. I opened "man" for ffmpeg in GNOME "help browser" using command launcher (Alt+F2) and command "xdg-open man:ffmpeg".Demystifying Man explains various ways of using man command. I found that "shortest" option should be used in a manner as shown below and came up with revised code to convert the video.
-shortest (output) - Finish encoding when the shortest input stream ends.
Demo video where i have mixed audio stream and video Stream of different playlengths. Since the audio is lifted from a Gramophone record it is course at some places.
Yesterday I saw a comment in one of my articles about "Adding a new application to Universal Access Settings". Brief transcript of the conversation is as below :-
@Yogesh-I want to add my own new customize setting in this menu? is it possible ,if yes then how? @vazhavandan- what kind of customised setting do you want ? Please be more specific @super hero -i want to add new feature in universal access setting panel that will open particular application for eg.Eekboard
I admit that i am not geeky enough to hack "Universal Access menu". Here is my workaround.
I first install Eekboard(eekboard is a virtual keyboard) using the one click from this page.
Then i set about installing a extension known as QuickLaunch. For more details about some cool extensions one can take a look at this article.
Then i restart GNOME Shell using command launcher (Alt+F2) and then typing in r followed by return or enter key. Now the extension will appear in top panel / taskbar.
I click on "Create new launcher..' menu in the extension and it opens up"gnome-desktop-item-edit" application where i can create shortcut for any application.
Notes
By default all new shortcuts or launchers are placed in below folder:- /home/<profileName>/.local/share/gnome-shell/quicklaunch
(OR) ~/.local/share/gnome-shell/quicklaunch
All the GNOME Shell Extensions are installed into below folder:- /home/<profileName>/.local/share/gnome-shell/extensions
(OR) ~/.local/share/gnome-shell/extensions
Creating new menu item for Eekboard
Now i can launch the application using the new menu
Update to Article:-
The user pointed out that he / she did not want to use quicklaunch and pointed out to files under frolder /usr/share/gnome-shell/js/ui/status/
@super hero - Thank You for your reply. i don't want to use Quick Launch. I want to add new option on Universal Access setting Panel ,which will open installed application. i came to know about accessibility.js file (/usr/share/gnome-shell/js/ui/ status/),which has all UI details, but i am not getting how it launches that particular application.
I found the file in question accessibility.js and I opened that file and added the below lines and it worked. I never dreamt GNOME would be some simple to change :-) this.menu.addSettingsAction(_("Universal Access Settings"), 'gnome-universal-access-panel.desktop');
//Add the damn new virtual keyboard
this.menu.addSettingsAction(_("Eekboard"), 'eekboard.desktop');