ffmpeg mobile encoding - need help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DWB
    Registered User
    • Jul 2003
    • 31779

    #1

    ffmpeg mobile encoding - need help

    Trying to get a better encode for mobile videos and am using -vcodec mpeg4 instead of -vcodec libx264.

    If I encode the same video myself on Handbrake, I can tweak it and get crystal clear at 1/2 the bit rate. But I am a ffmpeg noob and am stumbling over the settings here.

    This is the default ffmpeg setting:

    Code:
    -acodec libfaac -ab 96k -vcodec mpeg4 -b 800k -mbd 2 -cmp 2 -subcmp 2
    I can get the same video to look great at around 400k or so on Handbrake. But even at 800k here, it still breaks up some. I want to reduce bitrate and improve quality. How can I do this in ffmpeg? There is so much information online that I'm drowning in it, and most of it seems to be for libx264.

    Here are some additional settings I use in Handbrake that I don't know how to incorporate into ffmpeg, but would like to:

    Code:
    ref=3:bframes=3:subq=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0:b-adapt=2
    Thanks to anyone who can demystify ffmpeg mobile encoding for me .
  • fris
    Too lazy to set a custom title
    • Aug 2002
    • 55679

    #2
    http://www.virag.si/2012/01/web-vide...th-ffmpeg-0-9/

    read this article
    Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

    Comment

    • DWB
      Registered User
      • Jul 2003
      • 31779

      #3
      Originally posted by fris
      Thanks Fris.

      With those examples, does it matter if I use -vcodec mpeg4 instead of -vcodec libx264?

      Comment

      • Why
        MFBA
        • Mar 2003
        • 7230

        #4
        get winFF from www.winff.org and use one of their presets for mobile.

        Comment

        • AsianDivaGirlsWebDude
          Purveyor, Fine Asian Porn
          • Jul 2004
          • 38323

          #5


          Bump for smart fellers...

          ADG
          Asian Diva Girls - Exclusive Photos and Videos



          Asian Diva Girls Affiliate Program (50% ccBill Revshare)

          Comment

          • vdbucks
            Monger Cash
            • Jul 2010
            • 2773

            #6
            Originally posted by DWB
            Trying to get a better encode for mobile videos and am using -vcodec mpeg4 instead of -vcodec libx264.

            If I encode the same video myself on Handbrake, I can tweak it and get crystal clear at 1/2 the bit rate. But I am a ffmpeg noob and am stumbling over the settings here.

            This is the default ffmpeg setting:

            Code:
            -acodec libfaac -ab 96k -vcodec mpeg4 -b 800k -mbd 2 -cmp 2 -subcmp 2
            I can get the same video to look great at around 400k or so on Handbrake. But even at 800k here, it still breaks up some. I want to reduce bitrate and improve quality. How can I do this in ffmpeg? There is so much information online that I'm drowning in it, and most of it seems to be for libx264.

            Here are some additional settings I use in Handbrake that I don't know how to incorporate into ffmpeg, but would like to:

            Code:
            ref=3:bframes=3:subq=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0:b-adapt=2
            Thanks to anyone who can demystify ffmpeg mobile encoding for me .
            What version of ffmpeg are you using?

            We're currently using the latest source build so I can't comment on older versions because they don't have the same optionss/flags.

            you can follow these instructions for building from source on debian/ubuntu: https://ffmpeg.org/trac/ffmpeg/wiki/...mpilationGuide

            Here's the script we use for encoding mp4's, as well as the ffmpeg settings:

            for i in ./convert/*_members.mp4
            do
            original=`basename $i`
            prefix="${original%%_members.mp4}"
            ffmpeg -i "$i" -s hd720 -vcodec libx264 -b:v 2300k -minrate 2300k -maxrate 2300k -bufsize 1050k -f flv -acodec libfaac -b:a 192k -ac 2 -ar 44100 -preset slow -crf 22 -threads 0 -f mp4 ./transfer/"${prefix}"_2300k.mp4
            ffmpeg -i "$i" -s hd720 -vcodec libx264 -b:v 1200k -minrate 1200k -maxrate 1200k -bufsize 550k -f flv -acodec libfaac -b:a 128k -ac 2 -ar 44100 -preset slow -crf 22 -threads 0 -f mp4 ./transfer/"${prefix}"_1200k.mp4
            done

            for i in ./convert/*_trailer.mp4
            do
            filename=`basename $i`
            ffmpeg -i "$i" -s hd720 -vcodec libx264 -b:v 1200k -minrate 1200k -maxrate 1200k -bufsize 550k -f flv -acodec libfaac -b:a 128k -ac 2 -ar 44100 -preset slow -crf 22 -threads 0 -f mp4 ./transfer/"${filename}"
            done
            Last edited by vdbucks; 06-23-2012, 01:25 AM.

            Comment

            Working...