Page 13 of 13 FirstFirst ... 3111213
Results 121 to 126 of 126

Thread: HOWTO: Download YouTube Stereo MP3s

  1. #121
    Join Date
    Dec 2006
    Beans
    6,936

    Re: HOWTO: Download YouTube Stereo MP3s

    Hi SuperMike,

    Well, a problem might be the different syntax found with all the different versions of ffmpeg found with Ubuntu. The file I have on my Desktop from youtube is the following:

    Code:
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Rammstein_Mutter.mp4':
      Duration: 00:03:45.90, start: 0.000000, bitrate: 338 kb/s
        Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16
        Stream #0.1(und): Video: h264, yuv420p, 352x264, 24.99 tb(r)
    And conversion of audio only with the svn ffmpeg, decreasing the bitrate a little is as follows:

    Code:
    andrew@skamandros:~/Desktop$ ffmpeg -i Rammstein_Mutter.mp4 \
    -acodec libmp3lame -ab 192k Rammstein_Mutter.mp3
    FFmpeg version SVN-r16683, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --disable-debug --enable-shared --disable-static 
    --enable-postproc --enable-avfilter --enable-pthreads --enable-libtheora 
    --enable-libvorbis --enable-swscale --enable-x11grab --enable-libmp3lame 
    --enable-libxvid --enable-libx264 --enable-libschroedinger 
    --enable-libfaac --enable-libamr-wb --enable-libamr-nb 
    --enable-libspeex --enable-libgsm --enable-nonfree --enable-gpl
      libavutil     49.14. 0 / 49.14. 0
      libavcodec    52.11. 0 / 52.11. 0
      libavformat   52.24. 1 / 52.24. 1
      libavdevice   52. 1. 0 / 52. 1. 0
      libavfilter    0. 2. 0 /  0. 2. 0
      libswscale     0. 6. 1 /  0. 6. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Jan 19 2009 12:03:54, gcc: 4.3.2
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Rammstein_Mutter.mp4':
      Duration: 00:03:45.90, start: 0.000000, bitrate: 338 kb/s
        Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16
        Stream #0.1(und): Video: h264, yuv420p, 352x264, 24.99 tb(r)
    Output #0, mp3, to 'Rammstein_Mutter.mp3':
        Stream #0.0(und): Audio: libmp3lame, 44100 Hz, stereo, s16, 192 kb/s
    and this produces a stereo 192 kbs mp3. I am not sure how the stock Ubuntu ffmpeg handles aac audio though. But the sound and picture quality of the unaltered, downloaded mp4 file is pretty impressive anyway do you think?

    Andrew
    Last edited by andrew.46; January 20th, 2009 at 01:52 PM.
    You think that's air you're breathing now?

  2. #122
    Join Date
    Jan 2009
    Beans
    4

    Re: HOWTO: Download YouTube Stereo MP3s

    Hi,

    Smash this is unbelievable!!!!
    Extremely excellent effort.
    This is acutely awfully chill…..

  3. #123
    Join Date
    Jul 2005
    Location
    Remote Desert, USA
    Beans
    683

    Re: HOWTO: Download YouTube Stereo MP3s

    Quote Originally Posted by andrew.46 View Post
    Well, a problem might be the different syntax found with all the different versions of ffmpeg found with Ubuntu. The file I have on my Desktop from youtube is the following
    Andrew.46: Looks like YT screwed with us again. I can no longer convert the /tmp/Flash* (renamed song.flv) to song.mp3 by either:

    # ffmpeg -i song.flv -acodec libmp3lame -ab 192K song.mp3

    nor

    # ffmpeg -i song.flv song.mp3

    EDIT: On the conversion, I keep getting:

    [flv @ 0xb7ef8110]Unsupported video codec (7)
    Last edited by SuperMike; January 20th, 2009 at 07:57 PM.
    SuperMike
    When in doubt, follow the penguins.
    Evil Kitty is watching you

  4. #124
    Join Date
    Dec 2006
    Beans
    6,936

    Re: HOWTO: Download YouTube Stereo MP3s

    Hi,

    Hmmmm.... I am not sure about that. I tested the following:

    Code:
    $ youtube-dl 'http://www.youtube.com/watch?v=EwL0G9wK8j4'
    Sorry about the boring clip . It converted successfully with ffmpeg as follows, I am not sure about the value of increasing the frequency or adding the stereo setting:

    Code:
    ffmpeg -i EwL0G9wK8j4.flv -acodec libmp3lame -ar 44100 -ac 2 -ab 112k test.mp3
    But it certainly produced the required stereo mp3 soundtrack. I should stress that I am not any form of expert with ffmpeg though, just a casual user. For real expertise there is:

    HOWTO: Compile the latest ffmpeg and x264 from source
    http://ubuntuforums.org/showthread.php?t=786095

    Andrew
    You think that's air you're breathing now?

  5. #125
    Join Date
    Aug 2007
    Beans
    2

    Post Re: HOWTO: Download YouTube Stereo MP3s

    Thanks for the work on this.

    I run Intrepid Ibex, and I was having trouble with ecasound outputting the mp3 file directly. Seems there's a disconnect between ecasound and lame. Intrepid uses a newer version of lame and and older version of ecasound which doesn't properly understand lame's newer message output.

    Anyways, I changed the script a bit so that ecasound does it's mono-to-stereo thing and produces a wav file, then lame directly encodes the mp3 from the .wav. This is definitely sub-optimal, but it IS an effective workaround for Intrepid.

    Of course, original credit goes to SuperMike and others in this forum that have posted information. I just connected the final link for me, and believe in giving back.

    My version also keeps most of the files around. /tmp/{filename}.flv is kept, and {filename} (mono).mp3 and {filename} (sim-stereo).mp3 are both produced. The only file I delete is the *.wav file. I do this because I've found on certain videos, I prefer the sound of the mono file.


    Code:
    #!/bin/bash
    #
    # Bash script to convert YouTube Video to Simulated Stereo MP3
    #
    # Public Domain
    # Contributors: Supermike, Crouse, Kai Vehmanen, Chriss.Hi, John-Michael Mulesa, Eli Ribble
    #
    mkdir -p ~/mp3;cd ~/mp3
    read -p "YouTube URL: " ur
    read -p "Filename: " nv
    echo;echo;
    youtube-dl "${ur}" -o "/tmp/${nv}.flv"
    ffmpeg -i "/tmp/${nv}.flv" -f mp3 -vn -acodec copy "${nv}.mp3"
    ecasound -i "${nv}.mp3" -etf:8 -o "${nv}.wav"
    lame "${nv}.wav" "${nv} (sim-stereo).mp3"
    mv "${nv}.mp3" "${nv} (mono).mp3"
    # Comment out the next line to save the .wav file
    rm -f "${nv}.wav"
    # Comment out the next line to save the (mono) file
    #rm -f "${nv} (mono).mp3"
    # Comment out the next line to save the .flv file
    #rm -f "/tmp/${nv}.flv"
    echo;echo;
    echo "File ${nv}.mp3 has been created"
    -Eli Ribble
    Last edited by Ender27182818; January 22nd, 2009 at 06:26 PM.

  6. #126
    Join Date
    Jul 2005
    Location
    Remote Desert, USA
    Beans
    683

    Re: HOWTO: Download YouTube Stereo MP3s

    Ender27182818: Don't forget, you can also add "&fmt=18" on the end of SOME (keyword, SOME) YouTube videos and get better sound quality, if not stereo, and thus ecasound might not be necessary. However, I've noted that some videos already come in stereo, and some videos do not benefit with fmt=18 at all -- it all depends and you must test with your ears before running youtube-dl script.
    SuperMike
    When in doubt, follow the penguins.
    Evil Kitty is watching you

Page 13 of 13 FirstFirst ... 3111213

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
  •