Convertendo arquivos de vídeo em Linux para AVI e MPEG 
Abaixo segue alguns comandos e programas para converter os principais arquivos de vídeo em 
Linux . Todos serão convertidos em 
AVI  ou 
MPEG . É importante ter instalado os programas 
mencoder  e o 
ffmpeg .
De RMVB para AVI:
$ mencoder ARQUIVO.rmvb -oac mp3lame -lameopts br=192 -ovc lavc -lavcopts vcodec=mpeg4:vhq -o NOVOARQUIVO.avi 
De WMV para AVI:
$ mencoder ARQUIVO.wmv -ofps 23.976 -ovc lavc -oac copy -o NOVOARQUIVO.avi 
De MOV para AVI:
$ mencoder -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame -lameopts vbr=3 ARQUIVO.mov -o NOVOARQUIVO.avi -v 
De FLV para MPG:
$ ffmpeg -i ARQUIVO.flv -r 60 -ab 56 -ar 22050 -b 500 -s 320x240 NOVOARQUIVO.mpg 
De MPG para AVI:
$ mencoder ARQUIVO.mpg -ovc xvid -oac mp3lame -xvidencopts bitrate=800 -o NOVOARQUIVO.avi 
De 3GP para MPG:
Use o MMC:
Para editar vídeos AVI ou MPG:
Avidemux - 
http://avidemux.sourceforge.net/  
 
Outras dicas deste autor
 
 
 
Leitura recomendada 
 
 
 
 
 
 
Comentários
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							Muito bom ! Simples e objetivo ! Só faltou a opção wmv para mpg, mas é simples também é só alterar as extensões no final... 
mencoder ARQUIVO.wmv -ofps 23.976 -ovc lavc -oac copy -o NOVOARQUIVO.avi 
Esta opção está sem o "$" por que pode ser executado direto na pasta onde o arquivo se encontra. (ambiente gráfico KDE)
Ferramentas>Executar comando do Shell é só colocar a linha de comando e pronto !
Testei e deu certo valeu pela dica !
[]
 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							Mais um:
### OGG para AVI ###
encoder -idx ARQUIVO.ogg -ovc lavc -oac mp3lame -o ARQUIVO.avi 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							De avi para mpg somente através do Avidemux ?  
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							Flv para Mpg
erro:
ffmpeg: error while loading shared libraries: /usr/lib/libavcodec.so: undefined symbol: NeAACDecOpen
Como posso resolver ?
[]
 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							Deve ser algum problema de codec, ou mesmo da biblioteca, já que ele nem conseguiu encontrar esse simbolo chamado de NeAACDecOpen, para resolver isso é bom dar uma olhada no código fonte ou mesmo relatar como bug para o pessoal do ffmpeg 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							Poxa vlwsss mas eu preciso mesmo eh de AVI para MPEG 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							?comentario=E de AVI para MPG? É só mudar a extensão?
 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							vixi aqui não funcionou de rmvb para avi:
[rogerio@linuxdell Desktop]$ mencoder CB_aula1_part1.rmvb -oac mp3lame -lameopts br=192 -vc lavc -lavcopts vcodec=mpeg4:vhq -o CB_aula1_part1.avi
MEncoder 1.0rc2-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Celeron(R) CPU 2.40GHz (Family: 15, Model: 4, Stepping: 1)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0  data: 0x0 - 0x4ab56ec
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]  352x240  24bpp  29.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:11  fourcc:0x30345652  size:352x240  fps:29.00  ftime:=0.0345
No video encoder (-ovc) selected. Select one (see -ovc help).
Exiting...
 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							gostei muito dessa dica resolveu o que eu queria!
Muito obrigado =D 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							Pessoal! OI, EU TAMBÉM TIVE PROBLEMAS PARA CONVERTER....deu praticamente o mesmo erro do seguinte comentário:
Comentário enviado por cassimirinho em 28/03/2008 - 14:17h:
vixi aqui não funcionou de rmvb para avi:
[rogerio@linuxdell Desktop]$ mencoder CB_aula1_part1.rmvb -oac mp3lame -lameopts br=192 -vc lavc -lavcopts vcodec=mpeg4:vhq -o CB_aula1_part1.avi
MEncoder 1.0rc2-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Celeron(R) CPU 2.40GHz (Family: 15, Model: 4, Stepping: 1)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0 data: 0x0 - 0x4ab56ec
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] 352x240 24bpp 29.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:11 fourcc:0x30345652 size:352x240 fps:29.00 ftime:=0.0345
Mas o meu deu erro na linha de comando:
semptoshiba:~$ mencoder Sakura_01_sagara_Maxanimes.rmvb -oac mp3lame -ovc xvid - xvidencopts pass=1 -Sakura_01_sagara_Maxanimes.avi
MEncoder dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Celeron(R) CPU          420  @ 1.60GHz (Family: 6, Model: 22, Step ping: 1)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
-Sakura_01_sagara_Maxanimes.avi is not an MEncoder option
Exiting... (error parsing command line)
Alguém ajuda?
No video encoder (-ovc) selected. Select one (see -ovc help). 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							Thifhany voce tem que retirar o - do ultimo nome Sakura_01_sagara_Maxanimes.avi
mencoder Sakura_01_sagara_Maxanimes.rmvb -oac mp3lame -ovc xvid - xvidencopts pass=1 -Sakura_01_sagara_Maxanimes.avi  fica como
mencoder Sakura_01_sagara_Maxanimes.rmvb -oac mp3lame -ovc xvid - xvidencopts pass=1 Sakura_01_sagara_Maxanimes.avi
 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							FANTASTICO POST !!!
Simples, direto, rápido e prático.
VALEU!!  
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							NO MEU DEU ESSE ERRÃO AÍ QUANDO TENTEI CONVERTER DE RMBV PARA AVI. DEVE ESTÁ FALTANDO UM MONTE DE COISA.
ALGUÉM PODE ME AJUDAR
root@carlos-desktop:/home/carlos/Downloads# mencoder Trama.Internacional.DVD-r5.RMVB.BnM.rmvb -oac mp3lame -lameopts br=192 -ovc lavc -lavcopts vcodec=mpeg4:vhq -o Trama.Internacional.avi
MEncoder 2:1.0~rc2-0ubuntu17 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) Dual  CPU  E2160  @ 1.80GHz (Family: 6, Model: 15, Stepping: 13)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0  data: 0x0 - 0x15c90f06
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]  720x288  24bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:11  fourcc:0x30345652  size:720x288  fps:25.00  ftime:=0.0400
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 44.1 kbit/3.12% (ratio: 5512->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 0x30345652.
Read DOCS/HTML/en/codecs.html!
==========================================================================
Exiting...
 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							Me foi muito util esa dica, obrigado.
mas vc teria alguma coisa para converter de AVI para WMV ??
abraços 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							Muito boa a dica, apenas a observar que, no caso de converter .mov para .avi, há uma perda de qualidade da ordem de 80% (converteu um arquivo .mov de 61MB para 4.7MB .avi) 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
	
		
		
	
	
	
	
	
	
		
			
				
				
					
					
						
							Mensagem 
							Comigo não deu certo
apareceu o seguinte:
 $ mencoder LostS06E16.rmvb -oac mp3lame -lameopts br=192 -ovc lavc -lavcopts vcodec=mpeg4:vhq -o LostS06E16.avi 
MEncoder 2:1.0~rc2-0ubuntu13.1 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Core(TM)2 Duo CPU     E7400  @ 2.80GHz (Family: 6, Model: 23, Stepping: 10)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
File not found: 'LostS06E16.rmvb'
Failed to open LostS06E16.rmvb.
Cannot open file/device.
Exiting...
 
						 
					
	
					 
				 
			 	
			
		 
	 
	 
	
 
Contribuir com comentário 
 
Enviar