Mudanças entre as edições de "Conversão de Formatos Vídeos e extras"
De MochilaWiki
Ir para navegaçãoIr para pesquisarLinha 55: | Linha 55: | ||
$ transcode -i eita.mov -y dvraw -o eita.dv | $ transcode -i eita.mov -y dvraw -o eita.dv | ||
$ transcode -i eita.avi -y mov -o eita.mov | $ transcode -i eita.avi -y mov -o eita.mov | ||
+ | |||
+ | === Android Conversions === | ||
+ | |||
+ | {| class="wikitable collapsible" style="width:75%; margin:auto; vertical-align: text-top" | ||
+ | ! scope="col" width="18%" | Device | ||
+ | ! scope="col" width="15%" | Screen Resolution | ||
+ | ! scope="col" width="67%" | Command | ||
+ | |- valign="top" | ||
+ | ! scope="row" | Nexus One | ||
+ | | align="center" | 800×480 | ||
+ | | | ||
+ | ;<span style="font-size: x-small">Input Video Size > 800×480</span> | ||
+ | :<code>ffmpeg -i '''INPUT''' -y -acodec aac -ac 2 -ab 160k -s 800x480 -vcodec libx264 -vpre iPod640 -vpre slow -f mp4 -threads 0 '''OUTPUT.mp4'''</code> | ||
+ | ;<span style="font-size: x-small">Input Video Size <= 800×480</span> | ||
+ | :<code>ffmpeg -i '''INPUT''' -y -acodec aac -ac 2 -ab 160k -vcodec libx264 -vpre iPod640 -vpre slow -f mp4 -threads 0 '''OUTPUT.mp4'''</code> | ||
+ | |- valign="top" | ||
+ | ! scope="row" | Dream / G1 | ||
+ | | align="center" | 480×320 | ||
+ | | | ||
+ | ;<span style="font-size: x-small">Input Video Size > 480×320</span> | ||
+ | :<code>ffmpeg -i '''INPUT''' -y -acodec aac -ac 2 -ab 160k -s 480x320 -vcodec libx264 -vpre iPod640 -vpre slow -f mp4 -threads 0 '''OUTPUT.mp4'''</code> | ||
+ | ;<span style="font-size: x-small">Input Video Size <= 480×320</span> | ||
+ | :<code>ffmpeg -i '''INPUT''' -y -acodec aac -ac 2 -ab 160k -vcodec libx264 -vpre iPod640 -vpre slow -f mp4 -threads 0 '''OUTPUT.mp4''' </code> | ||
+ | |- valign="top" | ||
+ | ! scope="row" | Droid | ||
+ | | align="center" | 854×480 | ||
+ | | | ||
+ | ;<span style="font-size: x-small">Input Video Size > 854×480</span> | ||
+ | :<code>ffmpeg -i '''INPUT''' -y -acodec aac -ac 2 -ab 160k -s 854x480 -vcodec libx264 -vpre iPod640 -vpre slow -f mp4 -threads 0 '''OUTPUT.mp4'''</code> | ||
+ | ;<span style="font-size: x-small">Input Video Size <= 854×480</span> | ||
+ | :<code>ffmpeg -i '''INPUT''' -y -acodec aac -ac 2 -ab 160k -vcodec libx264 -vpre iPod640 -vpre slow -f mp4 -threads 0 '''OUTPUT.mp4'''</code> | ||
+ | |- | ||
+ | ! scope="row" | Magic / myTouch | ||
+ | | align="center" | 480×320 | ||
+ | | same as G1 | ||
+ | |- | ||
+ | ! scope="row" | Eris / Desire | ||
+ | | align="center" | 480×320 | ||
+ | | same as G1 | ||
+ | |- | ||
+ | ! scope="row" | Hero | ||
+ | | align="center" | 480×320 | ||
+ | | same as G1 | ||
+ | |- | ||
+ | ! scope="row" | Cliq / DEXT | ||
+ | | align="center" | 480×320 | ||
+ | | same as G1 | ||
+ | |- | ||
+ | ! scope="row" | Behold II | ||
+ | | align="center" | 480×320 | ||
+ | | same as G1 | ||
+ | |} | ||
+ | |||
+ | |||
+ | === Apple Format Conversions === | ||
+ | |||
+ | {| class="wikitable collapsible" style="width:75%; margin:auto" | ||
+ | ! scope="col" width="18%" | Device | ||
+ | ! scope="col" width="15%" | Screen Resolution | ||
+ | ! scope="col" width="67%" | Command | ||
+ | |- | ||
+ | ! scope="row" | iPhone / iPod Touch / iPod Nano / iPod Classic | ||
+ | | align="center" | 320×480 | ||
+ | | <code>ffmpeg -i '''INPUT'''-acodec aac -ac 2 -ab 160k -s 480x320 -vcodec libx264 -vpre slow -vpre iPod640 -b 1200k -f mp4 -threads 0 '''OUTPUT'''</code> | ||
+ | |- | ||
+ | ! scope="row" | iPhone 4 / iPod Touch 4 | ||
+ | | align="center" | 640×480 | ||
+ | | <code>ffmpeg -i '''INPUT'''-acodec aac -ac 2 -ab 160k -s 640x480 -vcodec libx264 -vpre slow -vpre iPod640 -b 1200k -f mp4 -threads 0 '''OUTPUT'''</code> | ||
+ | |- | ||
+ | ! scope="row" | iPad | ||
+ | | align="center" | 1024×768 | ||
+ | | <code>ffmpeg -i '''INPUT'''-acodec aac -ac 2 -ab 160k -s 1024x768 -vcodec libx264 -vpre slow -vpre iPod640 -b 1200k -f mp4 -threads 0 '''OUTPUT'''</code> | ||
+ | |- | ||
+ | ! scope="row" | Apple Universal | ||
+ | | align="center" | 1280×720 | ||
+ | | <code>ffmpeg -i '''INPUT'''-acodec aac -ac 2 -ab 160k -s 1080x720 -vcodec libx264 -vpre slow -vpre iPod640 -b 1200k -f mp4 -threads 0 '''OUTPUT'''</code> | ||
+ | |} | ||
+ | |||
+ | === PSP === | ||
+ | |||
+ | {| class="wikitable collapsible" style="width:75%; margin:auto" | ||
+ | ! scope="col" width="18%" | Device | ||
+ | ! scope="col" width="15%" | Screen Resolution | ||
+ | ! scope="col" width="67%" | Command | ||
+ | |- | ||
+ | ! scope="row" | PSP | ||
+ | | align="center" | 320×480 | ||
+ | | <code>ffmpeg -i '''INPUT''' -s 320x240 -b 512000 -ar 24000 -ab 64000 -f psp -r 29.97 '''OUTPUT''' </code> | ||
+ | |} | ||
+ | |||
+ | |||
+ | === Output Formats === | ||
+ | |||
+ | {| class="wikitable collapsible" style="width:75%; margin:auto" | ||
+ | ! scope="col" width="33%" | Format | ||
+ | ! scope="col" width="67%" | Command | ||
+ | |- | ||
+ | ! scope="row" | Theora | ||
+ | | see <span style="font-size: xx-small">http://github.com/8planes/mirovideoconverter/blob/master/MSWindows/Windows/ConversionFormats/TheoraVideoFormat.cs</span> | ||
+ | |- | ||
+ | ! scope="row" | MP4 | ||
+ | | <code>ffmpeg -i '''INPUT''' -acodec aac -ac 2 -ab 160k -vcodec libx264 -vpre slow -f mp4 -crf 22 '''OUTPUT'''</code> | ||
+ | |- | ||
+ | ! scope="row" | MP3 (audio only) | ||
+ | | <code>ffmpeg -i '''INPUT''' -f mp3 -y ''OUTPUT''' </code> | ||
+ | |- | ||
+ | ! scope="row" | WebM | ||
+ | | <code>ffmpeg_static -y -i INPUT -f webm -vcodec libvpx_vp8 -acodec libvorbis -ab 160000 -crf 22 OUTPUT </code> | ||
+ | |} | ||
+ | |||
+ | |||
+ | see TheoraTestMatrix | ||
+ | |||
+ | == Current conversion Commands in Miro 3.5.1 == | ||
+ | |||
+ | {| class="wikitable collapsible" style="width:75%; margin:auto" | ||
+ | ! scope="col" | Name | ||
+ | ! scope="col" | Executable | ||
+ | ! scope="col" | Extension | ||
+ | ! scope="col" | Parameters | ||
+ | ! scope="col" | Media Type | ||
+ | |- | ||
+ | ! scope="row" | Android Devices | ||
+ | | align="center" | ffmpeg | ||
+ | | align="center" | mp4 | ||
+ | | <code>-i {input} -y -acodec aac -ab 160k -s {ssize} -vcodec libx264 -vpre slow -vpre iPod640 -b 1500k -f mp4 -threads 0 {output}</code> | ||
+ | | align="center" | video | ||
+ | |- | ||
+ | ! scope="row" | Apple Devices | ||
+ | | align="center" | ffmpeg | ||
+ | | align="center" | mp4 | ||
+ | | <code>-i {input} -acodec aac -ab 160k -s {ssize} -vcodec libx264 -vpre slow -vpre iPod640 -b 1200k -f mp4 -threads 0 {output}</code> | ||
+ | | align="center" | video | ||
+ | |- | ||
+ | ! scope="row" | Playstation Portable (PSP) | ||
+ | | align="center" | ffmpeg | ||
+ | | align="center" | mp4 | ||
+ | | <code>-i {input} -s 320x240 -b 512000 -ar 24000 -ab 64000 -f psp -r 29.97 {output}</code> | ||
+ | | align="center" | video | ||
+ | |- | ||
+ | ! scope="row" | MP4 | ||
+ | | align="center" | ffmpeg | ||
+ | | align="center" | mp4 | ||
+ | | <code>-i {input} -acodec aac -ab 96k -vcodec libx264 -vpre slow -f mp4 -crf 22 {output}</code> | ||
+ | | align="center" | video | ||
+ | |- | ||
+ | ! scope="row" | MP3 | ||
+ | | align="center" | ffmpeg | ||
+ | | align="center" | mp3 | ||
+ | | <code>-i {input} -f mp3 -y {output}</code> | ||
+ | | align="center" | audio | ||
+ | |- | ||
+ | ! scope="row" | Ogg Theora | ||
+ | | align="center" | ffmpeg2theora | ||
+ | | align="center" | ogv | ||
+ | | <code>--videoquality 8 --audioquality 6 --frontend -o {output} {input}</code> | ||
+ | | align="center" | video | ||
+ | |- | ||
+ | ! scope="row" | Ogg Vorbis | ||
+ | | align="center" | ffmpeg | ||
+ | | align="center" | ogg | ||
+ | | <code>-i {input} -f ogg -vn -acodec vorbis -aq 60 {output}</code> | ||
+ | | align="center" | audio | ||
+ | |} | ||
+ | |||
[[Categoria:gnuzinho]] | [[Categoria:gnuzinho]] | ||
[[Categoria:Vídeo]] | [[Categoria:Vídeo]] |
Edição das 02h07min de 23 de julho de 2011
>> usando ffmpeg para converter arquivos de videos
$ ffmpeg -formats - para obter formatos suportados
mais usados:
- mpeg2video mjpeg indeo3 theora dvvideo mpge1video
- dvvideo DV video format
- mjpeg MJPEG video
- mpeg MPEG1 System format
- mpeg1video MPEG video
- mpeg2video MPEG2 video
- rawvideo raw video format
- theora Theora Video
sintaxes
- - i arquivo nome do arquivo de entrada
- - s tamanho tamanho do quadro (WxH, ex: 320x240)
- - vcodec codec vide video codec
- -sameq usar mesma qualidade do video original
- -acodec codec audio codec
- -an desabilite a conversar de áudio
mais informações em "man ffmpeg"
exemplos
um arquivo mov para o tamanho 320x240 com a mesma qualidade do original em no formato avi sem altera o som
$ ffmpeg -i acaodireta.mov -s 320x240 -sameq -vcodec mjpeg -an acaodireita-mjpeg.avi
arquivo (mp4,wmv,mov,mpg,ogg) para avi:
$ ffmpeg -i democratizacao.mpg -vcodec mjpeg democratizacao.avi
de avi para outros formatos
$ ffmpeg -i ocupacao.avi -vcodec dvvideo ocupacao.dv $ ffmpeg -i ocupacao.avi -vcodec theora ocupacao.ogg $ ffmpeg -i ocupacao.avi -vcodec mpeg2video ocupacao.mpg
projeto para dvd/vcd/pal-vcd/dv/svcd/ntsc-svcd
$ ffmpeg -i batemam.avi -target vcd batemam.mpg
ripando dvd com mencoder
com a saída no formato mpeg4
$ mencoder dvd:// -vf scale -zoom -xy 512 -o title2.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4
com a sáida no formato mpeg2
$ mencoder dvd:// -vf scale -zoom -xy 512 -o title2.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg2video
$ mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4:vhq -o orappa.avi orappa.mov $ mencoder -ovc lavc -lavcopts vcodec=mpeg2video -oac mp3lame clipegil.avi -o gclipe.avi $ mencoder -ovc lavc -lavcopts vcodec=mpeg2video -oac copy clipegil.avi -o gclipe.avi/ $ mencoder -ovc copy -oac copy clipegil.avi -o gclipe.avi
transcode - de mov para dv com
$ transcode -i eita.mov -y dvraw -o eita.dv $ transcode -i eita.avi -y mov -o eita.mov
Android Conversions
Device | Screen Resolution | Command |
---|---|---|
Nexus One | 800×480 |
|
Dream / G1 | 480×320 |
|
Droid | 854×480 |
|
Magic / myTouch | 480×320 | same as G1 |
Eris / Desire | 480×320 | same as G1 |
Hero | 480×320 | same as G1 |
Cliq / DEXT | 480×320 | same as G1 |
Behold II | 480×320 | same as G1 |
Apple Format Conversions
Device | Screen Resolution | Command |
---|---|---|
iPhone / iPod Touch / iPod Nano / iPod Classic | 320×480 | ffmpeg -i INPUT-acodec aac -ac 2 -ab 160k -s 480x320 -vcodec libx264 -vpre slow -vpre iPod640 -b 1200k -f mp4 -threads 0 OUTPUT
|
iPhone 4 / iPod Touch 4 | 640×480 | ffmpeg -i INPUT-acodec aac -ac 2 -ab 160k -s 640x480 -vcodec libx264 -vpre slow -vpre iPod640 -b 1200k -f mp4 -threads 0 OUTPUT
|
iPad | 1024×768 | ffmpeg -i INPUT-acodec aac -ac 2 -ab 160k -s 1024x768 -vcodec libx264 -vpre slow -vpre iPod640 -b 1200k -f mp4 -threads 0 OUTPUT
|
Apple Universal | 1280×720 | ffmpeg -i INPUT-acodec aac -ac 2 -ab 160k -s 1080x720 -vcodec libx264 -vpre slow -vpre iPod640 -b 1200k -f mp4 -threads 0 OUTPUT
|
PSP
Device | Screen Resolution | Command |
---|---|---|
PSP | 320×480 | ffmpeg -i INPUT -s 320x240 -b 512000 -ar 24000 -ab 64000 -f psp -r 29.97 OUTPUT
|
Output Formats
Format | Command |
---|---|
Theora | see http://github.com/8planes/mirovideoconverter/blob/master/MSWindows/Windows/ConversionFormats/TheoraVideoFormat.cs |
MP4 | ffmpeg -i INPUT -acodec aac -ac 2 -ab 160k -vcodec libx264 -vpre slow -f mp4 -crf 22 OUTPUT
|
MP3 (audio only) | ffmpeg -i INPUT' -f mp3 -y OUTPUT
|
WebM | ffmpeg_static -y -i INPUT -f webm -vcodec libvpx_vp8 -acodec libvorbis -ab 160000 -crf 22 OUTPUT
|
see TheoraTestMatrix
Current conversion Commands in Miro 3.5.1
Name | Executable | Extension | Parameters | Media Type |
---|---|---|---|---|
Android Devices | ffmpeg | mp4 | -i {input} -y -acodec aac -ab 160k -s {ssize} -vcodec libx264 -vpre slow -vpre iPod640 -b 1500k -f mp4 -threads 0 {output}
|
video |
Apple Devices | ffmpeg | mp4 | -i {input} -acodec aac -ab 160k -s {ssize} -vcodec libx264 -vpre slow -vpre iPod640 -b 1200k -f mp4 -threads 0 {output}
|
video |
Playstation Portable (PSP) | ffmpeg | mp4 | -i {input} -s 320x240 -b 512000 -ar 24000 -ab 64000 -f psp -r 29.97 {output}
|
video |
MP4 | ffmpeg | mp4 | -i {input} -acodec aac -ab 96k -vcodec libx264 -vpre slow -f mp4 -crf 22 {output}
|
video |
MP3 | ffmpeg | mp3 | -i {input} -f mp3 -y {output}
|
audio |
Ogg Theora | ffmpeg2theora | ogv | --videoquality 8 --audioquality 6 --frontend -o {output} {input}
|
video |
Ogg Vorbis | ffmpeg | ogg | -i {input} -f ogg -vn -acodec vorbis -aq 60 {output}
|
audio |