Page 204 of 241 FirstFirst ... 104154194202203204205206214 ... LastLast
Results 2,031 to 2,040 of 2402

Thread: HOWTO: Install and use the latest FFmpeg and x264

  1. #2031
    Join Date
    Aug 2008
    Beans
    68

    Re: HOWTO: Install and use the latest FFmpeg and x264

    How to do batch encoding for all files in one directory?, f.e. by this command:

    ffmpeg -i input1.mp4 -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -threads 0 2.mp4
    I found one example here in post 15, bu I don't know exactly how it will look in my case,
    or is there a better command line or script?
    Last edited by rulet; December 13th, 2011 at 01:50 PM.

  2. #2032
    Join Date
    Jul 2006
    Beans
    34

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by rulet View Post
    How to do batch encoding for all files in one directory?, f.e. by this command:



    I found one example here in post 15, bu I don't know exactly how it will look in my case,
    or is there a better command line or script?
    for a windows bat you can use my http://ubuntuforums.org/showpost.php...postcount=1983
    a few pages back.

    change the avconv/ffmpeg -threads 4 -i "%%A" ....... "%dstPATH%%%~nA.MP4" part of the bat file to suit for your working line, and the ("%srcPATH%*.mkv") part to ("%srcPATH%*.avs") taking a .avs script or whatever your input as it says on that post

    so for your line above it would be

    ffmpeg -threads 4 -i "%%A" -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 "%dstPATH%%%~nA.MP4"

    and the ("%srcPATH%*.mkv") would be changed to ("%srcPATH%*.mp4") to encode all the .mp4 files found in the dir when you double clicked the bat file also placed in there.
    Last edited by popper; December 13th, 2011 at 07:26 PM.

  3. #2033
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    570
    Distro
    Ubuntu Budgie

    Re: HOWTO: Install and use the latest FFmpeg and x264

    I do any batch encoding the 'dumb' way, by explicitly declaring each and every command discretely, even if it is the same command over and over again. Helps me keep it straight in my head (and it's not as tedious as it sounds - spreadsheets help, as do conditional formatting performed using gedit and/or userland-level utils). It also makes sure that the files are processed in exactly the order I want them to be, which sometimes is important.

  4. #2034
    Join Date
    Aug 2008
    Beans
    68

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by popper View Post
    @echo on

    set srcPATH=.\
    set dstPATH=.\somewhere

    FOR %%A in ("%srcPATH%*.mkv") DO (
    avconv.exe -threads 4 -i "%%A" -f mp4 -vcodec libx264 -crf 18 -minrate 600k -maxrate 1500k -bufsize 1500k -refs 3 -preset slow -vprofile Baseline -level 3.0 -flags2 -bpyramid -wpredp 0 -strict experimental -acodec aac -ac 2 -ab 128k -vf hqdn3d,unsharp=5:5:0.5,scale=640:480 "%dstPATH%%%~nA.MP4"
    )
    pause

    REM -vf yadif, gradfun, hqdn3d, unsharp=5:5:0.5, setdar=16:9, scale=640:480
    Is that the bat-script which you talking about(I changed to "somewhere")?
    Actually, I asked about command-line or bash-script on linux, but thanks anyway.
    As I understand, there is no difference in result(quality) using ffmpeg algorithms on windows or linux?
    And I don't understand, do I have to install ffmpeg system-wide to use that bat-file(on windows), and what is avconv.exe, is it a replacement of ffmpeg?

    Is that would be right bash-script for linux for the command that I mentioned above?:
    #!/bin/bash

    for i in 'ls *.mp4'
    do
    ffmpeg -i -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -threads 0 ${i%.mp4}.mp4
    done
    Last edited by rulet; December 14th, 2011 at 02:32 AM.

  5. #2035
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    570
    Distro
    Ubuntu Budgie

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by rulet View Post
    As I understand, there is no difference in result(quality) using ffmpeg algorithms on windows or linux?
    Correct. The biggest difference would mainly be in whatever impact might be made by the threading system involved. Linux and Windows can use pthreads, but Windows can also use win32threads. And while I know there is sometimes a slight effect on encoding quality by the use of multithreaded encoding, I don't know how or if it differs between threading methods.

    And I don't understand, do I have to install ffmpeg system-widely to use that bat-file(on windows)
    ffmpeg needs to be on the PATH, which does essentially mean it's 'installed system-wide'. It could be in C:\Program Files\ffmpeg, but as long as that folder has been added to the PATH then the system will see it.

    and what is avconv.exe, is it a replacement of ffmpeg?
    It's not a replacement, it's written by the libav fork for their own obstinate reasons. You can safely ignore it if all you're interested in is using FFmpeg (especially if this commit means what I think it does).

  6. #2036
    Join Date
    Aug 2008
    Beans
    68

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Talking about "system-wide" istallation on windows -- is the difference between "shared" and "static" builds which are here that shared build is fo system-wide installation and static is not?

  7. #2037
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    570
    Distro
    Ubuntu Budgie

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by rulet View Post
    Talking about "system-wide" istallation on windows -- is the difference between "shared" and "static" builds which are here that shared build is fo system-wide installation and static is not?
    See the explanation here:
    http://ubuntuforums.org/showpost.php...postcount=1934

    Both static and shared can be system-wide. The difference is where the 'mass' is.

  8. #2038
    Join Date
    Oct 2011
    Beans
    78
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by rulet View Post
    katya_sehgal, have you entered(in terminal) into that folder which contains your mts file?
    Quote Originally Posted by popper View Post
    your not in the external drives directory and didn't use an explicit path to the file to tell ffmpeg where to find it, so cd to the files directory you want to encode first, then in the shell run something like (assuming you have a current ffmpeg/avconv and not an old one that cant take this new syntax, update if you don't ASAP)

    ffmpeg -threads 0 -i "00001.mts" -f mp4 -vcodec libx264 -preset slow -vprofile high -crf 18 -acodec copy "outfile.MP4"

    or if you want to de-interlace the file add -vf yadif filter like so

    ffmpeg -threads 0 -i "00001.mts" -f mp4 -vcodec libx264 -preset slow -vprofile high -crf 18 -acodec copy -vf yadif "outfile.MP4"

    stay away from using the antiquated avi container and use mp4 or mkv today is my advice unless you need it for a given device that cant take anything else, but then it probably cant take high profile AVC/H.264 ether then.

    I have managed to enter the drive correctly and enter the command. I get this now.

    I am willing to learn. But currently, I need to convert files immediately. WinFF hangs and Arista is non-responsive. I could not get past EKD.
    Is there any way I can use a GUI and edit?

    @popper: tried your command too.

  9. #2039
    Join Date
    Sep 2006
    Beans
    3,713

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by katya_sehgal View Post
    I have managed to enter the drive correctly and enter the command. I get this now.
    http://tinypic.com/view.php?pic=30w2uq0&s=5
    Your input has 6 audio channels. You chose AVI as your output container, and FFmpeg will automatically choose MP3 audio by default for AVI if you do not manually select your desired audio format. The MP3 encoder, libmp3lame, apparently does not support 6 channels, so it complains:
    Code:
    [libmp3lame] Invalid number of channels 6, must be <= 2.
    I see you have some MTS files from a Panasonic video camera (an AG-HMC150 maybe?). What are you trying to do with these? If you explain what you are trying to do we can maybe give you a better example command suited for your task.

    AVI is generally not a recommended output container format for most cases due to its age and lack of support for some modern video and audio formats. The sameq option is also not recommended and is probably the most misused option. Previously, the FFmpeg documentation implied that this option, "makes the output the same quality as the input", but this is not the case and is format specific. The documentation has been updated; although it's still not descriptive, but I can only blame myself for that one. An unfortunate side effect is that recommendations to use this option have been widely circulated on various forums, blogs, etc.
    Last edited by FakeOutdoorsman; December 14th, 2011 at 07:35 PM. Reason: make words better

  10. #2040
    Join Date
    Oct 2011
    Beans
    78
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by FakeOutdoorsman View Post
    Your input has 6 audio channels. You chose AVI as your output container, and FFmpeg will automatically choose MP3 audio by default for AVI if you do not manually select your desired audio format. The MP3 encoder, libmp3lame, apparently does not support 6 channels, so it complains:
    Code:
    [libmp3lame] Invalid number of channels 6, must be <= 2.
    I see you have some MTS files from a Panasonic video camera (an AG-HMC150 maybe?). What are you trying to do with these? If you explain what you are trying to do we can maybe give you a better example command suited for your task.

    AVI is generally not a recommended output container format for most cases due to its age and lack of support for some modern video and audio formats. The sameq option is also not recommended and is probably the most misused option. Previously, the FFmpeg documentation implied that this option, "makes the output the same quality as the input", but this is not the case and is format specific. The documentation has been updated; although it's still not descriptive, but I can only blame myself for that one. An unfortunate side effect is that recommendations to use this option have been widely circulated on various forums, blogs, etc.
    Yes, I got the recommendation from a forum. Also, I installed WinFF from terminal and got a different software from the one I got from Software Centre!

    Followed instructions from here:
    Now when I convert I get this:

    What I am doing.


    I want to convert MTS to smaller formats with as little loss as possible. So that the video play smoothly in OpenShot. From OpenShot, I will cut the video.

    I am okay with anything other than avi if OpenShot is okay with it. Read good things about MKV.

    You are right about the camera, Panasonic: TM200

Page 204 of 241 FirstFirst ... 104154194202203204205206214 ... LastLast

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
  •