LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   downloading video from youtube (https://www.linuxquestions.org/questions/linux-newbie-8/downloading-video-from-youtube-902224/)

sumeet inani 09-09-2011 09:30 PM

downloading video from youtube
 
i want to download at http://www.youtube.com/watch?v=J5f-jUpUp8o
the video does not get cached in firefox.
if you are able to grab this video. please tell me how ?

macemoneta 09-09-2011 09:50 PM

Install youtube-dl, then just:
Code:

youtube-dl -t http://www.youtube.com/watch?v=J5f-jUpUp8o

sag47 09-09-2011 09:57 PM

  1. You could also install Firebug, a firefox add-on.
  2. Open Firebug (F12)
  3. Click on the network tab and click enable when you get to youtube.
  4. Load that video.
  5. Reorganize the data transfers by size (the video will be the largest between ~50-100MB).
  6. Then copy the URL into a new tab and save file as.
  7. Alternatively, you could install DownThemAll and download the video spoofing the referrer from the DTA Manager.

If the video doesn't show up it means you didn't enable Firebug in time to capture the network transfer. Simply clear your cache and then reload the page after Firebug is open and network is enabled. You should see it then.

The same method works for music sites like playlist.com. It's not illegal to download music that way because you're following the DMCA and not sharing music, only downloading publicly available music.

@macemoneta: That's a cool script. First time I've seen it.

SAM

frieza 09-09-2011 10:11 PM

i've noticed the 'net console allows you to locate the url of online radio streams from sites like live365 as well (something they USED to publicly publish when i first became a member)

macemoneta 09-09-2011 10:12 PM

Quote:

Originally Posted by sag47 (Post 4467838)
@macemoneta: That's a cool script. First time I've seen it.
SAM

It's in the Fedora repository, and they keep it up to date which is why I use it. It hasn't failed me ... yet. :)

sumeet inani 09-09-2011 10:25 PM

i used https://raw.github.com/rg3/youtube-d....04/youtube-dl
i got this output
Code:

./youtube-dl -t http://www.youtube.com/watch?v=J5f-jUpUp8o
[youtube] Setting language
[youtube] J5f-jUpUp8o: Downloading video webpage
[youtube] J5f-jUpUp8o: Downloading video info webpage
[youtube] J5f-jUpUp8o: Extracting video information
Traceback (most recent call last):
  File "./youtube-dl", line 2987, in <module>
    retcode = fd.download(all_urls)
  File "./youtube-dl", line 604, in download
    ie.extract(url)
  File "./youtube-dl", line 844, in extract
    return self._real_extract(url)
  File "./youtube-dl", line 1085, in _real_extract
    url_map = dict((ud['itag'], urllib.unquote(ud['url'])) for ud in url_data)
  File "./youtube-dl", line 1085, in <genexpr>
    url_map = dict((ud['itag'], urllib.unquote(ud['url'])) for ud in url_data)
KeyError: 'url'


macemoneta 09-09-2011 10:50 PM

That video appears to be protected (probably DRMed).

jmszr 09-10-2011 12:13 AM

sumeet inani,

I use the Firefox add-on Video DownloadHelper: https://addons.mozilla.org/en-US/fir...ownloadhelper/ . It works well and will convert video formats as it is downloading, if you wish.

Hope that helps.

sumeet inani 09-10-2011 01:31 AM

hi jmszr,
actually video link i pointed out seems difficult to grab.
please explain your success in this case.

sumeet inani 09-10-2011 01:36 AM

to macemoneta
Quote:

That video appears to be protected (probably DRMed).
from youtube-dl documentation
Quote:

Some YouTube videos are served using Adobe's proprietary RTMP protocol, which imposes DRM restrictions and encrypts the connection. youtube-dl is not able to download these videos by itself. However, it will attempt to use the rtmpdump program, if it's installed in your system, to download these videos.
i could not compile rtmpdump & could not find debian file.
i am using ubuntu 10.04

sumeet inani 09-10-2011 01:38 AM

i have installed libssl-dev
here i am stuck
Code:

rtmpdump-2.2e$ make SYS=darwin
make[1]: Entering directory `/home/lxuser/Desktop/rtmpdump-2.2e/librtmp'
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.2e\" -DUSE_OPENSSL  -O2  -c -o rtmp.o rtmp.c
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.2e\" -DUSE_OPENSSL  -O2  -c -o log.o log.c
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.2e\" -DUSE_OPENSSL  -O2  -c -o amf.o amf.c
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.2e\" -DUSE_OPENSSL  -O2  -c -o hashswf.o hashswf.c
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.2e\" -DUSE_OPENSSL  -O2  -c -o parseurl.o parseurl.c
ar rs librtmp.a rtmp.o log.o amf.o hashswf.o parseurl.o
ar: creating librtmp.a
make[1]: Leaving directory `/home/lxuser/Desktop/rtmpdump-2.2e/librtmp'
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.2e\"  -O2  -c -o rtmpdump.o rtmpdump.c
gcc -Wall  rtmpdump.o librtmp/librtmp.a  -o rtmpdump -lssl -lcrypto -lz
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.2e\"  -O2  -c -o rtmpgw.o rtmpgw.c
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.2e\"  -O2  -c -o thread.o thread.c
gcc -Wall  rtmpgw.o thread.o librtmp/librtmp.a  -o rtmpgw  -lssl -lcrypto -lz
thread.o: In function `ThreadCreate':
thread.c:(.text+0x55): undefined reference to `pthread_create'
collect2: ld returned 1 exit status
make: *** [rtmpgw] Error 1

while in latest git
Code:

rtmpdump$ make SYS=darwin
make[1]: Entering directory `/home/lxuser/rtmpdump/librtmp'
gcc -dynamiclib -twolevel_namespace -undefined dynamic_lookup -fno-common -headerpad_max_install_names -install_name /usr/local/lib/librtmp.0.dylib  -o librtmp.0.dylib rtmp.o log.o amf.o hashswf.o parseurl.o  -lssl -lcrypto -lz
gcc: dynamic_lookup: No such file or directory
gcc: /usr/local/lib/librtmp.0.dylib: No such file or directory
gcc: unrecognized option '-twolevel_namespace'
gcc: unrecognized option '-headerpad_max_install_names'
make[1]: *** [librtmp.0.dylib] Error 1
make[1]: Leaving directory `/home/lxuser/rtmpdump/librtmp'
make: *** [librtmp/librtmp.a] Error 2


macemoneta 09-10-2011 02:05 AM

It doesn't matter. I built the latest rtmpdump from git and applied the latest patch to youtube-dl. That file now generates:
Code:

$ ./youtube-dl 'http://www.youtube.com/watch?v=J5f-jUpUp8o'
[youtube] Setting language 
[youtube] J5f-jUpUp8o: Downloading video webpage
[youtube] J5f-jUpUp8o: Downloading video info webpage
[youtube] J5f-jUpUp8o: Extracting video information
[youtube] RTMP download detected
[download] Destination: J5f-jUpUp8o.flv
RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...

ERROR: rtmpdump exited with code -11

You'll have to wait until one of the developers figures out what changed.

sumeet inani 09-10-2011 02:16 AM

can you solve my rtmpdump installation ?

macemoneta 09-10-2011 02:25 AM

You need to install the 'glibc-devel' package for POSIX threads (on Fedora).

knudfl 09-10-2011 02:28 AM

Quote:

can you solve my rtmpdump installation ?
Which OS are you using ? Please specify OS every time you ask a question.
Ubuntu 11.04 ? Fedora 15 ? Etc. etc.


'rtmpdump' compiles OK with gcc-4.4.1 : cd rtmpdump/ && make : No errors.

..


All times are GMT -5. The time now is 06:29 PM.