VideoHelp Forum




+ Reply to Thread
Results 1 to 12 of 12
  1. Member
    Join Date
    Dec 2007
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  2. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Code:
     -mc 0 -noskip
    are not exactly default options.
    in fact with an avi source they seem wrong.

    A lot of times there are out of sync files that are exactly the same as the other files in the series.
    obviously not.

    are you using an up to date version of mencoder?

    gl
    Quote Quote  
  3. Member
    Join Date
    Dec 2007
    Location
    United States
    Search Comp PM
    So with an AVI source I shouldn't use those two options?

    Also, yes, i'm using the latest version of mencoder.

    I'm currently having problems with a lot of my videos.
    Quote Quote  
  4. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    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
    Quote Quote  
  5. Member
    Join Date
    Dec 2007
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  6. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    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
    mencoder is actually rather notorious for having sync problems,
    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
    gl
    Quote Quote  
  7. Member
    Join Date
    Dec 2007
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  8. Member ricardouk's Avatar
    Join Date
    Mar 2005
    Location
    Portugal
    Search Comp PM
    I only use Ubuntu "part time" but it seems the last Avidemux version creates flv's. Its not "command-line" but you'll never know
    I love it when a plan comes together!
    Quote Quote  
  9. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by Riotblade
    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 prefer mencoder too.
    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
    Sorry but I've removed the previous videos I put up before so I hope you still have them so you can compare
    they're gone.

    source sample...

    Originally Posted by Riotblade
    I've also tried with the command you gave me in hopes that it'll work better but the quality is still more choppy
    choppy is another matter...
    i'm gonna suppose you still mean blocky.

    anyway,
    try adding -sc_threshold 10000 to the ffmpeg commandlines.

    Originally Posted by Riotblade
    I have yet to try the -vf harddup option with mencoder so I'll give that a go tomorrow.
    you could also try encoding to flv1 within an avi container and see if one of the methods gives your files in sync.
    then do a simple remux to .flv with ffmpeg.

    gl
    tripp
    Quote Quote  
  10. Originally Posted by 45tripp
    i'm gonna suppose you still mean blocky.

    anyway,
    try adding -sc_threshold 10000 to the ffmpeg commandlines.
    Do you have any more commands that might get rid of obvious blocks in the background? They're often very much visible in color-gradients using ffmpeg.

    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)
    Quote Quote  
  11. 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
    To get rid of the blocks that you so hate, I just put in -qblur 1.01. If you go any higher like 1.5, ffmpeg will crash. Not sure why though. My sample was Naruto Shippuuden episode 17 op. For some reason I didn't like your coding cause the subtitles had too much noise, but I hope this solves your problem. If you're going to put this on youtube, there's a 350k bitrate limit for videos as per topic https://forum.videohelp.com/topic336882.html

    Have fun. If you figure anything out let us know.
    Quote Quote  
  12. Originally Posted by Riotblade
    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.
    Did you manage to get rid of the syncing issue using mencoder? Just curious..
    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
    Which somehow manages to be synced perfectly always.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!