Mi raccomando prova mpeg, mov e tutti i formati più strani che puoi :P
Mi raccomando prova mpeg, mov e tutti i formati più strani che puoi :P
Eccomi..
Ho provato un file mp4 a 720p scaricato da youtube.
Inizialmente mi chiede di specificare il formato:
Con h264 e yuv420p da errore, con 1280x720 fa tutto il processo ma alla fine il video è una linea di pochi pixel lunga tutto lo schermo.codice:The script was not able to auto-detect the aspect ratio. Please input the right AR (see the next line to guess it). Stream #0.1(und): Video: h264, yuv420p, 1280x720, 25 tbr, 25 tbn, 50 tbc
EDIT:
anche con questo video mov ho provato tutte le opzioni e il risultato è sempre di proporzioni sbagliate, molto schiacciato.
Questo video invece proprio non va,
è strano perchè è un file ripreso con un cellulare, quindi già mp4 solo con risoluzione diversa.codice:Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-libmp3lame --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libx264 --enable-libdc1394 --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Jun 18 2010 13:31:34, gcc: 4.4.3 tmp-video.mp4: Unknown format
Ti ho lasciato i 2 video se magari vuoi provare anche tu.
Eccomi!
Allora, ho riscritto quasi tutto il programma xD
1) l'aspect-ratio è tipo 4:3 (PAL), oppure 16:9 (tipo schermo N1), o rapporti strani per altrettanto strani filmati-> nel tuo caso 1280:720 = x:y => 16:9... di solito x:y è specificato nel video, ma a volte manca... è quindi necessario specificarlo (x e y devono essere il più piccoli possibili).
Con il primo filmato mov veniva schiacciato perché si imponeva un PAR (Pixel Aspect Ratio) non 1:1 (impostando DAR [Digital Aspect Ratio] e risoluzione), ora ho implementato un sistema di auto-padding, ossia aggiunge del nero a destra e sinistra e/o sopra e sotto. I video vengono automaticamente ingranditi in caso di filmati dalle dimensioni inferiori a quelle dello schermo (come il filmato di gates).
Il secondo errore non saprei proprio, io l'ho convertito normalmente... prova a vedere un po' cosa ti esce fuori
Ecco i due file che ho encodato con il nuovo avc (1.5):
http://dl.dropbox.com/u/1512702/andr...30-android.mp4
http://dl.dropbox.com/u/1512702/andr...se-android.mp4
AVC v.1.5 online!
Da aggiornare TUTTI i file, da cancellare resolutions.preset, da modificare preferences.avc per impostare la risoluzione del proprio dispositivo
Ultima modifica di elegos; 21-06-10 alle 12:46
Tester a rapporto.
Allora io ho cancellato il file resolutions.preset e messo il contenuto nuovo nel file avc, e aggiornato il file preferences.avc
Bisogna creare un file nuovo "functions" vero?
In ogni caso io ho fatto così e si ferma prima di iniziare la conversione video (l'audio lo fa):
Nel file avc sembra sia rimasto un riferimento al file resolutions.preset:codice:Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2997003/125000)
codice:EleGoS' Advanced Video Converter for Android Devices v.1.5 ./avc: riga 50: resolutions.preset: Nessun file o directory 39:22 FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
Allora:
1. nel primo caso non è un errore, ma una notifica, non dovrebbe fermarsi.
2. nel secondo caso: fixato nella 1.5.1![]()
No, mi spiace ma proprio non va con file che prima andava. Ti posto l'output completo del programma:
codice:alby@alby-laptop:~/ScriptVideo$ ./avc -i /home/alby/prova-fringe.avi EleGoS' Advanced Video Converter for Android Devices v.1.5.1 39:22 FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-libmp3lame --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libx264 --enable-libdc1394 --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Jun 18 2010 13:31:34, gcc: 4.4.3 Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2997003/125000) Input #0, avi, from '/home/alby/prova-fringe.avi': Duration: 00:01:44.56, start: 0.000000, bitrate: 1852 kb/s Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 23.98 tbr, 23.98 tbn, 23.98 tbc Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s Output #0, adts, to 'audio.aac': Stream #0.0: Audio: libfaac, 48000 Hz, stereo, s16, 128 kb/s Stream mapping: Stream #0.1 -> #0.0 Press [q] to stop encoding size= 1631kB time=104.49 bitrate= 127.9kbits/s video:0kB audio:1631kB global headers:0kB muxing overhead 0.000000% FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-libmp3lame --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libx264 --enable-libdc1394 --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Jun 18 2010 13:31:34, gcc: 4.4.3 Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2997003/125000) Input #0, avi, from '/home/alby/prova-fringe.avi': Duration: 00:01:44.56, start: 0.000000, bitrate: 1852 kb/s Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 23.98 tbr, 23.98 tbn, 23.98 tbc Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s Top pad size must be a multiple of 2 FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-libmp3lame --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libx264 --enable-libdc1394 --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Jun 18 2010 13:31:34, gcc: 4.4.3 Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2997003/125000) Input #0, avi, from '/home/alby/prova-fringe.avi': Duration: 00:01:44.56, start: 0.000000, bitrate: 1852 kb/s Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 23.98 tbr, 23.98 tbn, 23.98 tbc Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s Top pad size must be a multiple of 2 FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-libmp3lame --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libx264 --enable-libdc1394 --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Jun 18 2010 13:31:34, gcc: 4.4.3 tmp-video.mp4: no such file or directory rm: impossibile rimuovere `tmp-video.mp4': Nessun file o directory rm: impossibile rimuovere `*.log*': Nessun file o directory
Ecco l'errorecodice:Top pad size must be a multiple of 2
Sistemato nella 1.6
Versione 1.6 online!
Aggiornare il file avc
Ok, ora è cambiato l'errore:
Incorrect left pad sizecodice:alby@alby-laptop:~/ScriptVideo$ ./avc -i /home/alby/prova-fringe.avi EleGoS' Advanced Video Converter for Android Devices v.1.6 FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-libmp3lame --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libx264 --enable-libdc1394 --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Jun 18 2010 13:31:34, gcc: 4.4.3 Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2997003/125000) Input #0, avi, from '/home/alby/prova-fringe.avi': Duration: 00:01:44.56, start: 0.000000, bitrate: 1852 kb/s Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 23.98 tbr, 23.98 tbn, 23.98 tbc Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s Output #0, adts, to 'audio.aac': Stream #0.0: Audio: libfaac, 48000 Hz, stereo, s16, 128 kb/s Stream mapping: Stream #0.1 -> #0.0 Press [q] to stop encoding size= 1631kB time=104.49 bitrate= 127.9kbits/s video:0kB audio:1631kB global headers:0kB muxing overhead 0.000000% FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-libmp3lame --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libx264 --enable-libdc1394 --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Jun 18 2010 13:31:34, gcc: 4.4.3 Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2997003/125000) Input #0, avi, from '/home/alby/prova-fringe.avi': Duration: 00:01:44.56, start: 0.000000, bitrate: 1852 kb/s Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 23.98 tbr, 23.98 tbn, 23.98 tbc Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s Incorrect left pad size
Davanti alle linee verso la fine del file che cominciano con ffmpeg per favore mettici davanti echo, così vedo che parametri mette:
echo ffmpeg etcetcetc
l'output è questo:
codice:Stream mapping: Stream #0.1 -> #0.0 Press [q] to stop encoding size= 1631kB time=104.49 bitrate= 127.9kbits/s video:0kB audio:1631kB global headers:0kB muxing overhead 0.000000% ffmpeg -i /home/alby/prova-fringe.avi -threads 0 -an -pass 1 -s 480x270 -padtop 24 -padbottom 26 -padleft -1 -padright 1 -aspect 39:22 -vcodec libx264 -b 500k -flags +loop -cmp +chroma -partitions 0 -me_method epzs -subq 1 -trellis 0 -refs 1 -coder 0 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 500k -maxrate 768k -bufsize 2M -rc_eq blurCplx^(1-qComp) -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 13 -f rawvideo -y /dev/null ffmpeg -i /home/alby/prova-fringe.avi -threads 0 -an -pass 2 -s 480x270 -padtop 24 -padbottom 26 -padleft -1 -padright 1 -aspect 39:22 -vcodec libx264 -b 500k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -flags2 +mixed_refs -me_method umh -subq 5 -trellis 1 -refs 5 -coder 0 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 500k -maxrate 768k -bufsize 2M -rc_eq blurCplx^(1-qComp) -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 13 tmp-video.mp4 ffmpeg -i tmp-video.mp4 -i audio.aac -threads 0 -acodec libfaac -ab 128k -ac 2 -vcodec copy prova-fringe-android.mp4 rm: impossibile rimuovere `tmp-video.mp4': Nessun file o directory rm: impossibile rimuovere `*.log*': Nessun file o directory