FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Join Date
    Oct 2006
    Location
    Melbourne
    Age
    55
    Posts
    611
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile How to download YouTube flash videos in Linux and convert to ffmpeg

    How to download YouTube flash videos in Linux and convert them to a format for viewing in windows

    You will need have all the necessary 3rd party rpms installed from livna. You should be able to play .flv files with movie player (totem-xine) xine, mplayer etc.

    First download the youtube-dl script found at http://www.arrakis.es/~rggi3/youtube-dl/ by opening a terminal and typing the following:

    i have also attached it for download:

    [jonathon@localhost ~]$
    Code:
    wget http://www.arrakis.es/~rggi3/youtube-dl/youtube-dl
    --11:50:26-- http://www.arrakis.es/~rggi3/youtube-dl/youtube-dl
    => `youtube-dl'
    Resolving www.arrakis.es... 212.59.199.45
    Connecting to www.arrakis.es|212.59.199.45|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 15,750 (15K) [text/plain]

    100%[====================================>] 15,750 17.70K/s

    11:50:28 (17.68 KB/s) - `youtube-dl' saved [15750/15750]


    [jonathon@localhost ~]$
    Code:
    su
    Password:
    [root@localhost jonathon]#
    Code:
    cd /home/jonathon/
    [root@localhost jonathon]#
    Code:
    md5sum youtube-dl
    a86bfb24c5f9b7aff0c4ec2975c1a03c youtube-dl
    [root@localhost jonathon]#
    Code:
    chmod 744 youtube-dl
    [root@localhost jonathon]#
    Code:
    mv /home/jonathon/youtube-dl /usr/bin
    ............close terminal

    To download a flash-video from YouTube open a terminal and type the following:

    [jonathon@localhost ~]$
    Code:
    youtube-dl -t http://www.youtube.com/watch?v=Yl8qfu-ojTQ
    Retrieving video webpage... done.
    Extracting video title... done.
    Extracting URL "t" parameter... done.
    Requesting video file... done.
    Video data found at http://nyc-v135.nyc.youtube.com/get_...key=yt1&sver=2
    Retrieving video data: 100.0% ( 11.74M of 11.74M) at 58.29k/s ETA 00:00 done.
    Video data saved to making_a_trumpet-Yl8qfu-ojTQ.flv

    Checkout the 'More Usage Tips" at http://www.arrakis.es/~rggi3/youtube-dl/
    or open a terminal and type the following:

    [jonathon@localhost ~]$
    Code:
    youtube-dl --help
    Usage: youtube-dl [options] video_url

    Options:
    -h, --help print this help text and exit
    -v, --version print program version and exit
    -u USERNAME, --username=USERNAME
    account username
    -p PASSWORD, --password=PASSWORD
    account password
    -o FILE, --output=FILE
    output video file name
    -q, --quiet activates quiet mode
    -s, --simulate do not download video
    -t, --title use title in file name
    -l, --literal use literal title in file name
    -n, --netrc use .netrc authentication data
    -g, --get-url print final video URL only
    -2, --title-too used with -g, print title too
    -f FORMAT, --format=FORMAT
    append &fmt=FORMAT to the URL
    -b, --best-quality alias for -f 18

    To convert flash videos to MPEG-4 for viewing in windows media player and other types of devices open a terminal and type the following:

    [jonathon@localhost ~]$
    Code:
    gedit /home/jonathon/flv2avi.sh
    paste the following script from http://www.linux.com/articles/56642:

    Code:
    #!/bin/sh 
    
    if [ -z "$1" ]; then
      echo "Usage: $0 {-divx|-xvid} list_of_flv_files"
      exit 1
    fi
    
    # video encoding bit rate
    V_BITRATE=1000
    
    while [ "$1" ]; do
      case "$1" in
        -divx)
          MENC_OPTS="-ovc lavc -lavcopts \
            vcodec=mpeg4:vbitrate=$V_BITRATE:mbd=2:v4mv:autoaspect"
          ;;
        -xvid)
          MENC_OPTS="-ovc xvid -xvidencopts bitrate=$V_BITRATE:autoaspect"
          ;;
        *)
          if file "$1" | grep -q "Macromedia Flash Video"; then
            mencoder "$1" $MENC_OPTS -vf pp=lb -oac mp3lame \
              -lameopts fast:preset=standard -o \
              "`basename $1 .flv`.avi"
          else
            echo "$1 is not Flash Video. Skipping"
          fi
          ;;
      esac
      shift
    done
    ............save and close
    [jonathon@localhost ~]$
    Code:
    su
    Password:
    [root@localhost jonathon]#
    Code:
    cd /home/jonathon
    [root@localhost jonathon]#
    Code:
    chmod 755 flv2avi.sh
    [root@localhost jonathon]#
    Code:
    mv /home/jonathon/flv2avi.sh /usr/bin
    ..........close terminal

    If you would like to convert your flash videos to an open source MPEG-4 codec (libavcodec) you can use the -xvid option. The -xvid option refers to software that is used to encode MPEG-4 ASP video. Your new video file will have an .avi extension. The -divx option refers to proprietary based closed source software that is used to create an MPEG-4 codec.The file will also have an .avi extension. By the way if this is not correct please correct me..))

    Code:
    flv2avi.sh -xvid /home/jonathon/myvideo1.flv
    or

    Code:
    flv2avi.sh -divx /home/jonathon/myvideo1.flv



    Another way to convert the flash video to avi that works very well is with this command:


    Code:
    ffmpeg -i /home/user/myvideo.flv -ar 48000 -ac 2 /home/user/myvideo.avi
    example:

    [jonathon@localhost ~]$
    Code:
     ffmpeg -i /home/jonathon/making_a_trumpet.flv -ar 48000 -ac 2 /home/jonathon/making_a_trumpet.avi
    FFmpeg version SVN-r10703, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: --prefix=/usr --incdir=/usr/include/ffmpeg --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --arch=i386 --extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables --enable-liba52 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libogg --enable-libtheora --enable-libvorbis --enable-libxvid --enable-libx264 --enable-pp --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-opts --disable-strip
    libavutil version: 49.5.0
    libavcodec version: 51.45.0
    libavformat version: 51.14.0
    built on Oct 18 2007 03:11:06, gcc: 4.1.2 20070925 (Red Hat 4.1.2-31)

    Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
    Input #0, flv, from '/home/jonathon/making_a_trumpet.flv':
    Duration: 00:05:00.0, start: 0.000000, bitrate: 56 kb/s
    Stream #0.0: Video: flv, yuv420p, 320x240, 25.00 fps(r)
    Stream #0.1: Audio: mp3, 22050 Hz, mono, 56 kb/s
    Output #0, avi, to '/home/jonathon/making_a_trumpet.avi':
    Stream #0.0: Video: mpeg4, yuv420p, 320x240, q=2-31, 200 kb/s, 25.00 fps(c)
    Stream #0.1: Audio: mp2, 48000 Hz, stereo, 64 kb/s
    Stream mapping:
    Stream #0.0 -> #0.0
    Stream #0.1 -> #0.1
    Press [q] to stop encoding
    frame= 7502 fps=264 q=11.4 Lsize= 10369kB time=300.0 bitrate= 283.2kbits/s
    video:7544kB audio:2344kB global headers:0kB muxing overhead 4.876258%
    [jonathon@localhost ~]$



    The tag at the end "myvideo.avi" eg making_a_trumpet.avi allows you to choose the name of the output file.

    johnny
    Attached Files Attached Files
    Last edited by jonathonp; 24th March 2008 at 02:13 AM.

  2. #2
    leigh123linux Guest
    Have you tried xVideoServiceThief


    http://dfn.dl.sourceforge.net/source...nux_bin.tar.gz

    just extract the file , cd to it and run xvst



    xVideoServiceThief is a tool for downloading your favourite video clips from a lot of video websites.

    xVideoServiceThief also provide you the ability to convert each video in most popular formats: AVI, MPEG1, MPEG2, WMV, MP4, 3GP, MP3 file formats.
    http://sourceforge.net/project/platf...roup_id=205061
    Attached Images Attached Images

  3. #3
    Join Date
    Aug 2005
    Location
    Ann Arbor
    Age
    59
    Posts
    3,947
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there also is the old way
    watch the vid. with mozilla mplayer-plugin for example
    open (user name)/.mozilla/default/Cache
    copy the vid ( will have a name something like this 3AE0BB43d01) but the thumb nail will tell you witch one it is.
    copy and past it then remame it to "YourVid.flv
    OpenSUSE 13.2-64bit & Scientific Linux 6.6-64bit ( fedora 4 to 11) and 20 on KVM
    My Celestia Downloads

    h t t p ://celestiamotherlode.net/catalog/show_creator_details.php?creator_id=10

  4. #4
    Join Date
    Oct 2006
    Location
    Melbourne
    Age
    55
    Posts
    611
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    xVideoServiceThief is great. cheers

  5. #5
    Join Date
    May 2007
    Age
    44
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by leigh123@linux
    Have you tried xVideoServiceThief


    http://dfn.dl.sourceforge.net/source...nux_bin.tar.gz

    just extract the file , cd to it and run xvst





    http://sourceforge.net/project/platf...roup_id=205061
    That one looks cool, i've been using a firefox plugin "DownloadHelper" works fine to

  6. #6
    Join Date
    Apr 2007
    Location
    South Dakota
    Age
    43
    Posts
    505
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    don't forget porntube-dl
    If you're not questioning my sanity, I'm not trying hard enough

  7. #7
    Join Date
    Jan 2008
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by leigh123@linux
    Have you tried xVideoServiceThief


    http://dfn.dl.sourceforge.net/source...nux_bin.tar.gz

    just extract the file , cd to it and run xvst





    http://sourceforge.net/project/platf...roup_id=205061
    I LOVEEEEEEE this application... Thanks Leigh
    "Genius is one percent inspiration and 99 percent perspiration" --- Thomas Alva Edison.

    Laptop: Intel i7, Geforce GT 425M, Blu-Ray :D
    Laptop: Amd64 X2, Geforce Go 7600 Intel Core 2 Duo, Geforce 8600M GT
    Desktop: :mad: Thanks Windows Vista! R.I.P. Sept. 2007 :mad:

  8. #8
    Join Date
    Apr 2006
    Location
    Algeria
    Posts
    828
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am using the firefox extension "DownloadHelper".

    DownloadHelper is a tool for web content extraction. Its purpose is to capture video and image files from many sites.

    http://www.downloadhelper.net/install.php

    red
    Last edited by hermouche; 11th April 2008 at 08:59 AM.
    IBM ThinkPad z60m

  9. #9
    Join Date
    Aug 2006
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't forget Miro Internet TV . It's a very nice little app that does lots of things, including grabbing YouTube vids.

    Just remember to use the URL located in the YT Vid's embed code, rather than YT Vid's browser URL.
    Last edited by gadgetwiz; 11th April 2008 at 10:35 AM.
    Gimp Chat | Gimp Scripts | Gimp Tutorials

    The Linux philosophy is 'Laugh in the face of danger'.
    Oops. Wrong One.
    'Do it yourself'. Yeah, that's it. - Linus Torvalds

  10. #10
    Join Date
    Oct 2006
    Location
    Melbourne
    Age
    55
    Posts
    611
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks hermouche and gadgetwiz. To install Miro with fedora:

    Code:
    su
    yum install Miro
    Last edited by jonathonp; 6th May 2008 at 06:02 AM.

  11. #11
    Join Date
    May 2007
    Location
    U.S.
    Posts
    4,851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    - Tom
    "What is freedom? To have the will to be responsible for one's self." - Stirner

  12. #12
    Join Date
    Jan 2008
    Location
    Thailand
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the guide, I used it several times and it did just what I needed with the flv videos. But now all of a sudden it is giving me a funny error message:
    Code:
    [eric@rees ~]$ flv2avi.sh -xvid /home/eric/iron_man_after_credits-vR6zOyj7QXs.flv
    MEncoder 1.0rc2-4.1.1 (C) 2000-2007 MPlayer Team
    CPU: Intel(R) Celeron(TM) CPU                1200MHz (Family: 6, Model: 11, Stepping: 1)
    CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
    Compiled with runtime CPU detection.
    success: format: 0  data: 0x0 - 0x198b9b
    libavformat file format detected.
    [lavf] Video stream found, -vid 0
    [lavf] Audio stream found, -aid 1
    VIDEO:  [FLV1]  320x241  0bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
    [V] filefmt:44  fourcc:0x31564C46  size:320x241  fps:29.97  ftime:=0.0334
    ==========================================================================
    Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
    AUDIO: 22050 Hz, 2 ch, s16le, 48.0 kbit/6.80% (ratio: 6000->88200)
    Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
    ==========================================================================
    xvid: using library version 1.1.3 (build xvid-1.1.3)
    Opening video filter: [expand osd=1]
    Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
    Opening video filter: [pp=lb]
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Selected video codec: [ffflv] vfm: ffmpeg (FFmpeg Flash video)
    ==========================================================================
    MP3 audio selected.
    VDec: vo config request - 320 x 241 (preferred colorspace: Planar YV12)
    [PP] Using external postprocessing filter, max q = 6.
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is undefined - no prescaling applied.
    videocodec: XviD (320x241 fourcc=44495658 [XVID])
    xvid: par=1/1 (ext), displayed=320x241, sampled=320x241
    xvid: CBR Rate Control -- bitrate=1000kbit/s
    xvid: xvidcore returned a 'General fault' error
    FATAL: Cannot initialize video driver.
    VDec: vo config request - 320 x 241 (preferred colorspace: Planar YV12)
    [PP] Using external postprocessing filter, max q = 6.
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is undefined - no prescaling applied.
    videocodec: XviD (320x241 fourcc=44495658 [XVID])
    xvid: par=1/1 (ext), displayed=320x241, sampled=320x241
    xvid: CBR Rate Control -- bitrate=1000kbit/s
    xvid: xvidcore returned a 'General fault' error
    FATAL: Cannot initialize video driver.
    
    Exiting...
    I reinstalled all of my xvid related stuff. Could youtube have changed something to combat the downloading of the videos hosted there? Or am I just missing something obvious? Thanks!

  13. #13
    Join Date
    Dec 2004
    Location
    Canada
    Age
    35
    Posts
    9,221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    youtube-dl is actually in the repositories:
    Code:
    yum install youtube-dl
    youtube-dl http://youtube-url
    ffmpeg -i DownloadedFile.flv -sameq OutputFile.EXT
    .EXT determines the format, ie avi, mpeg, mp4, etc. I highly recommend converting to a plain AVI and then using a transcoding frontent like avidemux or DeVeDe to create the appropriate file.
    Firewing1
    [+] My open source software and blog
    [+] Some of my howtos: (for full list, click here)

  14. #14
    Join Date
    Jan 2008
    Location
    Thailand
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks very much firewing1, that did the trick.

  15. #15
    Join Date
    May 2005
    Location
    g-land, east java
    Age
    62
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    also
    If you want to grab a flash video you have just watched you can cp it from the /tmp path and save it where you want. No need to download it again

    [gordon@tc2 ~]$ cd /tmp
    [gordon@tc2 tmp]$ ls -ltr
    total 19380
    drwx------ 2 gordon gordon 4096 2007-06-30 10:14 keyring-HAHMZm
    srwxr-xr-x 1 root root 0 2007-07-16 09:10 mapping-root
    drwx------ 2 gordon gordon 4096 2007-08-04 11:43 keyring-KPfjwp
    drwx------ 2 gordon gordon 4096 2008-02-22 10:30 keyring-S3Mgla
    srwxrwxr-x 1 regi regi 0 2008-03-29 11:09 mapping-regi
    srwxrwxr-x 1 config config 0 2008-03-29 11:11 mapping-config
    drwxr-x--- 2 root root 4096 2008-04-29 12:52 fah
    drwx------ 2 gordon gordon 4096 2008-04-29 12:53 ssh-RNVJWw3412
    drwx------ 2 gdm gdm 4096 2008-04-29 12:53 orbit-gdm
    drwx------ 2 gordon gordon 4096 2008-04-29 12:53 keyring-yzlNJ3
    drwx------ 3 gordon gordon 4096 2008-04-29 12:53 gconfd-gordon
    drwx------ 2 gordon gordon 4096 2008-04-29 12:53 virtual-gordon.6ERjhV
    srwxrwxr-x 1 gordon gordon 0 2008-04-29 12:53 mapping-gordon
    -rw-r--r-- 1 gordon gordon 14942209 2008-04-29 15:45 PNX_LSYbgY
    -rw------- 1 gordon gordon 261 2008-05-06 07:34 133143_16x9_bb.ram
    -rw------- 1 gordon gordon 263 2008-05-06 07:39 132389_16x9_bb.ram
    drwx------ 2 gordon gordon 4096 2008-05-06 07:52 ksocket-gordon
    drwx------ 2 gordon gordon 4096 2008-05-06 07:58 plugtmp
    drwx------ 2 gordon gordon 4096 2008-05-06 07:58 kde-gordon
    -rw------- 1 gordon gordon 4785364 2008-05-06 07:59 Flashjp7qud
    drwx------ 2 gordon gordon 4096 2008-05-06 08:00 orbit-gordon
    [gordon@tc2 tmp]$ cp Flashjp7qud ~/Desktop/nameofchoice
    [gordon@tc2 tmp]$

Page 1 of 2 12 LastLast

Similar Threads

  1. Download YouTube videos
    By Marko89 in forum Using Fedora
    Replies: 5
    Last Post: 25th September 2019, 11:43 AM
  2. Sound works fine, but not on Youtube videos
    By Magickman in forum Using Fedora
    Replies: 4
    Last Post: 27th March 2009, 05:34 PM
  3. Youtube videos are a little too quiet
    By Panipal2005 in forum Using Fedora
    Replies: 4
    Last Post: 2nd January 2009, 07:35 PM
  4. I cant get sound on youtube or any web videos
    By tootal2 in forum Using Fedora
    Replies: 1
    Last Post: 27th September 2008, 09:32 PM
  5. convert 3gp to flv (youtube)
    By ssb in forum Using Fedora
    Replies: 8
    Last Post: 28th November 2007, 04:15 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •