Site perso : Emmanuel Branlard

Subsections

13. Multimedia


13.1 Lire wmv windows media video ?

sudo aptitude install w32codecs

13.2 Video capture

% guvcview (bug with audio compresion though)

% ffmpeg
ffmpeg -f video4linux2 -i /dev/video0 -pix_fmt yuv420p -s vga -r 8 -f alsa -ac 1 -ar 16000 -i hw:1,0 -vcodec mpeg4 -b 400k -acodec libmp3lame -ab 80k video.avi

13.3 Timidity is not yet configured.

When running : /etc/init.d/timidity start
it shows

Timidity is not yet configured.
Enable Alsa Sequencer first by editing /etc/default/timidity.

sudo nano /etc/default/timidity
and uncomment the line for ALSASEQ

13.4 Timidity GUI

For debian, the one present by default:
timidity -ia file.midi 
For other interface look at timidity -h. 
GTK: -ig

13.5 Midi

   1. Install TiMidity++. If you are a Debian user, this package is available in the official repositories. Other binary versions may be available. You can also compile from source. Instructions and download location available at the TiMidity website. Binary packages for select distros:
          * Debian package
          * Slackware binaries
          * RPM packages
   2. Get some good sound patches. Debian users can use Freepats. But I recommend the eaw patches which are of higher quality. No Debian packages are available, but luckily you can just download it and extract it in any location. You can download the tar.gz here. Just extract it into your home directory. Let's say /home/hari/eawpats.
   3. Replace the default TiMidity++ timidity.cfg file (rename the old file to something like timidity.conf.old) with the one in the /home/hari/eawpats/linuxconfig folder. Just edit it to make sure the location points to the directory where you extracted the EAW patches. The config file is located usually in the /etc/timidity/ folder in Debian. I don't know about other distros. Here is how the file looks like. Just change the dir setting to whichever location you extracted the EAW patches to:

      dir /home/hari/eawpats/
      source gravis.cfg
      source gsdrums.cfg
      source gssfx.cfg
      source xgmap2.cfg
      #mid -> wav: timidity input.mid -Ow1S -s 44100 -o output.wav

All right, you've now installed it. To test it, you need to play a MIDI file. If you have one, just run

timidity filename.mid

13.6 FFMPEG et MP3 lame sous debian

http://blog.fclement.info/content/ffmpeg-et-mp3-avec-debian

conversion
ffmpeg -i %f -vn -ar 44100 -ac 2 -ab 128k -y %n.mp3

ffmpeg -i %f -vcodec mpeg2video -acodec libmp3lame -ar 22050 -s 320x240 -y %n.avi

ffmpeg -i Test_avi.avi -vcodec mpeg2video -acodec libmp3lame -ar copy -s copy -y out.avi

mencoder en 2 passes avec
-ovc lavc -lavcopts vcodec=mpeg4 avec un bitrate=(HxL)/325 à (HxL)/350 où H et L sont les largeur et hauteur.

Le bitrate video par défaut de mencoder, je crois est de 800. J'utilisais plutôt 900.







Emmanuel Branlard