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

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

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...
#2

[eluser]eoinmcg[/eluser]
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
Code:
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...
Code:
exec('ffmpeg -i '.$uploadfile.' -f flv -s 320x240 -pass 1 -passlogfile log-file '.$new_flv.'');



Hope this is of some help!
#3

[eluser]newbie boy[/eluser]
eoinmcg,

tried your solution in DOS...

incorrect codec parameter

how can i solve this...

i'm very new to ffmpeg...

thanks for the help...
#4

[eluser]eoinmcg[/eluser]
What happens if you just execute your original command in DOS/ terminal ?

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

Code:
ffmpeg -i file_name.wmv -s 320x240 -f flv file_name.flv
#5

[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?
#6

[eluser]eoinmcg[/eluser]
Hmm...

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

I also tried quickly googling and came across the following
http://osdir.com/ml/video.ffmpeg.user/20...00139.html

It seems that differences in audio encoding in wmv files can cause problems when encoding
http://stackoverflow.com/questions/87760...fmpeg-fail
http://stackoverflow.com/questions/10941...ion-to-flv
#7

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

appreciate the help...

thanks...
#8

[eluser]eoinmcg[/eluser]
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!
#9

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

thanks again...




Theme © iAndrew 2016 - Forum software by © MyBB