share your ffmpeg recipes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fris
    Too lazy to set a custom title
    • Aug 2002
    • 55705

    #1

    share your ffmpeg recipes

    anyone got any command line args they can share?

    Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.
  • nextri
    Confirmed User
    • May 2004
    • 1661

    #2
    I gave up on it and started using pandastream.com.
    No idea how many hours I've spent tweaking encoding options. Could never seem to get it quite right..
    DivaTraffic - Traffic for Models

    Comment

    • MaDalton
      I am Amazing Content!
      • Feb 2004
      • 39861

      #3
      worked like a charm for me recently when i really needed it

      i used this to create DVD compatible videos from source videos where no encoding program could read the audio track:

      ffmpeg -i test.m2ts -acodec mp2 -ab 224k -ar 48000 -vcodec mpeg2video -b:v 8000k -g 15 -r 25 -s 720x576 -sn test.mpg

      spent nearly half of saturday to figure it out but the possibilities are endless
      Last edited by MaDalton; 11-18-2011, 08:50 AM.
      AmazingContent.com - providing only the best content and service since 2003
      Monetize your content on Veegaz.com - one of Germanies largest VOD sites
      Got German traffic? We convert it into money for you!
      Email: oltecconsult [at] gmail [dot] com

      Comment

      • evulvmedia
        Confirmed User
        • Jun 2006
        • 441

        #4
        Encoding for web + mobile, streaming + downloading: mp4 format, 640px width, 720kbps video, 96kbps audio.

        This is nice because it gives excellent quality while also working fine on mobile devices, even first-generation iPhone and iPod Touch.

        Using the x264 presets it is easy!

        Two passes:

        ffmpeg -i INPUT -an -pass 1 -s 640xH -vcodec libx264 -profile baseline -preset slow -vpre ipod640 -b 720k -aspect W:H -threads 0 -f ipod -y /dev/null

        ffmpeg -i INPUT -acodec libfaac -ar 48000 -ac 2 -ab 96k -async 1 -pass 2 -s 640xH -vcodec libx264 -profile baseline -preset slow -vpre ipod640 -b 720k -aspect W:H -threads 0 -f ipod -metadata "title=TITLE" OUTPUT-1.mp4

        You need to specify H in the -s parameter based on the size of the source video (e.g. H=360 for 16:9 aspect ratio). And of course you need to specify W:H for the -aspect parameter.

        Finally, you need to adjust the moov atom for streaming:

        qt-faststart OUTPUT-1.mp4 OUTPUT.mp4

        Comment

        • raymor
          Confirmed User
          • Oct 2002
          • 3745

          #5
          Is there any script for "use the same options as this other video"? Say you have a video that works well on a phone and you want to encode another one with the same codecs, package format, etc.
          For historical display only. This information is not current:
          support@bettercgi.com ICQ 7208627
          Strongbox - The next generation in site security
          Throttlebox - The next generation in bandwidth control
          Clonebox - Backup and disaster recovery on steroids

          Comment

          • SmokeyTheBear
            ►SouthOfHeaven
            • Jun 2004
            • 28609

            #6
            Originally posted by raymor
            Is there any script for "use the same options as this other video"? Say you have a video that works well on a phone and you want to encode another one with the same codecs, package format, etc.
            wouldn't you just view the video and read it's properties.

            besides you are reading the output not the input so if you want your video to have the same output chances are the input is different , and thus the method would also be different.
            hatisblack at yahoo.com

            Comment

            • Bird
              Confirmed User
              • Jan 2005
              • 4365

              #7
              Fuck, all I know how to do is grab a few frames from a video.

              ffmpeg -i $input -an -ss 00:00:01 -r 1 -vframes 1 -f mjpeg -y $output
              ICQ:268731675

              Comment

              • fris
                Too lazy to set a custom title
                • Aug 2002
                • 55705

                #8
                Originally posted by raymor
                Is there any script for "use the same options as this other video"? Say you have a video that works well on a phone and you want to encode another one with the same codecs, package format, etc.
                you can create your own presets so its saved parameters
                Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                Comment

                • fris
                  Too lazy to set a custom title
                  • Aug 2002
                  • 55705

                  #9
                  Originally posted by evulvmedia
                  Encoding for web + mobile, streaming + downloading: mp4 format, 640px width, 720kbps video, 96kbps audio.

                  This is nice because it gives excellent quality while also working fine on mobile devices, even first-generation iPhone and iPod Touch.

                  Using the x264 presets it is easy!

                  Two passes:

                  ffmpeg -i INPUT -an -pass 1 -s 640xH -vcodec libx264 -profile baseline -preset slow -vpre ipod640 -b 720k -aspect W:H -threads 0 -f ipod -y /dev/null

                  ffmpeg -i INPUT -acodec libfaac -ar 48000 -ac 2 -ab 96k -async 1 -pass 2 -s 640xH -vcodec libx264 -profile baseline -preset slow -vpre ipod640 -b 720k -aspect W:H -threads 0 -f ipod -metadata "title=TITLE" OUTPUT-1.mp4

                  You need to specify H in the -s parameter based on the size of the source video (e.g. H=360 for 16:9 aspect ratio). And of course you need to specify W:H for the -aspect parameter.

                  Finally, you need to adjust the moov atom for streaming:

                  qt-faststart OUTPUT-1.mp4 OUTPUT.mp4
                  do you only encode 1 video for both mobile and web, or two?
                  Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                  Comment

                  • raymor
                    Confirmed User
                    • Oct 2002
                    • 3745

                    #10
                    Originally posted by SmokeyTheBear
                    wouldn't you just view the video and read it's properties.
                    I sometimes don't know how to translate some property to an ffmpeg output parameter. I'd like a script that reads the properties and generates the right arguments for ffmpeg.
                    For historical display only. This information is not current:
                    support@bettercgi.com ICQ 7208627
                    Strongbox - The next generation in site security
                    Throttlebox - The next generation in bandwidth control
                    Clonebox - Backup and disaster recovery on steroids

                    Comment

                    • raymor
                      Confirmed User
                      • Oct 2002
                      • 3745

                      #11
                      Originally posted by fris
                      you can create your own presets so its saved parameters
                      I've like to look at a video YOU and made figure out what presets YOU used so I can use the ones. Obviously that applies only to parameters like codecs which can be determined from the output.

                      Example:
                      Assume you have an old phone or DVR which will record and play files in a specific format (size, codec, packaging, etc.). I want to convert another video to be playable on the device. I used the same codec and package type, but parameter is different so it can't play my file. I'd like to use one of it's own native files as a reference, saying "convert this foreign file to have the same format as this native file."
                      For historical display only. This information is not current:
                      support@bettercgi.com ICQ 7208627
                      Strongbox - The next generation in site security
                      Throttlebox - The next generation in bandwidth control
                      Clonebox - Backup and disaster recovery on steroids

                      Comment

                      • evulvmedia
                        Confirmed User
                        • Jun 2006
                        • 441

                        #12
                        Originally posted by fris
                        do you only encode 1 video for both mobile and web, or two?
                        only one for both web and mobile

                        Comment

                        • fris
                          Too lazy to set a custom title
                          • Aug 2002
                          • 55705

                          #13
                          Originally posted by evulvmedia
                          only one for both web and mobile
                          what aspect ratio do you use? i want to try your method
                          Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                          Comment

                          • vending_machine
                            Confirmed User
                            • Jun 2002
                            • 1070

                            #14
                            ffmpeg can blow me.

                            find / -depth -name ffmpeg\* -exec rm -rf {} \;

                            Comment

                            • Socks
                              Confirmed User
                              • May 2002
                              • 8475

                              #15
                              '!cmd_path -y -i !videofile -f flv -crf 24 -vcodec libx264 -vpre slow -threads 0 -acodec libfaac -ar 44100 -ab 192 -s !widthx!height -qscale 1 !convertfile'

                              Comment

                              • acctman
                                Confirmed User
                                • Oct 2003
                                • 2840

                                #16
                                if you have SoftLayer as your dedicated hoster they have a set of server banks and api's that you can use to process all you movies for free.

                                Comment

                                • Jack Sparrow
                                  Almost goners..
                                  • May 2008
                                  • 11420

                                  #17
                                  Originally posted by fris
                                  what aspect ratio do you use? i want to try your method
                                  I think the 360 method would work best right?
                                  Most phones are on a 16:9 ratio?!

                                  Comment

                                  • Just Alex
                                    Liv Benson to You, Bitch
                                    • Aug 2007
                                    • 6060

                                    #18
                                    Originally posted by fris
                                    anyone got any command line args they can share?

                                    Here you go. Takes all videos in current folder and makes flash

                                    for i in *.wmv; do ffmpeg -i "$i" -f flv -ar 22050 -ab 56 -r 25 -b 650k -s 320x240 `basename $i .wmv`.flv; done

                                    then you make screen prints out of all flv files

                                    for i in *.flv; do ffmpeg -i "$i" -an -ss 00:00:03 -an -r 1 -vframes 10 -s 160x120 -y `basename $i .flv`-%d.jpg; done


                                    You welcome.

                                    Comment

                                    • fris
                                      Too lazy to set a custom title
                                      • Aug 2002
                                      • 55705

                                      #19
                                      Originally posted by Just Alex
                                      Here you go. Takes all videos in current folder and makes flash

                                      for i in *.wmv; do ffmpeg -i "$i" -f flv -ar 22050 -ab 56 -r 25 -b 650k -s 320x240 `basename $i .wmv`.flv; done

                                      then you make screen prints out of all flv files

                                      for i in *.flv; do ffmpeg -i "$i" -an -ss 00:00:03 -an -r 1 -vframes 10 -s 160x120 -y `basename $i .flv`-%d.jpg; done


                                      You welcome.
                                      wont the 320x240 be a bit small for desktop?
                                      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                      Comment

                                      • Just Alex
                                        Liv Benson to You, Bitch
                                        • Aug 2007
                                        • 6060

                                        #20
                                        Originally posted by fris
                                        wont the 320x240 be a bit small for desktop?
                                        Obviously you can change all parameters. I just gave you sample code.

                                        Comment

                                        • fris
                                          Too lazy to set a custom title
                                          • Aug 2002
                                          • 55705

                                          #21
                                          Originally posted by Just Alex
                                          Obviously you can change all parameters. I just gave you sample code.
                                          ya trying to use one video for desktop and mobile.
                                          Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                          Comment

                                          • pornsprite
                                            Confirmed User
                                            • Dec 2009
                                            • 1643

                                            #22
                                            Best thread of the month as far as I am concerned.
                                            Go Fuck Yourself

                                            Comment

                                            • Solace
                                              So Fucking Banned
                                              • Nov 2011
                                              • 995

                                              #23
                                              I can make ffmpeg suck cocks

                                              Comment

                                              Working...