Thread: DV to FLV
View Single Post
Old 11th March 2009, 23:23   #10  |  Link
Leeloo Minaļ
Registered User
 
Join Date: Nov 2007
Posts: 50
To create VP6 FLV videos, i know at least 3 freeware/opensource solutions, each has plus and minus :

- full GUI solution : virtualdub + VP6 VFW codec + mp3 lame codec + flvmdi
You will have to convert audio to mp3 and flvmdi program is needed to add metadata to flv, otherwise you will get trouble with progress bar.
IMPORTANT thing : don't forget to flip your videos (Virtualdub has a fliter for this) or your FLV will be upside down


- 1st command line solution : avs2avi + avs2wav + avisynth + ffmpeg + VP6 VFW codec + flvmdi
P.S. : avs2wav can be removed and replaced by ffmpeg easily to directly convert audio stream to MP3, i will update my post later.

First, create configuration files for avs2avi :
Code:
rem ## 1 pass ##
avs2avi "temp.avs" "avifile.avi" -p 0 -s 1pass.conf -e

rem ## 2 passes ##
avs2avi "temp.avs" "avifile.avi" -P 2 -p 0 -s 2passes.conf -e
Then convert your video with avs2avi (through an avisynth script), extract and convert audio with ffmpeg, then use ffmpeg to output an FLV file, at last apply flvmdi for metadata.

Avisynth script (may need to be tweaked) :
Code:
AviSource("myfile.avi")
FlipVertical()
Batch main process (1 pass) :
Code:
set abitrate=64kb

avs2avi temp.avs temp.avi -l 1pass.conf
avs2wav temp.avs temp.wav
ffmpeg -i temp.wav -ab %abitrate% temp.mp3
ffmpeg -i temp.avi -acodec copy -vcodec copy -f mp3 -i "temp.mp3" temp.flv
flvmdi temp.flv final.flv /k /p
Batch main process (2 passes) :
Code:
set abitrate=64kb

avs2avi _temp_.avs _temp_.avi -P 2 -l 2passes.conf
avs2wav temp.avs temp.wav
ffmpeg -i temp.wav -ab %abitrate% temp.mp3
ffmpeg -i temp.avi -acodec copy -vcodec copy -f mp3 -i "temp.mp3" temp.flv
flvmdi temp.flv final.flv /k /p

- 2nd command line solution : mencoder + vfw2menc + VP6 VFW codec + flvmdi
Convert your video with mencoder (both video and audio streams) and output an FLV file
Apply flvmdi for metadata
You will need to create configuration files for mencoder before process converting

Batch command to create config files :
Code:
rem ## 1 pass encode ##
vfw2menc -f VP62 -d vp6vfw.dll -s 1pass_only.mcf

rem ## 2 passes encode ##
vfw2menc -f VP62 -d vp6vfw.dll -s pass1.mcf
vfw2menc -f VP62 -d vp6vfw.dll -s pass2.mcf
Batch main process (1 pass) :
Code:
set videofile=myfile.dv
set abitrate=64kb
set vbitrate=500kb

mencoder %videofile% -vf flip -oac lavc -lavcopts acodec=libmp3lame:abitrate=%abitrate% -ovc vfw -xvfwopts codec=vp6vfw.dll:compdata=%vbitrate%_pass.mcf -of lavf -lavfopts format=flv -o temp.flv
flvmdi temp.flv final.flv /k /p
Batch main process (2 passes) :
Code:
set videofile=myfile.dv
set abitrate=64kb
set vbitrate=500kb

mencoder %videofile% -vf flip -oac copy -ovc vfw -xvfwopts codec=vp6vfw.dll:compdata=%vbitrate%_pass1.mcf -of lavf -lavfopts format=flv -o temp.avi
mencoder %videofile% -vf flip -oac lavc -lavcopts acodec=libmp3lame:abitrate=%abitrate% -ovc vfw -xvfwopts codec=vp6vfw.dll:compdata=%vbitrate%_pass2.mcf -of lavf -lavfopts format=flv -o temp.flv
flvmdi temp.flv final.flv /k /p


(It is late, I hope i didn't miss anything...)
Leeloo Minaļ is offline   Reply With Quote