Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: avconv mov to flv

  1. #11
    Join Date
    Sep 2006
    Beans
    3,713

    Re: avconv mov to flv

    Andrew gave some good advice too. Although I disagree with his view that he isn't an expert.

    You should change one thing: don't use -q:v with libx264. Use -crf instead. See the crf section in the FFmpeg and x264 Encoding Guide. It has examples and explanations.

    You may encounter two problems with your command, depending on your input. If -1 from your scale filter ends up being an odd value libx264 may complain, "height not divisible by 2". This can be an alternative method:
    Code:
    scale="320:trunc(ow/a/2)*2"
    IIRC, if height ends up being an odd value it will automatically round down to an even value. You can do the same for width too:
    Code:
    scale="trunc(oh*a*2)/2:240"
    The other potential issue is that flv container probably only accepts certain MP3 audio sample rates. ffmpeg, by default, will usually inherit the input sample rate for the output. If you end up with 48000 for example, then ffmpeg will complain:
    Code:
    FLV does not support sample rate 48000, choose from (44100, 22050, 11025)

  2. #12
    Join Date
    Oct 2010
    Location
    The United States
    Beans
    843
    Distro
    Ubuntu

    Re: avconv mov to flv

    Quote Originally Posted by FakeOutdoorsman View Post


    The other potential issue is that flv container probably only accepts certain MP3 audio sample rates. ffmpeg, by default, will usually inherit the input sample rate for the output. If you end up with 48000 for example, then ffmpeg will complain:
    Code:
    FLV does not support sample rate 48000, choose from (44100, 22050, 11025)
    FakeOutdoorsman, you called that one!

    So, I thought to myself this is great. I saved the command as a script and put it in the aliases file and hoped I was ready to go.

    Sure enough, the first time out going from mpg to flv using:
    Code:
    ffmpeg -i foo.mpg \
           -c:v libx264 -crf 5 -vf scale=320:-1 \
           -c:a libmp3lame -q:a 3 \
           MPEG-to-libx264.flv
    I got the sample rate error.

    My question is where in the command do I specify the sample rate?



    Thank you for the help! I really do appreciate it!!
    Last edited by GrouchyGaijin; January 4th, 2013 at 12:08 AM. Reason: Deleted a second question that I found the answer to
    Thank you,
    GG -----------

  3. #13
    Join Date
    Sep 2006
    Beans
    3,713

    Re: avconv mov to flv

    You can add "-ar" as an output option which is anywhere after "-i foo.mpg", such as:
    Code:
    ffmpeg -i foo.mpg \
           -c:v libx264 -crf 23 -vf scale=320:-1 \
           -c:a libmp3lame -q:a 3 -ar 44100 \
           MPEG-to-libx264.flv
    I also changed your -crf value in this example. -q:v and -crf are not interchangeable, so although -q:v 5 might be a good balance for your input and the flv1 encoder, a value of -crf 5 will result in an unnecessarily large output. The link in my last post shows how to use crf. Default value is 23, which is what libx264 will use if you omit -crf. Use the highest value that still provides an acceptable quality.

  4. #14
    Join Date
    Oct 2010
    Location
    London
    Beans
    482
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: avconv mov to flv

    What does -q:v do in relation to libx264?

  5. #15
    Join Date
    Sep 2006
    Beans
    3,713

    Re: avconv mov to flv

    Probably nothing. I think it is ignored, and possibly limited to the mpeg quant scale (flv/h263/h263+/mpeg1video/mpeg2video/mpeg4/mjpeg/msmpeg*), but I might be wrong about that.
    Last edited by FakeOutdoorsman; January 4th, 2013 at 01:13 AM.

  6. #16
    Join Date
    Dec 2005
    Location
    U.S.A.
    Beans
    200
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: avconv mov to flv

    Why not simply get a Dropbox or other cloud account, upload your mov files, send grandparents an email with attachments. They can download and watch mov files with vlc.

  7. #17
    Join Date
    Oct 2010
    Location
    The United States
    Beans
    843
    Distro
    Ubuntu

    Re: avconv mov to flv

    Quote Originally Posted by JimS View Post
    Why not simply get a Dropbox or other cloud account, upload your mov files, send grandparents an email with attachments. They can download and watch mov files with vlc.
    Is this a real suggestion or are you making a joke?
    Thank you,
    GG -----------

  8. #18
    Join Date
    Dec 2005
    Location
    U.S.A.
    Beans
    200
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: avconv mov to flv

    Joodan ja nai!
    I've done it my way after reducing my camera images with ffmpeg.
    And then I sent them to relatives via email attachments from Dropbox.
    It works and it is free. Quality isn't the best.
    I'm not running a webserver, so I can't help you there. Good luck.
    MVH
    JimS
    ...

  9. #19
    Join Date
    Feb 2009
    Beans
    98
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: avconv mov to flv

    Quote Originally Posted by GrouchyGaijin View Post
    Is this a real suggestion or are you making a joke?
    It was a simple but great suggestion. Why not?
    Overclocked HPML150 running Precise Pangolin 12.04 LTS

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •