-
Notifications
You must be signed in to change notification settings - Fork 580
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
Feature: twitch.tv / justin.tv archived video (VOD) support #70
Comments
I will add support for this soon, but there is a feature missing that needs to be added first. Twitch VODs are split up into 30 min segments, so a FLV joiner needs to be added to support this. |
Maybe this project helps: Python project to join flv files with same options(normally splitted by video server) together losslessly |
Alternative solution by using
|
Any update on this feature ? |
Afraid not. Perhaps I was a bit overly optimistic in my earlier post, what I really meant was that I WANT to add it, but I don't know when, there are other things that needs to be done that are higher priority right now. If anyone else wants to take a stab at it, here are some of my thoughts. The place to start is probably to take the timestamp adjust code from stream/hds.py and create a generic FLV concat class that you can feed a FLV tag and get a timestamp-adjusted tag back. You could then create a Stream class that reads tags from a list of Stream objects (for example a HTTPStream for each VOD segment) and processes them with previously mentioned class to get correct timestamps. I don't know for sure if this approach will work though, the H264 timestamps may need to be adjusted aswell which would make this alot harder. Using ffmpeg might be the best option if that's the case. While that would probably limit us to the transports ffmpeg supports, that would be okay in this scenario since it's just HTTP links. |
Your approach is to feed vlc with fake, huge file and jumping to a timestamp would trigger livestreamer to feed appropriete timestamp from file list to vlc ? I'm I understanding it correctly ? Can we just simplify this for now and do it dirty an unelegant way. The first thing that comes to mind is playlist of all files. That way You are able to curcumvent the issue with timestamps. (Leave it for better times :P). And as to a proper issue. Can You elaborate on timestams and h264 thing? I have little to no knoledge of it, but when You talked about ffmpeg, You proposed encoding it ? Am I understanding it correctly ? |
My approach is simply to basically rewrite the FLV container with correct timestamps. Most of this is already implemented in
Livestreamer is designed to output a raw stream of bytes to a output, such as a player or file, this is to be as compatible as possible. If we start feeding URLs to VLC or whatever, we suddenly face alot of corner cases where different players use different parameters and it would also make file output impossible. If you want to write small script yourself that simply launches VLC with the segment URLs, the relevant API URL is
The reason we need to mess with timestamps is because if we don't, the resulting output will not be a valid FLV file. The player would play the first segment normally, but when it encounters a tag with timestamp 0 it would simply stop. So if we adjust the timestamp to continue from the last segment it should be fine, unless the H264/AAC timestamps also starts at 0, in which case we may have a problem. I haven't looked at specifics for ffmpeg, but it might be possible to tell ffmpeg to avoid re-encoding by copying the existing data and simply rewrite the FLV container, much like the approach I was thinking of implementing in Livestreamer. But in a worst case scenario it would have to re-encode it. |
I really like the VOD support for twitch.tv. However, sometimes VODs are multiple hours long. Is it somehow possible to start streaming at a specific time? Can this be encoded by the URL like explained in http://twitchtv.wordpress.com/2011/10/24/new-functionality-link-to-a-specific-time-in-a-vod/ or maybe as a command line parameter? I would love this functionality! |
The format described in this blog post is now implemented as of 2194206. |
Awesome, works like a charm! Thanks a lot! |
All the vod links here don't work (except the first few ones): Probably since the params are all in hours, like: |
I kept converting hours to minutes and add them together, but I didn't knew that the API also supports hours. |
I added support for hours a couple of weeks ago (009360f) and will be available in the next release. |
Excellent work! Love the fast response. Absolutely love livestreamer, infinitely better than the SLOW loading twitch player that randomly buffers for no reason. |
Hi. It seems that "time feature" doesn't work everytime, some videos always start at the beginning. For example it doesn't work on "Past broadcast videos" here: Can it be fixed or are these just broken videos? |
I'm also having trouble getting the time parameter to work with "past broadcasts". Here's the video that I tried this on. It always starts at the beginning. |
Yeah, it is still not working for me at most videos, even with latest realese. |
Twitch uses two different systems for VODs. One is HLS based and the other one is Flash based. While you should be able to use the time parameter on the Flash based VODs it will not work on the HLS based one because Livestreamer does currently not support HLS seeking. |
Ok thank you for this information, because this issue is very annoying... :( |
As a workaround, I've found that you can use the player-passthrough parameter with MPC-HC and then you're able to seek the video in the player. I couldn't get it to work with VLC though.
|
@aleksijuvani It is not working for me. Video still starts always at the beginning, no matter if I use VLC or MPC-HC. BTW you didn't add time stomp to the link in your code. |
Oh, it'll still start at the beginning, but I was able to seek to the middle of the video with that bar at the bottom. The timestamp is not needed when using this method. I'm using version 1.7.8 (6fcba1b) of MPC-HC. Maybe it doesn't work on older versions? Oh, and I think the video has to use the newer HLS format for this to work. |
Oh, right, I didn't notice. It's working, for my video at least, thanks :) |
Seeking in VODs using hls passthrough also works in VLC 2.2.0 on Linux, but there are no time stamps. The current and end time just say "00:00:00". |
I'm getting the same issue. No timestamps on VLC, and adding the timestamp to the video url still makes it start at beginning. |
Are there any updates on VLC timestamp issue? Player-passthrough parameter works for enabling seeking, but still no exact time |
Hi!
I am wondering if it could be possible to extend the justin.tv plugin to also support archived videos that have urls like
http://nl.twitch.tv/jeffroiscool/b/299079587
The important part is the 299079587 video id. This ID can be used with the twitch.tv api to obtain the video url by, e.g.,
http://api.justin.tv/api/clip/show/299079587.xml
(see http://www.fakegaming.eu/TwitchTV/source/download.txt / http://www.fakegaming.eu/TwitchTV/download.php for a php implementation). Perhaps there is also another way to do this using some established livestreamer features. I primarily want to use it to automatically download archived videos to watch them, e.g., on my mobile phone.
The text was updated successfully, but these errors were encountered: