Tiny Core Linux
Off-Topic => Off-Topic - Tiny Core Lounge => Topic started by: vinceASPECT on January 08, 2018, 07:04:45 PM
-
Hello,
does anybody know the command that both shows all of the file types
available for a particular youtube movie link......and then can also show the url
of any of the listed file type option(s) that you choose....(not to actually download it)....
i can't quite get it.......i know "g" is somehow related to the url's
thx
V
-
youtube-dl --list-formats "$URL"
youtube-dl -g --cookies /tmp/ytcookie --format 22 "$URL"
If it doesn't work I can post the script I made to automate this. Might be a little messy though.
-
yes thankyou...i figured out an approach
youtube-dl -f 17 -g (then the youtube movie link here)
this above just shows me the URL the file type assigned the listing number of 17 from a list of
about 19 different file types......
it's unusual becausae the list numbering has no real meaning.....so the positions that interest
me are 17 and 251
the listing just has no meaning or logical counting
eg (list below)
340--- some file type
26 -----some file type
----
---
----
---
290 ----some file type
---
---
215......mp4 360 file type
----
----
17 .......3gp 144 file type
----
-----
there are about 19 list entries in total
V
-
Yep. Numbers.
Maybe the attached script is useful for you in some way. ;)
-
uh....yeah. -----i also tried to play live youtube videos in mplayer. First off i used youtube-dl with the live movie link and it listed some possible feeds. I grabbed one of the feeds (93) and it then showed me the "DOTmu8" styled link for that feed.
Mplayer only played that video feed link for 10 secs then sputtered out a "can't reverse seek in a stream" error. I tried many switches like -cache etc but there was no improvement.......does anybody know how to solve that error pls?l
Played great for 10 secs....
-
I don't know why it stops for you after 10 seconds.
I use that script pretty much every day to stream videos via smplayer. I made it due to laziness, in a non-lazy moment, so I don't have to remember the CLI options for video quality etc.
If it doesn't error out after 10 seconds when you use that script, instead of directly running mplayer with the content URL, you might be able to reproduce what the script does by checking which options are shipped over to mplayer.
I believe the --cookie option is kind of important also.
-
ahh Misalf...but are the movies you watch "live" streams from youtube?......youtube has an option called "live".
but anyhow, i have had a nightmare confirming with the BBC broadcasting corporation in the uk.......... about what types of youtube LIVE videos i am allowed to watch without a TV licence......there are some we can watch and some we can't...
V
-
Sorry, no idea if live streams would work. My limited bandwidth wouldn't suffice.
I usually stream short videos in very low quality for informational purposes only.
-
well, it's nothing to do with bandwidth since the live streams are available in the same formats as any youtube "previously recorded video" (any regular youtube video) on their site
it's the Protocol that is different. Live streams use a different protocol which mplayer doesn't quite like...infact Vlc does not like it either...
apparently only MPV can do live YT streaming. (a fork) but it's unclear if even mpv now works since youtube regularly changes it's code
I know that the only way to watch LIVE youtube videos within googles supposed remit (so to speak) is to use chrome browser and it needs to be a very recent edition....(some derivates of chrome may work....maybe Slimjet etc) but not many......FF may work..
V
-
Is it possible to pipe youtube-dl output to mplayer? That I can watch video on-the-fly instead waiting until download end?
-
AFAIK you can read the file as it is being written!
did you try just opening the file as it is down loading ? ...
-
AFAIK you can read the file as it is being written!
did you try just opening the file as it is down loading ? ...
This is possible but not comfortable with very big and long videos.
-
I think you can get youtube-dl to just print the video url, which you can then access with mplayer.
-
I was thinking , youtube-dl is to download a video for watching thru a video player ! :)
1) If the only purpose of OP is to view streaming videos,then this may be helpful ( prvsly read from net , not used ):
... Livestreamer is a Command Line Interface that pipes video streams from various services into a video player, such as VLC, Mplayer. The main purpose of Livestreamer is to allow the user to avoid buggy and CPU heavy flash plugins but still be able to enjoy various streamed content.
livestreamer twitch.tv/day9tv
2) Some intersting links :
http://freesoftwaremagazine.com/articles/youtube_and_gnu_linux_download_and_convert_videos_easy_way
https://www.linuxlinks.com/youtube-dl-download-video-audio-files-streaming-sites
-
Hi
Neonix.....i assume you did read the start of this whole thread....?
The answer to your later question is as Curaga stated to you.....youtube-dl will give you just the "viewable" URL address to any video......from any youtube video link you give youtube-dl
You then just paste that address into any media player and it will Stream and play the video. It's not downloading it.....as such.
so
a) .............$youtube-dl (Some youtube video link) -F
.......that command above typed into your command prompt will show you all the LINKS for the particular youtube video link you gave it.
Then, for example below
b) ..............$youtube-dl -f 17 -g (same youtube video link)
.....That command above in (b) will give you the URL of a particular FILE FORMAT (option 17) of the youtube video link you gave to youtube-dl.......it's an option you chose (17) from your listings results after executing command a) above
Then
c) ...............You take that LONG URL LINK result from (b) and copy and paste it into the OPEN URL option of any media player like mplayer and the video will STREAM and play. It isn't really downloading the video file, it;s streaming it.
-------------------------------------------------------
This stuff above is not true for ALL youtube videos. As the thread mentions, it's harder to playback LIVE youtube videos in media players.....but standard stuff works ok
thx
Vin
-
Thank you everyone for help.
Because mplayer doesn't support https protocol I have to create this simply script that sends url to wget and then to mplayer.
usage: yt https://www.youtube.com/watch?v=2OnAOaTnMT8
#!/bin/sh
tce-load -iw ca-certificates
tce-load -iw wget
tce-load -iw python
rm /home/tc/1.txt
youtube-dl -f 18 -g "$1" > /home/tc/1.txt
url=`cat /home/tc/1.txt`
wget --no-check-certificate $url -O - | mplayer -
If you want to watch youtube live streams with m3u8 protocol (HTTP Live Streaming) you have to use vlc3 because only it supports https. MPlayer 1.3 support m3u8 but without https.
-
Hello
Neonix.i have got absolutely no idea what your talking about .....the post i made (reply 14) prior to your last reply 15 ... that 14 reply works perfectly with mplayer youtube videos in both win32 and Linux.
Your comments in 15 about mplayer not doing https protocols are.....total garbage.
Your script may or may not work but i DO know that wget does indeed have issues with https.
The mplayer command to play a stream from my earlier instructional post 14 .......can be as follows below
$mplayer -vo directx -zoom -really-quiet -aspect 16:9 "Large Video Link as described in my earlier instructional post 14"
examples below........
$mplayer -vo directx -zoom -really-quiet -aspect 16:9 "https://r3---sn-aigs6n7y.googlevideo.com/videoplayback?ip=86.187.171.246&key=yt6&lmt=1493499359128513&dur=523.749&expire=1548293772&id=o-AO_ZBCOw6eiwRAFa88BNByMOWHcWFMB16DPXKdVi63rF&source=youtube&initcwndbps=812500&fvip=3&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&clen=16246435&ipbits=0&signature=BDF56C5D22751CC2B824F26F6A9C8EFF0B8C9372.2B3E1AF7FA1BC86AEFA207AB0019410D201C1F46&itag=18&pl=16&mime=video%2Fmp4&c=WEB&mm=31%2C29&mn=sn-aigs6n7y%2Csn-aigl6ney&gir=yes&ratebypass=yes&requiressl=yes&mt=1548272095&mv=m&ei=LMJIXMeEDIOuVc3yhsgE&ms=au%2Crdu"
OR SAY......
$mplayer -vo sdl -zoom -really-quiet -aspect 16:9 "https://r3---sn-aigs6n7y.googlevideo.com/videoplayback?ip=86.187.171.246&key=yt6&lmt=1493499359128513&dur=523.749&expire=1548293772&id=o-AO_ZBCOw6eiwRAFa88BNByMOWHcWFMB16DPXKdVi63rF&source=youtube&initcwndbps=812500&fvip=3&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&clen=16246435&ipbits=0&signature=BDF56C5D22751CC2B824F26F6A9C8EFF0B8C9372.2B3E1AF7FA1BC86AEFA207AB0019410D201C1F46&itag=18&pl=16&mime=video%2Fmp4&c=WEB&mm=31%2C29&mn=sn-aigs6n7y%2Csn-aigl6ney&gir=yes&ratebypass=yes&requiressl=yes&mt=1548272095&mv=m&ei=LMJIXMeEDIOuVc3yhsgE&ms=au%2Crdu"
and you press "F" to flip between full screen or not.
These methods above play the youtube video in any quality on any media player on any platform.
This post here (16) is nothing concerning live youtube streams just regular youtube videos.
thx
Vin
-
Yes
if anybody is interested also......i figured a way to play LIVE youtube video streams in mplayer.
You need the very latest youtube-dl version and you give it the live youtube link and it will list live stream URL otions as a result. So as below......
a) ...............$youtube-dl (live youtube video link here) -F [enter]
b) then use a command with any of the options (93) from the results of a) above to get the true link as below
...................$youtube-dl -f 93 -g (the same live youtube video link here) [enter]
c) part b) above gives you a new URL ending in DOTm3u8.........then just past that URL into mplayer as below here in d)
d)...............$mplayer -vo gl -zoom -aspect 16:9 -cache 4096 -xy 184 -noborder -really-quiet -ontop "THE LONG VIDEO M3U8 URL LINK HERE" [enter]
The live youtube video will play in mplayer.
---------------------------------------------------------
You can choose what XY size of video screen you want.......and if your PC is good you can flip between fullscreen by pressing "F"............otherwise you can start again from scratch and put the -fs switch into your mplayer arguments list to get instant fullscreen (it should work)
These DOTm3u8 video links should also open in VLC and Kodi etc. Kodi requires that you paste the link into a text file and save as say Video.m3u. Then in kodi you navigate to that FILE and open it.....it will stream the live video.
example below
...............$mplayer -vo gl -zoom -aspect 16:9 -cache 4096 -xy 184 -noborder -really-quiet -ontop "https://manifest.googlevideo.com/api/manifest/hls_playlist/id/R6vzE0yBfKk.0/itag/93/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/cmbypass/yes/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D134/hls_chunk_host/r5---sn-aigzrn7l.googlevideo.com/ei/UedIXL-SMJKOVPn9tcAI/playlist_type/DVR/gcr/gb/initcwndbps/5830/mm/32/mn/sn-aigzrn7l/ms/lv/mv/m/pl/16/dover/11/keepalive/yes/manifest_duration/30/playlist_duration/30/mt/1548281550/disable_polymer/true/ip/86.187.170.30/ipbits/0/expire/1548303281/sparams/ip,ipbits,expire,id,itag,source,requiressl,ratebypass,live,cmbypass,goi,sgoap,sgovp,hls_chunk_host,ei,playlist_type,gcr,initcwndbps,mm,mn,ms,mv,pl/signature/89E65150D22CE6CE45F3284B7B74C311BA6C6CF8.2EC0DCAC4B9F3F4E14B1B2E3E98F2876E9130D10/key/dg_yt0/playlist/index.m3u8"
Thx
Vin
-
Hello
Neonix.i have got absolutely no idea what your talking about .....the post i made (reply 14) prior to your last reply 15 ... that 14 reply works perfectly with mplayer youtube videos in both win32 and Linux.
Your comments in 15 about mplayer not doing https protocols are.....total garbage.
Your script may or may not work but i DO know that wget does indeed have issues with https.
Hi Vin
I assume you are a Windows user. But in Linux (TC8) when I use https url with Mplayer 1.3 I got
https protocol not found, recompile FFmpeg with openssl, gnutls,
or securetransport enabled.
Is there a way to compile latest Mplayer with https support?
-
which mplayer extension are you using?
-
mplayer updated to 1.3.0 as mplayer-cli and mplayer (gtk2) added
..seems to work with youtube-dl https links
-
Yes Neonix, i sincerely appologise and it's as Juanito stated.......i am talking from the standpoint of win x64 mplayer.
It's strange since it all works fine on win x64. mplayer.
I always assumed things like mplayer were actually ahead of the game in Linux OS'a....not several versions behind other OS's. So i simply stated it worked in Linux because i assumed it would.
It seems Juanito has now upgraded the TCL mplayer with the required https support so that all of my earlier posts (14,16 etc) should now work ok on TCL mplayer.
I hope it works for sure. Since mplayer is so lightweight for dealing with youtube and lots of other media.
Neonix, i am sure your script can be modded slightly since TCL mplayer has now been upgraded.
I also messed around with different feed quality's when doing LIVE youtube links. VLC certainly does play them back without issue.....and mplayer does. I don't know if TCL's vlc version would do it but i tend to just stay with mplayer anyhow.
thx
Vin
-
mplayer updated to 1.3.0 as mplayer-cli and mplayer (gtk2) added
..seems to work with youtube-dl https links
I tested it in TC 9 x86 and TC 10 x86 and still get the same error:
https protocol not found, recompile FFmpeg with openssl, gnutls,
or securetransport enabled.
Did you install gnutls-dev before compilation?
-
Since it worked for me, could you supply an https link that doesn’t work?
-
Since it worked for me, could you supply an https link that doesn’t work?
Tested in TC9 x86 with mplayer-cli.tcz
https://trtcanlitv-lh.akamaihd.net/i/TRTWORLD_1@321783/master.m3u8
https://dwstream4-lh.akamaihd.net/i/dwstream4_live@131329/master.m3u8
More links here:
https://github.com/notanewbie/LegalStream/blob/master/packages/news/world.m3u8
-
I see the error now - I also see this:
libavformat version 57.83.100 (external)
Mismatching header version 57.25.100
..perhaps there is a problem with using the system ffmpeg rather than mplayer's internal version.
I'll take a look.
-
Ah - here was the problem:
[--enable-openssl is incompatible with the gpl and --enable-nonfree is not specified]
gnutls(3.6) used instead and ffmpeg3 re-posted
-
Thank you Juanito for help. Now https links works and Tinycore has up to date software.
I would like to also add some comments.
1) mplayer-cli dependencies have 100 MB. Mplayer with internal ffmpeg would have only 16 MB or even less using upx.
2) I found that "due to conflicting MPlayer and OpenSSL licenses the
resulting binary may be non-distributable"
3) mplayer.tcz.info shows version 1.1.1 instead 1.3.0
4) mplayer volume control don't work in my computer. PCM value is changing but sound is still at the same level.
5) m3u8 protocol streams signal in packets, and it creates freezes. As I read it was ffmpeg fault not mplayer, but I think in latest mplayer snapshot, it was fixed (with internal ffmpeg).
http://lists.mplayerhq.hu/pipermail/mplayer-users/2013-September/086606.html
6) What is also interesting some servers may be not compatible with gnutls. This means that mplayer may not work with all https links.
-
mplayer-cli dependencies have 100 MB. Mplayer with internal ffmpeg would have only 16 MB or even less using upx.
If you'd like to take over the maintenance of mplayer-cli with a view to reducing the total size of the extension including recursive deps, but maintaining functionality, please go ahead.
I found that "due to conflicting MPlayer and OpenSSL licenses the
resulting binary may be non-distributable"
Neither mplayer nor ffmpeg have openssl as a dep
mplayer.tcz.info shows version 1.1.1 instead 1.3.0
Fixed - thanks
mplayer volume control don't work in my computer. PCM value is changing but sound is still at the same level
The mplayer volume control works for me with both alsa and pulseaudio
-
i find a great lightweight youtube web site.
https://invidio.us/watch?v=zMZq3tiP53c
https://toogl.es/#/view/x45vtw9JU6I
no javascript etc............
it can also play "live" feeds........i don't think it allows entry of comments.....but seems pretty functional
thx
Vin
-
Thank you vinceASPECT. Now we have 2 sites that works with Dillo.
https://invidio.us/
https://tubidy.io/
https://toogl.es and https://www.genyt.net doesn't work with Dillo.
This is cool that you can watch yt 3gp videos even on Pentium 200 mhz and 128 MB RAM without HDD. Thanks to TC and mplayer.
-
Yes.
invidio.us .........also works on "Links browser" and maybe elinks too. You can.....
search any video topic,
then click on a particular video
then click on the download file type and select one
then cilck download
and then select to DISPLAY the download
then from the resulting page........... select from the Links menu "copy current URL"
Then you can open that video URL in some player... (mplayer etc)
you can do that for the smallest Video and Sound qualities..........and open them in a DUAL URL input player
such as MPC
MPC can open two URL's in tandem......one for video and one for sound (synced up)
i believe Mplayer can also open multiple URLS in synced tandem.
----------------------------------------------------------------
As for invidio.us on a somewhat regular web browser..........you go into invidio.us preferences and select
DASH
Then when you choose to watch a video you can choose the 144p quality........i believe you are then getting the smallest possible video file and also the smallest possible Audio file together. (in the browser player)
THis is UNLIKE the youtube web page....... where when you select 144 it's actually giving you the second smallest 144p file and quite a large audio file with it.
You can check by seeing the FEED ID's in "stats for nerds" on youtube.com for some movie............. and comparing it to the available feeds list from youtube-dl (for that same movie file)
Vin
-
Yes. With regard to that website invidio.us
it may even play the videos directly in TCL Opera 9 browser.
Or at least, you may be able to "right click" the video window and select "play" or "copy link" and then open it in mplayer.
You can certainly copy the video's download links (offered) and stream them in some media player.
I usually choose the lowest file size. 144p mp4.....and the lowest sized audio..........
audio/webm 56k or 64k.
If you so desire you can just click the "speaker icon" that is below the video and then it will just play the audio of the movie. Useful.
Thx
V
-
for anbody running old mplayer systems and Laptops etc....who are using third party reflector sites such as
https://invidio.us OR https://www.tonvid.com
you can use these websites in fairly old tiny web browsers .........such as LINKS graphics mode...... or LINKS without graphics
You can set the tonvid search to DATE priorty or VIEWS and you get the exact same results
as the youtube webpage search. You can then right click any displayed result to get it's youtube link and paste that into invidio.us search bar. That reveals the video of your choice. So those mechanisms are identical to a youtube webpage search.
Inside the invidio.us webpage...you can then select your lowest quality video feed like 144 mp4 and the lowest audio feed like AUDO/WEBM 52K opus...... and click "download" for each..... then click "display" for each..... and then click at the menu bar above for "copy current URL" for each.....
Take those URL's along with mplayer....as below
mplayer -vo X11 -zoom -cache 4192 -really-quiet -autosync 0 "the video file link" -audiofile "the audio file link"
Double clicking mplayer GUI or pressing "F" will toggle fullscreen and the "-aspect" flag will get you what you need if you need to alter it.
Either 4:3 or 16:9 (-aspect 16:9)
this gives you the most economical way to watch a youtube video in comparison to the actual
youtube web page of that same video........ which would use about 6 times more data.
You hardly see or here any real difference in quality here.
So you get 6 videos for the price of 1......really. (data)
If you just want to listen to music.....just do the above for AUDIO only. That is also very economical on data.
Peoples milage may vary depending upon which tiny web browser you are using (dillo) or whatever.
it's just a way to open 2 simultaneous mplayer streams AT THE SAME TIME and play them in sync.
Video and Audio.
thx
Vin
-
with regard to the last post
when using the LINKS--non--graphical web browser........and after following the first step above of DISPLAYING a url
i think you then just pres SHIFT+G and also press CTRL+B
which will put the displayed url into clipboard
and then you can just paste the URL into mplayer..... using a middle mouse click........ or CTRL+V or Right-Click paste
-
Addendum
Also with ........LINKS--non--graphical........... web browser......
To copy the selected Link to clipboard it's
CTRL+G then CTRL+B
hope that helps anybody who is using very old hardware to do Youtube with a TEXT ONLY web browser.
thx
Vin
-
Thank you vinceASPECT. I was not aware that mplayer can play audio and video files simultaneously. I created simple script to make it even easier.
#!/bin/sh
mplayer -really-quiet -autosync 0 "$1" -audiofile "$2"
Here is a site where you can download files from Dailymotion, Vimeo, FB, TW, Vine, Aol Video, Rumble,com, Upstream.
http://savevideo.me/ (works even with Dillo 3.0.5)
-
Right...........thanks neo...
always handy to keep things to a minimum on a long term basis.
i will try it
Thanks
V
-
Also there is this lite youtube reflector
https://hooktube.com/
seems useful
thanks
Vin
-
Another site for youtube http://www.convertinmp4.com
It don't require javascript, and offer only 360p and 720p mp4.
-
Hello,
well thanks
That is something actually needed......yeah .....
i think with live TV (system to system) and Satellite......they call it
transcoding........Live.
Well.....converting.. ... ...
being resourceful maybe
Thx
v
-
This site https://video.genyt.net/Yjv06RjL4ng works with Dillo 3.1-dev and Opera 12.16.
-
hello,
i wonder if anybody can share a method by which they can enhance the commands below so that it results in one single command that can play 2 simultaneous feeds from youtube-dl into a single mplayer instance. (audio feed + video feed)
if you know how , please could you publish it here?...thanks.
essentially therefor , a method, where-by, youtube-dl can simultaneously open and stream 2 different feeds into a single mplayer instance.
---------------------------------------------------------
so, the example command below shows how mplayer can deal with 2 different simultaneous feeds.
(a)
mplayer -vo x11 -zoom -really-quite -autosync 0 "the video link" -audiofile "the audio link"
--------------------------------------------------------
the command below shows youtube-dl grabbing ONE feed and streaming it to mplayer.....how do we make it grab TWO different feeds & stream them into the single mplayer instance in the command (a) above.....?
(b)
youtube-dl -f 160 -o - "the youtube video link" | mplayer -
(this command in (b) is an example command & it is visible when you install "get_youtube-dl.tcz" and execute the script "get_latest_youtube-dl.sh" .....)
so for example, how do we simultaneously grab feeds 160 and 249 from youtube-dl....... and stream them into the single mplayer command in (a) above?
it does not absolutely have to be one single command as the goal.
It could be two commands in sequence, one after the other.
thanks
v
-
Hi, vinceASPECT!
Thanks for the useful reciepts. By the way, what youtube-dl version are You using? As You know youtube-dl repos and mirrors where shut down recently. Mine is 2020.09.20.
Ha a nice Core!
-
hello,
um....the same version as you.
i did not know it was shut down.....hmmm
thanks
v