Linux.com

Home Linux Community Community Blogs

Community Blogs



Howto create a video with Linux and publish it on YouTube

Introduction

This time I'd like to share with you a simple method for creating a screen cast, adapt it to a common format and finally publish your job to YouTube or another web video sharing service. In my everyday job I need to create documentation and a video is something simple, direct and easy to understand for everyone.

Publishing some videos has never been so easy if you work with a Linux workstation, this is a step by step guide for the average Linux user.

One of the simplest program around for recording screen casts is “RecordMyDesktop”, if you use Gnome you've gtkrecordmydesktop, on KDE there are qt-recordmydesktop and recordmydesktop-kde, by the way, it doesn't matter which version you're using, when you start it you'll have a tiny window like this:

 

 

Basic Settings

In my example I'll record a GEDIT session, but before selecting the full screen or the targeted window let's check the advanced settings to see my changes, just press “Advanced” button to see something, here's what I've changed:

 

in the “Performance” tab I've setup a low frame rate because I'm recording just desktop applications, I've disabled “Encode on the fly” and enabled “Zero Compression”.

With these settings even if you've a low end computer you'll have a quite decent video and audio, my first big problem with RecordMyDesktop was related to audio or video out of sync, with a setting like that you'll waste a lot of space but at least you've a well formed audio/video stream; you'll process your video later to adjust size and various optimizations.

Let's record something...

Resize your window to meet your needs and press the “Record” button and do something with your app, when you're done just press “Stop” in the top right corner where RecordMyDesktop resides (Gnome App for me...).

If you're a command line guru and you prefer to use a script or something like that you can run a command like this:

recordmydesktop --width=1024 --height=768 -x=10 -y=50 --overwrite -o out.ogv

This starts RecordMyDesktop with a 1024x768 window located starting from X=10, Y=50 from the top left, so I can place my app in that position and cut my Gnome menu bar, this is what I do for recording web screen casts, “overwrite” wipes existing out.ogv (default output file) if any. Take a look at the man page for further details. If you're using the command line directly you need to hit Ctrl-C to stop the recording.

Process your video

Now it's time to process your video and encode it in a well common format, if you upload videos on YouTube you can upload basically everything you want, from open formats like OGV, 3GP files from cellular phones, AVI files and so on. I've decided to convert my videos to AVI files and then upload them to YouTube, I just need to shrink my uncompressed video, resize it and convert into an AVI container. To achieve this task you can use one of these tools:

mencoder

mencoder your.recorded.file.ogv -ovc xvid -oac mp3lame -xvidencopts
-vf scale=1024:768 -o your.recorded.file.avi


ffmpeg2theora

ffmpeg2theora --videoquality 10 --audioquality 10 -optimize -x 1024 -y 768
your.recorded.file.ogv -o your.recorded.file.avi


ffmpeg

ffmpeg -threads 2 -i
your.recorded.file.ogv -f avi -r 29.97 -vcodec libxvid -vtag XVID -s
1024x768 -aspect 4:3 -maxrate 1800kb -b 1500kb -qmin 3 -qmax 5
-bufsize 4096 -mbd 2 -bf 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2
-g 300 -acodec libmp3lame -ar 48000 -ab 128kb -ac 2
your.recorded.file.avi


All these commands resize an input video to a 1024x768 (HD) AVI file suitable for a YouTube upload. I personally prefer the third option and I always use ffmpeg heavily, command line options were taken from WinFF (ffmpeg GUI), I suggest to use it to avoid audio/video sync problems.

Adjust size to proper values if you need a different resolution, in my example I'm using 1024x768.

 

Now with your new AVI file you'll be able to upload it directly to YouTube without worries and having it quickly available without heavy post processing jobs from Google

Here's a sample.

 

News Update: Do you want to convert smartphone .3GP files to an AVI in the same way ? Read my "Convert 3GP to AVI (from smartphone to PC or YouTube)" blog [linux.com]

 

Glad to receive your comments and add your tips to the command list as well

 

Ben

 

Italian Left Leader signs Berlusconi-like deal with Microsoft

Nichi Vendola, president of Italian left party SEL, that says "we believe that for a modern party speaking of copyleft, Free Software and Net Neutrality is as necessary as speaking of jobs...and civil rights", signs today a deal with Microsoft similar to the one, which makes it easier to promote Microsoft Software in Italian Public Schools, signed by the Berlusconi government last year: read the Stop for details.

 

 

Three things to not forget to make LibreOffice (and ODF) succeed

the success of OpenOffice, LibreOffice and of the only thing that really matters here, that is ODF depends (also) on properly handling three issues: make it possible to support users via email, explain fragmentation and never, ever mess with ODF.

 

A proposal for effective, volunteer-friendly user support in LibreOffice

OpenOffice.org has failed to provide effective user support via email. LibreOffice can and should avoid the same mistake. Here's how.

 

Free Software, Creative Commons much harder to emulate in material world

John Wilbanks, VP of Science Creative Commons, explains in a short interview why, exactly, Free SW and Creative Commons are a success worldwide and why it is much harder to replicate that success in other, material contexts, even when people want to be open.

 

How to enable wireless in RHEL 6.0

1. Firstly, we must find out what exactly wireless device we own, you can use lspci to list all devices,

# lspci

 

00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 11h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 11h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 11h Processor Link Control
01:05.0 VGA compatible controller: ATI Technologies Inc RS780M/RS780MN [Radeon HD 3200 Graphics]
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8042 PCI-E Fast Ethernet Controller (rev 10)
06:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01)

Here is my wireless device information: Broadcom Corporation BCM4312 802.11b/g, then we can search the drivers in www.broadcom.com, and download the suitable drivers for your devices, the following is my devices drivers download links.

 

32bit: http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_x86-32_v5.60.246.6.tar.gz

64bit: http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_x86-64_v5.60.246.6.tar.gz

readme: http://www.broadcom.com/docs/linux_sta/README.txt

2. Compile the drivers

# tar xvf hybrid-portsrc_x86-64_v5.60.246.6.tar.gz

# ls

lib                Makefile        README.txt      src

# make

# ls

 

built-in.o  Makefile       Module.symvers  src    wl.ko.unsigned  wl.mod.o
lib         modules.order  README.txt      wl.ko  wl.mod.c        wl.o

 

When make completes, It will produce a wl.ko file in the top level directory. 

3. Find out what wireless driver are using now, and install the new driver

# lspci -k 

 

06:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01)
Subsystem: Hewlett-Packard Company Device 1508
Kernel driver in use: ssb
Kernel modules: ssb

# cp wl.ko /lib/modules/`uname -r`/kernel/net/wireless/

# depmon

# modprove wl

# echo "blacklist ssb" >> /etc/modprobe.d/blacklist.conf

# mkinitrd /boot/initrd-`uname -r`.img `uname -r`

# cat >> /boot/grub/grub.conf <

 

> title Red Hat Enterprise Linux (with wireless)

> root (hd0,6)

> kernel /vmlinuz-2.6.32-71.el6.x86_64 ro root=UUID=276d526c-8edb-4e6b-8c74-00b40d10544b rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet

> initrd /initrd-2.6.32-71.el6.x86_64.img

> EOF

# reboot 
reboot and use the correct grub entry to boot the kernel use new initrd image.

 

 

 

 

 

Sensitive Mouse for Linux

The idea is simple. With readily available parts companies could change existing USB mouse products to make buttons or a button on the mouse position sensitive.

The reason is that it would give the novice who might not be used to a penn-tablet working in Blender 3D or Gimp a lot more control. There it could be used for changing strength or size of a tool.

With such a mouse you can make the novice ( like me ) be able to control a whole lot more than just clicking. I for one would like one for when sculpting in 3D where delicate touch and flow is needed.

Maybe it could be a very cheap starting point for a transition to a proper tablet.

The idea is meant for companies who fully support the Linux effort.

 

In the below example I made a wooden pencil inspired mouse with a long spring loaded third button capable of detecting how much it has been pressed.

 

Example

 

 

and I LOVE Blender. Here is my first 3D model of a fish.

 

 

 

Android as mobile payment

With the Announcement yesterday (http://unplugged.rcrwireless.com/index.php/20101116/devices/5192/schmidt-android-2-3-gingerbread-to-include-nfc-for-fast-payment/) that android 2.3 will include RFID technology to allow touchless payment options I finally got scared. Yes, it may be a good idea to consolidate as many tools and functions as possible into a mobile device to save space and time, but this announcement seems too soon.

Read more... Comment (0)
 

fOSSa 2010 in Grenoble: software patents, FOSS on european public desktops and more

at the FOSS in Academia conference there were discussions about Open Government via FOSS, the bad situation of FOSS desktops in european public administrations and even a proposal for an european anti-software patents law. Here is my report about these and other parts of the conference.

 

The connections among Education, Green ICT and Free Software

During the fOSSa 2010 conference in Grenoble, several speakers talked about how much Free/Open Source Software (FOSS) is important in two fields that are strictly related for the future of our society: education and environmental sustainability. This is a synthesis of the most important points that emerged in those talks.

 

It is time to standardize game development

Today a friend asked me why games are only available for specific platforms, which led me to explain the different potential architectures and possible libraries that need to be used for each platform. This led to a great thought.

In efforts to increase evolution, simplify the development, expand market potential and increase potential profits for game developers it is time for the open source community to build proper solution. I am not a game developer, so I cannot start a project, only share the idea and hope someone will step up.

Read more... Comment (0)
 
Page 19 of 122

Upcoming Training Courses

  1. LF411 Embedded Linux Development
    24 Jun » 28 Jun - Silicon Valley
    Details
  2. LF331 Developing Linux Device Drivers
    05 Aug » 09 Aug - Virtual
    Details
  3. LF320 Linux Kernel Internals and Debugging
    12 Aug » 16 Aug - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board