Welcome Guest, Not a member yet? Register   Sign In
ffmpeg wmv to flv?

[eluser]newbie boy[/eluser]
i have this code...

exec('ffmpeg -i '.$uploadfile.' -f flv -s 320x240 '.$new_flv.'');

which converts video file to flv file...

works perfectly with mpg file...

but not with wmv file coverts it to flv but with the output of 0kb...

need your help with this...

thanks guys...

A shot in the dark but does your server have all the necessary codecs (i.e. for wmv) installed?

You can tell ffmpeg which codec to use
exec('ffmpeg -i '.$uploadfile.' -f flv -s 320x240 -vcodec wmv1 -acodec adpcm_ima_wav '.$new_flv.'');

Also try generating a log file to see any errors...
exec('ffmpeg -i '.$uploadfile.' -f flv -s 320x240 -pass 1 -passlogfile log-file '.$new_flv.'');

Hope this is of some help!

[eluser]newbie boy[/eluser]

tried your solution in DOS...

incorrect codec parameter

how can i solve this...

i'm very new to ffmpeg...

thanks for the help...

What happens if you just execute your original command in DOS/ terminal ?

Do you get an error message? And if so what is it?

ffmpeg -i file_name.wmv -s 320x240 -f flv file_name.flv

[eluser]newbie boy[/eluser]
tried that also and still this is the error...

could not write header for output file #0 <incorrect codec parameter>

tried googling it but no specific solution...

what should i do know?


I just tried the original command and it worked fine for me on Linux

I also tried quickly googling and came across the following

It seems that differences in audio encoding in wmv files can cause problems when encoding

[eluser]newbie boy[/eluser]
it doesn't also with mp4 "audio encoding failed"

appreciate the help...


Unfortunately I don't have a windows box at hand to test on...

A couple of suggestions though:
1. Try with a couple of other wmv files to see if it is a problem with audio sampling freq
2. For the mp4, you may have build ffmpeg with libmp3lame support enabled
3. Make sure you've the latest and most up-to-date version of ffmpeg

Good luck!

[eluser]newbie boy[/eluser]
how can i see if libmp3lame support enabled?

thanks again...

Theme © iAndrew 2016 - Forum software by © MyBB