Sto cercando di convertire i file avi h264 in formato Xvid utilizzando FFMPEG. I file video durano circa 90 minuti. Il codice che sto usando è:
ffmpeg -i input.avi -c:v libxvid -r 15 -an -vtag xvid -f avi output.avi
Il problema è che i file video convertiti sono file multipart, come affermato da GSpot. Questo è problematico in quanto ho bisogno di avere file singlepart per le analisi video che sto facendo. Non riesco a trovare come impostare FFMPEG per creare file a parte singola e non posso usare nessun altro software poiché ho scritto uno script per convertire automaticamente i video con FFMPEG usando R.
Ecco il file di output (senza includere tutte le righe relative ai frame convertiti ofcourse):
C:\Documents and Settings\eeg2user>ffmpeg -i "E:\input.AVI" -c:v libxvid -
r 15 -an -vtag xvid -f avi E:\output.AVI
ffmpeg version N-32355-g4f7dfe1, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 6 2011 13:06:48 with gcc 4.6.1
configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 16. 0 / 51. 16. 0
libavcodec 53. 13. 0 / 53. 13. 0
libavformat 53. 11. 0 / 53. 11. 0
libavdevice 53. 3. 0 / 53. 3. 0
libavfilter 2. 39. 0 / 2. 39. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, avi, from 'E:\input.AVI':
Metadata:
date : 2012-12-01
ICRT : 15:50:14
comment :
Duration: 01:11:14.57, start: 0.000000, bitrate: 4136 kb/s
Stream #0.0: Video: h264 (Main) (H264 / 0x34363248), yuv420p, 1280x720 [SAR
1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
Stream #0.1: Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, s16, 12
8 kb/s
[buffer @ 0204A080] w:1280 h:720 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
Output #0, avi, to 'E:\output.AVI':
Metadata:
ICRD : 2012-12-01
ICRT : 15:50:14
ICMT :
ISFT : Lavf53.11.0
Stream #0.0: Video: mpeg4 (xvid / 0x64697678), yuv420p, 1280x720 [SAR 1:1 DA
R 16:9], q=2-31, 200 kb/s, 15 tbn, 15 tbc
Stream mapping:
Stream #0.0 -> #0.0 (h264 -> libxvid)
Press [q] to stop, [?] for help
frame= 8 fps= 0 q=13.0 size= 54kB time=00:00:00.53 bitrate= 828.7kbits/
frame= 16 fps= 15 q=17.0 size= 90kB time=00:00:01.06 bitrate= 690.9kbits/
frame= 22 fps= 13 q=17.0 size= 103kB time=00:00:01.46 bitrate= 573.0kbits/
frame= 28 fps= 13 q=19.0 size= 129kB time=00:00:01.86 bitrate= 566.0kbits/
frame= 36 fps= 14 q=16.0 size= 138kB time=00:00:02.40 bitrate= 472.3kbits/
frame= 37 fps= 8 q=15.0 size= 156kB time=00:00:02.46 bitrate= 517.5kbits/
frame= 37 fps= 7 q=15.0 size= 156kB time=00:00:02.46 bitrate= 517.5kbits/
frame= 45 fps= 7 q=19.0 size= 174kB time=00:00:03.00 bitrate= 475.5kbits/
s dup=0 drop=42