Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infoq download broken? #722

Closed
pandeiro opened this issue Mar 2, 2013 · 7 comments
Closed

infoq download broken? #722

pandeiro opened this issue Mar 2, 2013 · 7 comments

Comments

@pandeiro
Copy link

@pandeiro pandeiro commented Mar 2, 2013

Command:

youtube-dl --verbose "http://www.infoq.com/presentations/Clojure-Reducers"

Output:

[debug] youtube-dl version 2013.02.22
[debug] Python version 3.3.0 - Linux-3.7.9-2-ARCH-i686-with-arch
[debug] Proxy map: {}
[InfoQ] http://www.infoq.com/presentations/Clojure-Reducers: Downloading video webpage
[InfoQ] http://www.infoq.com/presentations/Clojure-Reducers: Extracting information
[download] Destination: Reducers - A Library and Model for Collection Processing-12-jun-reducers.mp4
Traceback (most recent call last):
File "/usr/bin/youtube-dl", line 6, in
youtube_dl.main()
File "/usr/lib/python3.3/site-packages/youtube_dl/init.py", line 516, in main
_real_main()
File "/usr/lib/python3.3/site-packages/youtube_dl/init.py", line 500, in _real_main
retcode = fd.download(all_urls)
File "/usr/lib/python3.3/site-packages/youtube_dl/FileDownloader.py", line 525, in download
self.process_info(video)
File "/usr/lib/python3.3/site-packages/youtube_dl/FileDownloader.py", line 468, in process_info
success = self._do_download(filename, info_dict)
File "/usr/lib/python3.3/site-packages/youtube_dl/FileDownloader.py", line 632, in _do_download
info_dict.get('page_url', None))
File "/usr/lib/python3.3/site-packages/youtube_dl/FileDownloader.py", line 566, in _download_with_rtmpdump
subprocess.call(['rtmpdump', '-h'], stdout=(file(os.path.devnull, 'w')), stderr=subprocess.STDOUT)
NameError: global name 'file' is not defined

Version:

2013.02.22

Python

Python 3.3.0

OS:

GNU/Linux 3.7.9-2-ARCH i686

@phihag
Copy link
Contributor

@phihag phihag commented Mar 3, 2013

Oops, that's a 3.3 error, fixed in 967897f. However, rtmpdump doesn't download a usable file for me indeed. We'll have to investigate, thanks for the report.

@pandeiro
Copy link
Author

@pandeiro pandeiro commented Mar 17, 2013

Thank you for the great work.

FWIW, I just tried with the version in master and it's still broken. Appending output below in the hopes it makes finding the problem easier:

[InfoQ] http://www.infoq.com/presentations/Zolodeck: Downloading video webpage
[InfoQ] http://www.infoq.com/presentations/Zolodeck: Extracting information
[download] Destination: 12-sep-clojredatomicstorm.mp4
Traceback (most recent call last):
File "/usr/lib/python3.3/runpy.py", line 160, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python3.3/runpy.py", line 73, in _run_code
exec(code, run_globals)
File "./youtube-dl/main.py", line 17, in
File "./youtube-dl/youtube_dl/init.py", line 514, in main
File "./youtube-dl/youtube_dl/init.py", line 498, in _real_main
File "./youtube-dl/youtube_dl/FileDownloader.py", line 526, in download
File "./youtube-dl/youtube_dl/FileDownloader.py", line 469, in process_info
File "./youtube-dl/youtube_dl/FileDownloader.py", line 633, in _do_download
File "./youtube-dl/youtube_dl/FileDownloader.py", line 567, in _download_with_rtmpdump
NameError: global name file is not defined

@cykl
Copy link

@cykl cykl commented Mar 23, 2013

I'm not a youtube-dl user, I found this issue by chance. I'm the author of infoqscraper, and you are most likely facing the same issue that I had to handle few months ago.

Basically, InfoQ changed their rtmp settings when they replaced flv by mp4.

Was: rtmpdump -r rtmpe://video.infoq.com/cfx/st/%s -o out
Now: rtmpdump -r rtmpe://video.infoq.com/cfx/st/ -y mp4:video.mp4

Please note that old presentations have not been converted into mp4, but you must use the new rtmpdump command. The prefix is flv:

If you are interested in downloading a presentation with its soundtrack and slides as video stream rather than the speaker, you can try infoqscraper.

@pandeiro
Copy link
Author

@pandeiro pandeiro commented Mar 23, 2013

Wow, great info! I looked into infoqscraper while looking for a temporary solution but I had an issue because I'm not a Python guy and archlinux uses Python 3 as /usr/bin/python, so setup is a little complicated. So ultimately I opted to use UA bluffing to get a direct link to the mp4 file of the videos I wanted.

It would be great though if this fix made it into youtube-dl.

As for me, I'd love to get infoqscraper working because the videos themselves ignore the slides, making the presentations difficult to follow. I will take another look at it.

On Mar 23, 2013 6:51 AM, "cykl" notifications@github.com wrote:

I'm not a youtube-dl user, I found this issue by chance. I'm the author of
infoqscraper, and you are most likely facing the same issuehttps://github.com/cykl/infoqscraper/commit/2d8039e1062ce1325a4972b2498234f8df4bf849that I had to handle few months ago.

Basically, InfoQ changed their rtmp settings when they replaced flv by mp4.

Was: rtmpdump -r rtmpe://video.infoq.com/cfx/st/%s -o out
Now: rtmpdump -r rtmpe://video.infoq.com/cfx/st/ -y mp4:video.mp4

Please note that old presentations have not been converted into mp4, but
you must use the new rtmpdump command. The prefix is flv:

If you are interested in downloading a presentation with its soundtrack
and slides as video stream rather than the speaker, you can try
infoqscraper.


Reply to this email directly or view it on GitHubhttps://github.com//issues/722#issuecomment-15334511
.

@cykl
Copy link

@cykl cykl commented Mar 23, 2013

I just gave a look at the youtube-dl source code and tried to use it and I can confirm the problem and its solution:

   [debug] rtmpdump command line: rtmpdump -q -r rtmpe://video.infoq.com/cfx/st/presentations/12-sep-highperfarmancecloud.mp4 -o 12-sep-highperfarmancecloud.mp4.part -e -k 1

It no longer works for InfoQ. I'm not a rtmpdump expert but I have been able to download the video with the following command:

    rtmpdump -q -r rtmpe://video.infoq.com/cfx/st/ -y mp4:presentations/12-sep-highperfarmancecloud.mp4 -o 12-sep-highperfarmancecloud.mp4.part -e -k 1

I don't see an obvious way to patch _download_with_rtmpdump to add support for a such command. Rtmpdump parameters are hard coded. It is preferable to let a youtube-dl commiter write the patch.

BTW: I just released a new 0.0.3 version to add support of arch linux/python2. Fell free to fill a bug report and send me an email next time ;)

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Apr 24, 2013

I can download the video, but the file is suffixed with mp4instead of flv, but the video can played without problems.

@phihag
Copy link
Contributor

@phihag phihag commented Apr 21, 2014

Thank you for the report. This has been fixed in youtube-dl 2014.04.21.1. Type youtube-dl -U to update.

@phihag phihag closed this in edec83a Apr 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.