Come unire una serie di clip presi dalla fotocamera
by root on Feb.17, 2009, under guide
Abbiamo fatto 30 filmatini con la fotocamera e vogliamo fare un file unico ?
Niente di piu’ facile.
Copiamo i filmati in una directory.
Ammettiamo che i filmati abbiano estensione “.MOV”
Andiamo nella directory dove ci sono SOLO i filmati e lanciamo il comando
mencoder -forceidx -ovc copy -oac pcm *.MOV -o big.avi
oppure
avimerge -o big.avi -i file1.MOV file2.mov ...
A questo punto abbiamo, nel file “big.avi”, il nostro bel filmato.
Se lo vogliamo convertire in flv lanciamo il comando
mencoder big.avi -o out.flv -ofps 30 -vf eq=15:0,denoise3d,spp=6,scale=640:360 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=2048:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -oac mp3lame -lameopts br=64 -srate 22050 -af lavcresample=22050
Affinchè possa essere fatta la seek sui files flv, il file deve contenere i tag onMetaData, che possono essere inseriti usando FLVTool2 con il comando
flvtool2 -U <file flv>
A questo punto in out.flv abbiamo il nostro bel filmato in formato flv, pronto per poter essere fruito via web con un un player come ad esempio FLV-Scrubber.










































July 3rd, 2009 on 1:52 pm
Ho seguito il tuo tutorial perchè ho la necessità di incamerare in un unico file 37 file mov da manipolare poi con kino per creare un filmato solo che dopo pochi istanti il processo si ferma e mi restituisce questo messaggio
MEncoder dev-SVN-r26940 (C) 2000-2008 MPlayer Team
CPU: Genuine Intel(R) CPU T2050 @ 1.60GHz (Family: 6, Model: 14, Stepping:
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×1fe1548e
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x86b0334]edit list not starting at 0, a/v desync might occur, patch welcome
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [avc1] 1440×1080 24bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44 fourcc:0×31637661 size:1440×1080 fps:29.970 ftime:=0.0334
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio) decoder)
==========================================================================
videocodec: framecopy (1440×1080 24bpp fourcc=31637661)
Writing header…
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header…
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
success: format: 0 data: 0×0 - 0xaf22f96: 0min 597mb A-V:0.007 [7998:1536]
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x86b0334]edit list not starting at 0, a/v desync might occur, patch welcome
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [avc1] 1440×1080 24bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44 fourcc:0×31637661 size:1440×1080 fps:29.970 ftime:=0.0334
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio) decoder)
==========================================================================
videocodec: framecopy (1440×1080 24bpp fourcc=31637661)
Pos: 705.4s 21140f (99%) 947.73fps Trem: 0min 802mb A-V:0.067 [8001:1536]]]
Skipping frame!
success: format: 0 data: 0×0 - 0xa1c04d4: 0min 803mb A-V:0.019 [8002:1536]
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x86b0334]edit list not starting at 0, a/v desync might occur, patch welcome
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [avc1] 848×480 24bpp 59.940 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44 fourcc:0×31637661 size:848×480 fps:59.940 ftime:=0.0167
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio) decoder)
==========================================================================
videocodec: framecopy (1440×1080 24bpp fourcc=31637661)
videocodec: framecopy (848×480 24bpp fourcc=31637661)
All video files must have identical fps, resolution, and codec for -ovc copy.
Exiting…
e chiaramente non mi crea il file completo con tutti i mov.
Mi manca qualcosa?
Grazie e ciao
July 3rd, 2009 on 2:57 pm
Si, tutti i files devono avere lo stesso formato.
Il messaggio che ti da in fondo lo script dice appunto questo
“All video files must have identical fps, resolution, and codec for -ovc ”
Probabilmente quei 37 mov non sono omogenei nel formato.
F.
July 4th, 2009 on 8:10 am
quindi come posso risolvere?
Grazie e ciao
July 4th, 2009 on 4:04 pm
Prima li converti tutti nello stesso formato poi li unisci.
Puoi usare mencoder per convertirli in un formato intermedio, l’importante è che sia lo stesso per tutti i files.