I'm on Ubuntu trying to convert a lot of AVI files to FLV files so I can put it on my flash player for streaming. However, things are successful about 80% of the time. A lot of times there are out of sync files that are exactly the same as the other files in the series. These are the options I use:
-of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:l ast_pred=3 -vf scale=440:330 -srate 22050 -mc 0 -noskip
Anyone happen to know a better way of doing them? This problem had hounded me for a long time.
Thanks
+ Reply to Thread
Results 1 to 12 of 12
-
-
in general you shouldn't use them until you have to use them,
and if they fail, you've probably got a nasty.
if you've got something horrible,
i wouldn't mind looking at a sample
gl -
I updated my mencoder to 1.0rc2-4.1.3 and i'm making 2 samples. One with -mc 0 -noskip and one without. I'll let you take a look at them when i'm done.
This is an conversion of episode 2 of the Naruto anime. If you can diagnose what's wrong with it, please let me know.
Thanks -
samples of output are not really helpful,
a source sample is almost always what is required,
so someone can try to sucessfully do what you can't, or re-produce the problem, or...
also, a sample should ideally be a smaller size,
as small as possible, but of course you must be able to reproduce the result with the sample.
but looking at the files, I see sync is lost just past midpoint,
so it would still be a large sample...,
and I think you should drop noskip and mc 0 and try:
Code:-vf harddup
so you might give ffmpeg a go:
Code:ffmpeg -i input.avi -pass 1 -s 448x336 -ab 56k -ar 22050 -ac 1 -vcodec flv -b 500k -g 160 -cmp 3 -subcmp 3 -mbd 2 -flags aic+cbp+mv0+mv4+trell out.flv ffmpeg -i input.avi -pass 2 -s 448x336 -ab 56k -ar 22050 -ac 1 -vcodec flv -b 500k -g 160 -cmp 3 -subcmp 3 -mbd 2 -flags aic+cbp+mv0+mv4+trell -y out.flv
-
Thanks for the answer. I've actually have been playing with ffmpeg prior to reading this topic but the quality I've been getting was always more blocky. I've also tried with the command you gave me in hopes that it'll work better but the quality is still more choppy than when it was encoded with mencoder. I had to knock up the bitrate in order to match the quality except the output for ffmpeg output was still more blocky. When I say blocky, I mean you literally see squares in the background.
I've tried this with many videos of mine but they all end up the same. Here are two examples I've made. One is 500k and the other is 800k.
[Links Removed]
Sorry but I've removed the previous videos I put up before so I hope you still have them so you can compare and understand what I'm talking about. I have yet to try the -vf harddup option with mencoder so I'll give that a go tomorrow.
Thanks -
Originally Posted by Riotblade
The difference is usually slight, but i see with anime the diff is more
pronounced and that ffmpeg is blockier.
You seem to be suggesting however that ffmpeg needs almost double the bitrate mencoder does to do the same thing,
which is ridiculous.
a bitrate increase for sync ensurance is an acceptable trade.
Originally Posted by Riotblade
source sample...
Originally Posted by Riotblade
i'm gonna suppose you still mean blocky.
anyway,
try adding -sc_threshold 10000 to the ffmpeg commandlines.
Originally Posted by Riotblade
then do a simple remux to .flv with ffmpeg.
gl
tripp -
Originally Posted by 45tripp
I also still get them using "higher" bandwidth command like:
ffmpeg.exe -i input.avi
-acodec libmp3lame -ac 2 -ar 44100 -aq 8
-vcodec flv -s 448x336 -r 20 -g 100 -qscale 12 -cmp 3 -subcmp 3 -mbd 2
-sc_threshold 10000 -dc precision -flags aic+umv+cbp+mv0+mv4+trell
output.flv
(the lame vbr audio embedding is actually working quite well, gives much better results than aac audio at the same rate) -
Alright it look me a few hours to get this to you cause I was fixing a lot of bugs in my coding. Don't ask me what they are cause I just took the same configurations I used for my psp encodes but took out a few things. I did take a few of your ideas and put them in also. I am using ffmpeg v9133. You may need to change the coding if you're using anything more recent.
Code:ffmpeg -i input.avi -y -acodec mp3 -ab 64k -ar 44100 -ac 1 -vcodec flv -r 15 -s 448x336 -b 500k -vol 500 -flags aic+cbp+mv0+mv4+trell -cmp 3 -subcmp 3 -mbd 2 -partitions +parti4x4+partp8x8 -flags2 +mixed_refs -subq 5 -trellis 1 -refs 5 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qcomp 0.6 -coder 1 -g 250 -qblur 1.01 output.flv
Have fun. If you figure anything out let us know. -
Originally Posted by Riotblade
I'm suffering from it as well, but it does say that libavformat muxing is currently broken inside the CLI.
This is by the way what Any Video Converter sends to mencoder:
Code:-mc 0 -vf scale=320:240,harddup -ofps 25 -srate 44100 -oac mp3lame -lameopts vbr=2:q=8:aq=1:br=96 -ovc lavc -of lavf -lavfopts format=flv -lavcopts vcodec=flv:vbitrate=236:mbd=2:mv0:trell:v4mv:cbp:last_pred=3
Similar Threads
-
.avi -> .flv with embedded subtitles using MENCODER
By the_provider in forum Video ConversionReplies: 0Last Post: 28th Oct 2009, 16:38 -
Using mencoder to crop and convert .avi to .flv - errors
By brandox in forum Video ConversionReplies: 0Last Post: 26th Jan 2009, 10:09 -
[mencoder] to flv seek problem
By Jeje in forum Newbie / General discussionsReplies: 3Last Post: 21st Jul 2008, 01:38 -
Mux a FLV AVI + MP3 -> FLV with ffmpeg or mencoder?
By Colmino in forum Video ConversionReplies: 9Last Post: 29th Mar 2008, 22:11 -
Mencoder converting Anything to FLV.
By Caliber Mengsk in forum Video ConversionReplies: 3Last Post: 13th Jul 2007, 17:30