Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > Video stream recording
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 01-18-2013, 01:09 PM
MKANET MKANET is offline
Junior Member
 
Join Date: Jan 2013
Posts: 27
MKANET is on a distinguished road
Arrow

How to dump youtube live TV stream to file using commandline?


I only know of only two ways to download a live youtube video:

The first way is using the full youtube URL using packet sniffing. This provides me a ridiculously long URL; which only works one or two times before I get a ERROR 403: Forbidden response.

For example:
Code:
wget.exe -O "C:\liveTV-flv http://r7---sn-nx57yn7r.c.youtube.com/liveplay?algorithm=throttle-factor&burst=40&cp=U0hUTVVQVl9HTENONF9NSlpHOldPTUFUX2ZQdzNt&expire=1358558622&factor=1.25&fexp=909711%2C916613%2C920704%2C912806%2C922403%2C922405%2C929901%2C913605%2C925710%2C929104%2C929110%2C908493%2C920201%2C913302%2C919009%2C911116%2C926403%2C910221%2C901451&id=L7ird1HeEjw&ip=XXX.XXX.XXX.XXX&ipbits=8&itag=34&key=yt1&ms=nxu&mt=1358534109&mv=m&newshard=yes&ns=yt-live&signature=AF2D5423930D9DF2FD214BD5DFE8B2201049FBB6.376F4E9ED9D70050FA2E1447994FB7FF47CB1B44&source=youtube&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cid%2Cip%2Cipbits%2Citag%2Cns%2Csource%2Cupn%2Cexpire&sver=3&upn=PWDvz8C-i_w&cpn=9xjxhbO0_V_Q4bat&begin=Infinity&ptk=youtube_none"

The next way is using youtube-dl (python script). This way is very reliable and easy:

For example:
Code:
youtube-dl.exe --no-part --max-quality 22 -o C:\liveTV.flv http://www.youtube.com/watch?feature=player_embedded&v=L7ird1HeEjw
This allows me to use the share URL youtube provides. Unfortunately, this method starts to download the video starting from when the live TV event first began, instead of the current time of the live event. I dont know how to specify to download starting from current live broadcast time.

I was hoping someone could help me figure out the a consistent way to download this live TV stream starting from current time.
Reply With Quote
  #2  
Old 01-18-2013, 03:55 PM
chap chap is offline
Senior Member
 
Join Date: Feb 2011
Location: Ukraine
Posts: 1,165
chap is on a distinguished road
Default

Re: How to dump youtube live TV stream to file using commandline?


try use
Code:
ffmpeg -i "http://www.youtube.com/api/manifest/hls/ns/yt-live/id/L7ird1HeEjw?ipbits=0&fexp=912806,922403,922405,929901,913605,925710,929104,929110,908493,920201,913302,919009,911116,910221,901451&ip=0.0.0.0&upn=9YCCj1LKFtA&sver=3&expire=1358569422&key=yt1&signature=5D978FEC838B33DC408C808994FD9BF942093ACF.508D9B2317448210736636866F47802ABAD13B27&sparams=id,ip,ipbits,ns,expire&file=index.m3u8" -c copy t.ts
Reply With Quote
  #3  
Old 01-18-2013, 04:42 PM
MKANET MKANET is offline
Junior Member
 
Join Date: Jan 2013
Posts: 27
MKANET is on a distinguished road
Default

Re: How to dump youtube live TV stream to file using commandline?


Hi Chap, thank you so much for your help. I am able to use that URL. I have a question:

1. Is there a tutorial (or commandline app) which explains how to convert URLs like my original URL to a dependable URL? I prefer to learn to do this myself so I dont bother you for each URL

Sincerely,
MKANET

Last edited by MKANET : 01-18-2013 at 05:18 PM.
Reply With Quote
  #4  
Old 01-18-2013, 06:21 PM
chap chap is offline
Senior Member
 
Join Date: Feb 2011
Location: Ukraine
Posts: 1,165
chap is on a distinguished road
Default

Re: How to dump youtube live TV stream to file using commandline?


open(user agent=ipad)
Code:
http://m.youtube.com/watch?ajax=1&desktop_uri=/watch?feature=player_embedded&v=L7ird1HeEjw&feature=player_embedded&gl=RU&layout=mobile&tsp=1&utcoffset=120&v=L7ird1HeEjw&preq=
try use alternative
Code:
http://svnpenn.github.com/bm/
Reply With Quote
  #5  
Old 01-19-2013, 12:24 AM
MKANET MKANET is offline
Junior Member
 
Join Date: Jan 2013
Posts: 27
MKANET is on a distinguished road
Default

Re: How to dump youtube live TV stream to file using commandline?


I think maybe I didn't explain correctly originally; or, there is a miscommunication. I have always been able to get a full URL to download a youtube video using packet sniffer apps. The problem is it doesnt work for more than a few times before I get a HTTP error 403 Forbidden error message. It seems like the URL you provided (below) has already stopped working.

I am actually looking for a reliable/consistent way to download the stream (starting at the current live TV position).

The closest I can get is when using the youtube-dl python script that I've already been using; except it seems like its meant for non-live TV videos (starts download from when the live TV stream first started to broadcast instead of "current" broadcast live TV position in the web browser.


Quote:
Originally Posted by chap View Post
try use
Code:
ffmpeg -i "http://www.youtube.com/api/manifest/hls/ns/yt-live/id/L7ird1HeEjw?ipbits=0&fexp=912806,922403,922405,929901,913605,925710,929104,929110,908493,920201,913302,919009,911116,910221,901451&ip=0.0.0.0&upn=9YCCj1LKFtA&sver=3&expire=1358569422&key=yt1&signature=5D978FEC838B33DC408C808994FD9BF942093ACF.508D9B2317448210736636866F47802ABAD13B27&sparams=id,ip,ipbits,ns,expire&file=index.m3u8" -c copy t.ts
Reply With Quote
  #6  
Old 01-19-2013, 01:04 AM
chap chap is offline
Senior Member
 
Join Date: Feb 2011
Location: Ukraine
Posts: 1,165
chap is on a distinguished road
Default

Re: How to dump youtube live TV stream to file using commandline?


simple use
Code:
http://svnpenn.github.com/bm/
Reply With Quote
  #7  
Old 01-19-2013, 12:24 PM
MKANET MKANET is offline
Junior Member
 
Join Date: Jan 2013
Posts: 27
MKANET is on a distinguished road
Default

Re: How to dump youtube live TV stream to file using commandline?


Yes, I tried both suggestions the first time you mentioned it. Unfortunately, it produces a URL that can only be used a few times. If I try to use it again, for example, the next day. The stream is no longer accessible using the URL produced by the below bookmarklet ...getting a HTTP error 403 Forbidden error message. It doesnt seem to be any better than the URLS I get via a protocol analyzer. The only way I can consistently get the stream is via youtube-dl; its unfortunately not really meant for live TV streams. Maybe there's something I'm missing?

Quote:
Originally Posted by chap View Post
simple use
Code:
http://svnpenn.github.com/bm/

Last edited by MKANET : 01-19-2013 at 04:06 PM.
Reply With Quote
  #8  
Old 01-20-2013, 12:06 AM
MKANET MKANET is offline
Junior Member
 
Join Date: Jan 2013
Posts: 27
MKANET is on a distinguished road
Default

Re: How to dump youtube live TV stream to file using commandline?


I wish there was a way to explain what I'm try to do more clearly.

It looks like Youtube.com is smart enough to not allow a static URL to access a video stream file more than a couple of times. Otherwise, it would be too easy. Im sure the URL would change pretty quicky. So, it doesnt even seem feasible to expect some kind of magic URL pointing to the every time. If there is, I haven't found a way to do that yet.

I am hoping someone was able to make a Windows command-line tool which can convert friendly short youtube URLs to a "direct" long URL to the file. Basically what the bookmarket above does, except in a self contained command-line app.

If there as a command-line converter that converted URLs like this:
http://www.youtube.com/watch?v=6QRKvM27Gxc

to

http://r16---sn-p5q7ynee.c.youtube.c...4DE5B4DF40314D

That would be great! Hopefully, Im not the only person who wants to do something like this.
Reply With Quote
  #9  
Old 09-29-2013, 04:08 AM
REACH REACH is offline
Junior Member
 
Join Date: Sep 2013
Posts: 2
REACH is on a distinguished road
Default

Re: How to dump youtube live TV stream to file using commandline?


Thanks
Reply With Quote
Reply Post New Thread
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 01:41 PM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons