Page 196 of 241 FirstFirst ... 96146186194195196197198206 ... LastLast
Results 1,951 to 1,960 of 2402

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

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

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

    Your FFmpeg configure line is missing --enable-libmp3lame. This is required if you want to encode mp3, although the error message could be improved. I assume you followed the 10.04 version of the guide and skipped step 5 or simply omitted the instructions to add --enable-libmp3lame. This happens on occasion, and I will consider changing the guide because I feel that note about adding --enable-libmp3lame is often ignored or overlooked.

    What you can do:
    • Recompile ffmpeg and follow step 5,
    • Or Pipe from ffmpeg to LAME,
    • Or uninstall your compiled ffmpeg and install it from the repository instead

    If you're impatient just install lame:
    Code:
    sudo apt-get install lame
    Then pipe the audio from ffmpeg to lame:
    Code:
    ffmpeg -i input.mp4 -f wav - | lame - output.mp3
    Or install ffmpeg from the repository and enable the mp3 encoder. It's easy to do since you'll just need to install two packages and is described under Option B here:

    HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg

    Then you can use your same command from post #1950, but I recommend adding -aq 4 to improve the quality of the output because the default settings use an unusually low bitrate (64 kilobits/s [but maybe default is 128k now]) for most purposes.
    Last edited by FakeOutdoorsman; November 24th, 2011 at 09:21 PM.

  2. #1952
    Join Date
    Nov 2009
    Beans
    699

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

    I think I discovered the problem;

    The first 3 lines (see the attached picture) weren't checked off. Installation was successful (so I think) once they were checked off. We'll see.

    Thank you for the help.
    Attached Images Attached Images

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

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

    The Canonical Partner Repositories do not provide anything that is required by this guide.

  4. #1954
    Join Date
    Nov 2009
    Beans
    699

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

    I have no idea why I now have the mp3 codec. I made many attempts to install ffmpeg using your guide to no success until those 2 or 3 items were checked off.

    Perhaps in Step 7 (for Ubuntu 10.04) adding the mp3 (or whatever it's called) to the ./configure line at a specific part of one of the code lines is important. The successful time I placed the additional code line just after the words "./configure" instead of at the end of the entire ./configure line.

    I'm just a computer user and not a programmer and have little ability to work around things which are understandable by experienced users.

    I've asked this question 10,000 times and it never gets easier for me to understand but all I want to do is take any video (usually off of Y T) and put it on my iPod 160 G Classic. Everyone has a code line that works for them but only a few times have those lines worked for me. This is so frustrating.

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

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

    Quote Originally Posted by PDA1 View Post
    Perhaps in Step 7 (for Ubuntu 10.04) adding the mp3 (or whatever it's called) to the ./configure line at a specific part of one of the code lines is important.
    Yes, as I mentioned previously, and as the guide stated, adding --enable-libmp3lame is required if you want to encode mp3 files.

    Quote Originally Posted by PDA1 View Post
    The successful time I placed the additional code line just after the words "./configure" instead of at the end of the entire ./configure line.
    Placement of --enable-libmp3lame on the ffmpeg ./configure line does not matter as long as it is there.

    Quote Originally Posted by PDA1 View Post
    I'm just a computer user and not a programmer and have little ability to work around things which are understandable by experienced users.
    I am also not a programmer.

    I changed the 10.04 guide to make it more user friendly by removing the extra complexity of the optional sections. Now users can simply copy and paste the code boxes without reading the additional instructions (which probably happens much more than I expect) and still get all of the features offered by the guide. I will do this to the other guides where applicable for consistency.

    Also, although I try to write the guides from the viewpoint of a beginner, compiling may not be for everyone. I have an additional guide that shows how to install ffmpeg from the repository and enable the disabled-by-default encoders for formats such as mp3 and aac:

    HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg

    Quote Originally Posted by PDA1 View Post
    I've asked this question 10,000 times and it never gets easier for me to understand but all I want to do is take any video (usually off of Y T) and put it on my iPod 160 G Classic. Everyone has a code line that works for them but only a few times have those lines worked for me. This is so frustrating.
    Picky devices are picky. Did you see my answer to your other recent post?

  6. #1956
    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 PDA1 View Post
    Thanks for helping me but I got an error message when I tried to get the mp3 from a video file.

    Below is the entire results from the command line input to the end;
    Code:
    echo@echo-laptop:~/Downloads$ ffmpeg -i rrr.mp4 dkdik.mp3
    [snip]
        Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 95 kb/s
    [snip]
    Any idea how to fix it?
    I've asked this question 10,000 times and it never gets easier for me to understand but all I want to do is take any video (usually off of Y T) and put it on my iPod 160 G Classic. Everyone has a code line that works for them but only a few times have those lines worked for me. This is so frustrating.
    As the readout showed, the audio stream in the file is AAC. iPods support that format, so you don't have to convert anything (although it might need to be run through qtfaststart).

    For instance,
    Code:
    ffmpeg -i inputfile.mp4 -vn -acodec copy outputfile.m4a
    The -vn disables the video, and -acodec copy transfers the audio to a new, smaller file. If you know the audio is MP3 and not AAC, then just change the .m4a on the output filename to .mp3 (because while it's totally standard-compliant to put MP3 into the MP4 container, I have no clue whether devices are weird about that).

  7. #1957
    Join Date
    Nov 2009
    Beans
    699

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

    I really love all of that hi-tech lingo.....but have no idea what it means. I'm rather dumb- all I want to do is take any video like from Y T and convert it to a playable format for my iPod. From what I've seen and tried about 95% of the code lines DO NOT work, are old and out of date and won't work with current ffmpeg stuff.

  8. #1958
    Join Date
    Jul 2006
    Beans
    34

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

    Quote Originally Posted by PDA1 View Post
    I have no idea why I now have the mp3 codec.
    I'm just a computer user and not a programmer and have little ability to work around things which are understandable by experienced users.

    I've asked this question 10,000 times and it never gets easier for me to understand but all I want to do is take any video (usually off of Y T) and put it on my iPod 160 G Classic. Everyone has a code line that works for them but only a few times have those lines worked for me. This is so frustrating.
    well lets see
    goggling the spec as YOU didn't say what that iPod 160 G Classic device takes
    http://support.apple.com/kb/SP572

    "Video
    H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second, Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; H.264 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Baseline Profile up to Level 3.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats"

    "Audio
    Frequency response: 20Hz to 20,000Hz
    Audio formats supported: AAC (8 to 320 Kbps), Protected AAC (from iTunes Store), MP3 (8 to 320 Kbps), MP3 VBR, Audible (formats 2, 3, 4, Audible Enhanced Audio, AAX, and AAX+), Apple Lossless, AIFF, and WAV"

    SO given the latest ffmpeg/avconv that would be

    video coded to H.264/x264/AVC baseline profile (NOT mp4 aka divx/xvid) at a max 2.5 Mbp 640 by 480, and audio codec AAC (not Mp3) at 128Kb/s is fine (320Kbit/s or even 192KBit/s IS OTT) inside an .MP4 container ... given that AVC and AAC go together as intended....and do not make the sharp input video fuzzy as hell like divx/xvid does every single time..

    so the line you want is probably this

    avconv.exe if your using their latest GIT as their ffmpeg will be renamed soon or

    ffmpeg -threads 4 -i "infile.whatever" -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 "outfile.MP4"

    this is OC untested as i don't have that device and iv just modified my usual MKV to MP4 CRF line to suit and add the scale etc.... so there may be syntax typing errors in that line that need sorting, but it should work as is given the data above.

    edit:
    so i made a quick sample encode with the line and it seems to work fine although not as sharp as it could be but thats down to the re-scale to a far lower screen size OC, so test that and see if it plays OK for you.
    http://www.mediafire.com/?2egrbf61jf5ejn6

    and given that screen size and not knowing what the actual ratio is of your infile ("mediainfo" is good for finding that info out per file) then you may want/need to add ,setdar=16:9 after the scale part to make it display widescreen/16:9 ratio files properly

    so the main points are your device takes the better AVC.AAC codecs so use them over the fuxxy and old divx/xvid to get far better visual quality and file size when you re-encode properly.

    you may need/want to change the "1500k" parts to read "765k" if you're device is an older one that only takes slower bit rates to play video smoothly apparently, but try 2500k first then 1500k as above as theres no point throwing away good bit-rate detail if you dont need/want to.

    that line is using CRF-18 for keeping as much quality as possible which is considered high usually BUT the -minrate,maxrate, and bufsize counter act that to restrict the video stream to the given lower bitrate as is required and is good.
    Last edited by popper; November 25th, 2011 at 01:53 PM.

  9. #1959
    Join Date
    Nov 2009
    Beans
    699

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

    Quote Originally Posted by qyot27 View Post
    As the readout showed, the audio stream in the file is AAC. iPods support that format, so you don't have to convert anything (although it might need to be run through qtfaststart).

    For instance,
    Code:
    ffmpeg -i inputfile.mp4 -vn -acodec copy outputfile.m4a
    The -vn disables the video, and -acodec copy transfers the audio to a new, smaller file. If you know the audio is MP3 and not AAC, then just change the .m4a on the output filename to .mp3 (because while it's totally standard-compliant to put MP3 into the MP4 container, I have no clue whether devices are weird about that).

    Wow! your code for getting only the audio (m4a) was REALLY fast. Most of the time I convert to MP3 which takes a long time for most files I have.

    Here's what I typically do to get the audio- ffmpeg -i INPUT.mp4 OUTPUT.mp3

    The reason I use mp3 is (being the dope that I am) because M4A isn't a familiar extension to me and I'm concerned about moving any audio (or video) file to another media player (like something other than an iPod) and most play MP3.

    Thanks for the help.

  10. #1960
    Join Date
    Jul 2006
    Beans
    34

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

    Quote Originally Posted by PDA1 View Post
    Wow! your code for getting only the audio (m4a) was REALLY fast. Most of the time I convert to MP3 which takes a long time for most files I have.

    Here's what I typically do to get the audio- ffmpeg -i INPUT.mp4 OUTPUT.mp3

    The reason I use mp3 is (being the dope that I am) because M4A isn't a familiar extension to me and I'm concerned about moving any audio (or video) file to another media player (like something other than an iPod) and most play MP3.

    Thanks for the help.
    actually you misunderstand that line , ill try and explain, qyot27's ffmpeg -i inputfile.mp4 -vn -acodec copy outputfile.m4a says take any input file even with video and audio but dont even try and copy or encode any video contained in there to the new container , and COPY (hence the -acodec copy part) any audio inside there TO a new .m4a container file.

    digital video/audio files are basically made up of 3 or more parts, the video codec, the audio codec and any other data such as subtitles placed inside a container, a container being MP4, MKV or the antiquated avi container that everyone should avoid using/making today etc

    the basic rule i follow these days is anything that cant take AVC, AAC inside a MP4 or MKV container in 2011 needs scrapping ASAP and its way past time to go and get something that can.
    Last edited by popper; November 25th, 2011 at 02:53 PM.

Page 196 of 241 FirstFirst ... 96146186194195196197198206 ... 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
  •