Translate

domingo, 25 de octubre de 2009

CONVERTIR VIDEO RMVB A AVI

Después de probar varias opciones para convertir vídeo RMVB a AVI, con el comando mencoder, la única forma que pude convertirlo fue la siguiente:

Primero:
Instalar el repositorio medibuntu de la siguiente forma:

sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list --output-document=/etc/apt/sources.list.d/medibuntu.list

sudo apt-get -q update

sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring

sudo apt-get -q update


Luego de instalar este repositorio instale los siguientes paquetes:

sudo apt-get install mencoder mplayer librte1 librte-dev non-free-codecs
Por ultimo baje el reproductor Real Player para Linux que baja con extensión bin (RealPlayer11GOLD.bin) al cual hay que darle permisos de ejecucion (chmod 755 RealPlayer11GOLD.bin) y por ultimo en /usr/local/codecs hice un links simbolico desde /opt/real/codecs/ donde se encuentra el archivo drvc.so el cual necesita para convertir el video, sino me probocaba el siguiente error:

csottile@smarcnet:~$ mencoder p-CrossingO778.rmvb -oac mp3lame -lameopts preset=128 -ovc lavc -lavcopts
vcodec=xvid -ofps 25 -of avi -o p-Crossing.avi
MEncoder 2:1.0~rc2-0ubuntu19 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Core(TM)2 CPU T5200 @ 1.60GHz (Family: 6, Model: 15, Stepping: 6)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0 data: 0×0 – 0×1467c56d
REAL file format detected.
Stream description: Audio Stream
Stream mimetype: audio/x-pn-realaudio
[real] Audio stream found, -aid 0
Stream description: Video Stream
Stream mimetype: video/x-pn-realvideo
[real] Video stream found, -vid 1
Stream mimetype: logical-fileinfo
VIDEO: [RV40] 672×272 24bpp 23.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:11 fourcc:0×30345652 size:672×272 fps:23.00 ftime:=0.0435
=================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 64.1 kbit/4.54% (ratio: 8010->176400)
Selected audio codec: [ffcook] afm: ffmpeg (FFmpeg COOK audio decoder)
=================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
===================================================
Opening video decoder: [realvid] RealVideo decoder
Error: /usr/lib/codecs/drvc.so: cannot open shared object file: No such file or directory
Win32 LoadLibrary failed to load: drvc.so, /usr/lib/win32/drvc.so, /usr/local/lib/win32/drvc.so
Error loading dll
ERROR: Could not open required DirectShow codec drvc.so.
Read the RealVideo section of the DOCS!
VDecoder init failed :(
Opening video decoder: [realvid] RealVideo decoder
Win32 LoadLibrary failed to load: drvc.dll, /usr/lib/win32/drvc.dll, /usr/local/lib/win32/drvc.dll
Error loading dll
ERROR: Could not open required DirectShow codec drvc.dll.
Read the RealVideo section of the DOCS!
VDecoder init failed :(
Opening video decoder: [realvid] RealVideo decoder
Error: /usr/lib/codecs/drv4.so.6.0: cannot open shared object file: No such file or directory
Win32 LoadLibrary failed to load: drv4.so.6.0, /usr/lib/win32/drv4.so.6.0, /usr/local/lib/win32/drv4.so.6.0
Error loading dll
ERROR: Could not open required DirectShow codec drv4.so.6.0.
Read the RealVideo section of the DOCS!
VDecoder init failed :(
Opening video decoder: [realvid] RealVideo decoder
Win32 LoadLibrary failed to load: drv43260.dll, /usr/lib/win32/drv43260.dll, /usr/local/lib/win32/drv43260.dll
Error loading dll
ERROR: Could not open required DirectShow codec drv43260.dll.
Read the RealVideo section of the DOCS!
VDecoder init failed :(
Opening video decoder: [realvid] RealVideo decoder
Error: /usr/lib/codecs/drvc.bundle/Contents/MacOS/drvc: cannot open shared object file: No such file or directory
Win32 LoadLibrary failed to load: drvc.bundle/Contents/MacOS/drvc, /usr/lib/win32/drvc.bundle/Contents/MacOS/drvc, /usr/local/lib/win32/drvc.bundle/Contents/MacOS/drvc
Error loading dll
ERROR: Could not open required DirectShow codec drvc.bundle/Contents/MacOS/drvc.
Read the RealVideo section of the DOCS!
VDecoder init failed :(
Cannot find codec matching selected -vo and video format 0×30345652.
Read DOCS/HTML/en/codecs.html!

Una vez echo este link simbolico, cree un script muy simple que lo llame convertervideo.sh la siguiente linea nada mas:

Opción 1:
mencoder -oac mp3lame -lameopts cbr=128 -ovc xvid -xvidencopts bitrate=1200 video.rmvb -o video.avi

Opción 2:
mencoder -oac mp3lame -lameopts cbr=128 -vf scale=640:272 -ovc xvid -xvidencopts bitrate=1200 -ofps 25 -of avi p-Proposl198.rmvb -o p-Proposl198.avi

le di permiso de ejecucion y lo ejecute y todo esta funcionando correctamente.

REFERENCIAS

:: Repositorio de Mediubuntu:
http://www.medibuntu.org/

:: Para que tenga en cuenta, esta el site de Mplayer donde explica muy bien que significa cada opcion del mencoder y es la siguiente:
http://www.mplayerhq.hu/DOCS/HTML/en/index.html

:: Sitio donde bajar el Real Player
http://spain.real.com/realplayer/other-versions/

:: Los blog's que me ayudaron para llegar a buen puerto:
http://linuxsix.blogspot.com/2008/11/convertir-rmvb-avi-en-gnu-linux.html
http://phyx.wordpress.com/2008/11/10/convertir-rmvb-a-avi-ubuntu/