Tuesday, June 26, 2007

Compiz Fusion - the merge of Compiz and Beryl

What is Compiz Fusion?
Compiz Fusion is an extension of the Compiz compositing window manager for the X Window System. It was created from the remerging of Beryl into Compiz. It aims to port almost all of the features of Beryl to Compiz plugins, and continue to improve Compiz's core functionality.

Some screenshots (taken from my desktop):




































































































































Installation

This package is not officially included in main repository of Fedora. It is even conflicts with the official compiz package. For Fedora users, you can install it through yum with kageshensi's repo. Instructions are in there. Ubuntu users may want to check Ubuntu Forum for more info. Click here for a start.

Friday, June 22, 2007

Converting video and extracting audio from a video

Converting video formats into another

To convert mkv format to dvd format:

ffmpeg -i myfile.mkv -target dvd -copyts -aspect 16:9 myfile.mpg

To convert mp4 video to avi:

mencoder video.mp4 -ovc lavc -vf scale=352:288 -oac lavc -o video.avi

To convert avi to mpeg video:

ffmpeg -i video.avi -target pal-vcd video.mpg

or

ffmpeg -i video.avi -target pal-vcd -s 352x192 -padtop 32 -padbottom 32 video.mpg

Note: -target pal-vcd is for PAL. For NTSC, use -target ntsc-vcd. -padtop 32 and -padbottom 32 will add black padding at the top and bottom.

In certain cases, if you have problem with de-sync audio for the resulted mpeg, try using mencoder like this for PAL format VCD:

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:\
vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 \
-o movie.mpg movie.avi

More options can be found here.

To convert avi to SVCD format:

ffmpeg -i video.avi -target pal-svcd video.mpg

Note: -target pal-svcd is for PAL. For NTSC, use -target ntsc-svcd.

Burn to CDs
This command will cut the mpeg video files into 3 to fit 3 CDs.

mpgtx -3 video.mpg -b m

The resulting file will be m-1.mpg, m-2.mpg and m-3.mpg. These files can be burnt to one CD each. The argument -b means basename.

or you can also use avisplit to split AVI movie:

avisplit -s 700 -i video.avi

Where to get the tools?
If you use Fedora, you can install all of the tools with yum. For other distro, please consult the manual for it. avisplit is part of transcode package.

Fixing desynched audio

avisync is easy to use: just provide an input file (-i name.avi), an output file (-o newname.avi) and the synchronization offset in frames (-n count). From avisync's help: count>0: audio starts with frame 'count'. count>0: prepend 'count' padding audio frames.

An example:
avisync -i ally-not-synched.avi -o ally-synched.avi -n -2

Splitting AVIs

avisplit -i ally-big-file.avi -o ally -s 700

This will produce files named ally-0000.avi, ally-0001.avi etc. that are each 100megs big at most.

Extracting audio from VOBs/MPEGs/AVIs

MPlayer can be used easily to extract sound. The -vo null options tells MPlayer not to show the video.
I'm not listing all possible options. Generally use -dumpaudio -dumpfile newaudio.extension if you want to extract the audio without processing and -ao pcm -aofile newaudio.wav if you want the WAV itself.

Using separate audio files

Sometimes you want to play another audio file along with your video. MPlayer makes this rather easy: mplayer -audiofile anotherlang.mp3 myvideo.avi plays video from myvideo.avi and audio from anotherlang.mp3. A lot of Windows media players support external audio files, too. This way you can provide several language versions as separate audio files. A combination often used is to have the AVI include the English audio track and to provide additional audio tracks in separate files.

A visual AVI editor: avidemux

If you've done video editing with Windows before you probably know the excellent OpenSource editor VirtualDub. An OpenSource utility for Linux that aims at providing the user with a similar set of features is avidemux. You can use it in order to easily cut specific parts from a movie, to apply filters, to reencode movies and to do a lot more. I suggest you take a look at it even if using the command line is as natural to you as it is for me.

Credit to :
moritz@bunkus.org (http://www.bunkus.org)
Gentoo Wiki (http://gentoo-wiki.com/HOWTO_Create_a_VCD_or_SVCD)
MPlayer Doc (http://www.mplayerhq.hu/DOCS/HTML/en/index.html)

Friday, June 8, 2007

yumex - yum extender

Installing a package in Fedora using yum is good. It is faster than pirut or pup in GUI. I discovered yumex a while ago. Installing it was trivial :

yum -y install yumex

It is a GUI-front-end for yum but faster than pirut or pup. The Ouput View gives you "what's going on'. I just love it. Try it!.





To make installation packages faster with yum, I highly recommend you to install the following yum plugins :
  1. yum-fastestmirror (yum install yum-fastestmirror)
  2. yum-skip-broken
To see other plugins for yum, please run this command: yum list "yum*"

Second monitor no display after latest update - KDE-neon

 After latest update as of Oct 3, 2023, my second monitor was undetected with latest kernel (6.2.0-33-generic). If I boot with previous kern...