This forum is closed. Please visit help.twitch.tv for assistance. (Read More)

Downloading videos from Twitch.tv

This is out of date, please refer to the >FAQ< for current downloading methods.
-Fire

I have also posted this on the Justin.tv forums and I think it may help some people out.

I've made a script which makes it possible to easily get the source url from your twitch.tv videos.


And here's the current source code (so people who know how this works could improve on this or implement the method that I use to access the API)

Edit: Moved source code to http://jeffro.fakegaming.eu/twitchsource.txt due format issues

Hope you guys enjoy this, if you have any questions or bugs or problems to report please post here or in the other thread or feel free to message me :) 

~Jeffro~
Post edited by Fire on
«1

Comments

  • I tried it but I'm getting a 403 Forbidden error on both Firefox and IE.
  • I tried the Firefox plugin mentioned in your post as well as the FDM program.  Neither works at all. 
  • It works a treat ..

    You need to get an external Download manager

    like FDM

    Once you have generated the link simply drag it into the download manager.
  • Yea I tried Down them all for Firefox and wget/curl on linux, works well. Thanks!
  • desn't work for me :(
  • I tried using curl on Mac and it's not working. Same with DTA! extension on Firefox. 
  • Only download files that are 162 bytes :(
    Would a download manager help with this issue, or only when people get 403 forbidden?
  • bgeorgebgeorge Moderator
    When you try and download the file in your browser by clicking the link or doing a right click -> Save you will get a 404 page. I believe this be because your browser is sending a referral from a non-JTV/TTV site and it is not allowing the request.

    If you copy the link directly into a download manager, curl, wget or something similar it will not send this referral and allow you to download the file. Also copying the link URL and pasting it into a new tab also works for some people using Firefox.
  • FireFire Moderator
    @jeffroiscool The source link doesn't work anymore.
    Post edited by Fire on
  • Thanks a bunch bgeorge and jeffroiscool. Works fine when I copy the link and post it into a new tab instead of right clicking and choosing save as.
  • I tried also all of this stuff, and nothing. I tried with youtube for the FDM and it worked. With DTA, it appears some files to download but no video, even while streaming. The info fom jeffro doesn't work at all.
  • i paste the link and it gives me the wrong video
  • FireFire Moderator
    @centryone this doesn't work with un-parted archives nor with highlights anymore. It's outdated
  • I don't know if you are talking about downloading archived videos or the game videos that are on live. For the former one, there are many solutions for you to solve it easily. Such as, the download helper of Firefox browser, or try some online video download websites like keepvid or savevid. But for the later one, you need to capture the live video streams with screen capture tool. Then you can get the video while you are watching it.

    In order to get these two kinds of videos, I think it will do you a good favor to use Streaming Video Recorder, since it is not only works as a video download tool but also serves as a screen capture software. Therefore it can definitely help you record twitch.tv videos by capturing live video on PC screen, or directly downloading saved game videos.
    Post edited by stevehj on
  • FireFire Moderator
    @stevehj he's more than likely trying to use a twitch /c/ID link, which will return the wrong clip.
  • xendoxendo Member
    Just use JDownloader, quick and easy :)
  • I want to download http://www.twitch.tv/sc2tv_ru/b/311099048
    but when I use link http://api.justin.tv/api/clip/show/311099048.xml
    it gives me a link to first 2 hours of the video.
    JDownloader  recognizes 1st link but writes size = 862MB (it is exactly first 2 hours of a video).

    How to download another  parts of http://www.twitch.tv/sc2tv_ru/b/311099048 ?

    Best wishes,
    Kakadu

  • Can you reupload the source code?
    I would check them out :) thx!
  • bgeorgebgeorge Moderator
    @dedrasc - I have a modified version of Jeffro's original script -> 
    http://bashtech.net/justin/source/clip-php.txt
  • Nice bgeorge :)

    I also noticed that it doesn't allow referers to download which is why download managers work.

    You can also just copy and paste the url into a new tab and it will download (in my case it did ;) )
  • I also have problems with the youtube exporter. over the last month I was able to upload 1 random video to youtube, the rest of the time it just refreshes the page but anyway, when I use FDM to download the VOD it has no audio, anyone know why?
  • bgeorgebgeorge Moderator
    @bazookai - Is there any audio when you want the VOD on the Twitch page? FDM only downloads the file as it is stored in the Twitch archives and does not modify it in anyway.
  • Yea there is audio on the VOD.

    I drag the link I generate using http://bashtech.net/justin/clip.php into the FDM, am I doing something wrong?

    edit: actually if I open it with winamp I can hear sound but when I open it with VLC there is no sound only video 
    ?_? 
    Post edited by bazookai on
  • FireFire Moderator
    @bazookai then whatever codec the audio uses VLC doesn't understand.
  • @bgeorge
    Thx works well, and I can modify anything now, but I think I don't need to change that ^^

    I know it's not the topic but, do you know a method to implement a "follow button" on my website?
    If you embed the "video" on your website, you have no follow button above that. And I don't find anything in the twitch APi for that.
  • @ ALL:

    I optimized the Code a bit. Do it that way and you don't need a downloader.
    I tested it with many variations of "javascript" popup and so on, nothing works. Only with a "manual" click in the URL it works, after I modified the code a bit.

    http://www.dedra-sc.com/twitch.php

    Test it with that video file:
    http://www.twitch.tv/dedrasc/b/307502600


    Ah, and the W3C invalid errors comes from the embed, also from the twitch thing :-\
    My script is totally valid ^__^
    Post edited by dedrasc on
  • bgeorgebgeorge Moderator
    @dedrasc - Cool. I didn't know about the rel="noreferrer" HTML attribute. Updated my index page with it. 
  • @ ALL: (can't delete the message above. I delete the original script and made my own)

    I changed that script completly. There was so many things you don't need for the "download" functionality!

    Now the PHP Code is much shorter, and I styled the HTML with CSS a bit ;) I tested it with many variations of "javascript" popup and so on, nothing works. Only with a "manual" click in the URL it works.
    The W3C invalid code is from the embed (twitch), I can't do anything against that. My HTML-Code is valid.
    The PHP Code is now 25 lines short !!! Original 43 Lines.

    Heres the Script:
    http://www.dedra-sc.com/twitch.php

    Test it with that video file:
    http://www.twitch.tv/dedrasc/b/307502600

    And if you like, you can visit my website, if you are interessted in SC2! It's not finaly translated into english, but I will do that as quick as I can :)

    http://www.dedra-sc.com

    Ah, and the W3C invalid errors comes from the embed, also from the twitch thing :-\ My script is totally valid ^_^
    Post edited by dedrasc on
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID