Looking for audio-only YouTube player (Solved)

Using applications, configuring, problems
Post Reply
Message
Author
enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

Looking for audio-only YouTube player (Solved)

#1 Post by enrique »

I wonder if any of Puppy radio can listen Nasa or SpaceX Audio.

I am trying to keep informed but lowering my bandwidth.
Just for reference if I select video at 240 my bandwith use is at 28-33 kbs

Code: Select all

youtube-viewer --resolution=240 https://www.youtube.com/watch?v=bIZsnKGV8TE
So do you know how to listen just to Audio? Thanks in advance

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#2 Post by enrique »

Could not find info on web.

So after many test this is Best I have come up.

1) Get your address:

Code: Select all

NASA Live: Official Stream of NASA TV
https://www.youtube.com/watch?v=21X5lGlDOfg
2) Get Available formats

Code: Select all

root@live:/mnt/sda7/nasa# youtube-dl -F 21X5lGlDOfg
[youtube] 21X5lGlDOfg: Downloading webpage
[youtube] 21X5lGlDOfg: Downloading m3u8 information
[youtube] 21X5lGlDOfg: Downloading MPD manifest
[info] Available formats for 21X5lGlDOfg:
format code  extension  resolution note
91           mp4        256x144    HLS  197k , avc1.42c00b, 30.0fps, mp4a.40.5@ 48k
92           mp4        426x240    HLS  338k , avc1.4d4015, 30.0fps, mp4a.40.5@ 48k
93           mp4        640x360    HLS  829k , avc1.4d401e, 30.0fps, mp4a.40.2@128k
94           mp4        854x480    HLS 1380k , avc1.4d401f, 30.0fps, mp4a.40.2@128k
300          mp4        1280x720   3806k , avc1.4d4020, 60.0fps, mp4a.40.2 (best)
See lowest is 91 in this case

3)Listen thru mpv

Code: Select all

mpv --ytdl --ytdl-format=91 https://www.youtube.com/watch?v=21X5lGlDOfg
Notice this is Video no Audio. But Video can go lower that Audio. As Audio channels seems to be set up to maximum resolution. What a piece of crap. I wonder if I can pretend to be an Android at youtube. And if then it may provide lower quality. That is next test.

In any case My bandwidth just go to: 16-23.5 KiB k/s hope it helps others.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#3 Post by Semme »

>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#4 Post by nic007 »

enrique wrote:Could not find info on web.

So after many test this is Best I have come up.

1) Get your address:

Code: Select all

NASA Live: Official Stream of NASA TV
https://www.youtube.com/watch?v=21X5lGlDOfg
2) Get Available formats

Code: Select all

root@live:/mnt/sda7/nasa# youtube-dl -F 21X5lGlDOfg
[youtube] 21X5lGlDOfg: Downloading webpage
[youtube] 21X5lGlDOfg: Downloading m3u8 information
[youtube] 21X5lGlDOfg: Downloading MPD manifest
[info] Available formats for 21X5lGlDOfg:
format code  extension  resolution note
91           mp4        256x144    HLS  197k , avc1.42c00b, 30.0fps, mp4a.40.5@ 48k
92           mp4        426x240    HLS  338k , avc1.4d4015, 30.0fps, mp4a.40.5@ 48k
93           mp4        640x360    HLS  829k , avc1.4d401e, 30.0fps, mp4a.40.2@128k
94           mp4        854x480    HLS 1380k , avc1.4d401f, 30.0fps, mp4a.40.2@128k
300          mp4        1280x720   3806k , avc1.4d4020, 60.0fps, mp4a.40.2 (best)
See lowest is 91 in this case

3)Listen thru mpv

Code: Select all

mpv --ytdl --ytdl-format=91 https://www.youtube.com/watch?v=21X5lGlDOfg
Notice this is Video no Audio. But Video can go lower that Audio. As Audio channels seems to be set up to maximum resolution. What a piece of crap. I wonder if I can pretend to be an Android at youtube. And if then it may provide lower quality. That is next test.

In any case My bandwidth just go to: 16-23.5 KiB k/s hope it helps others.
According to that print out the lowest audio quality is 48Kbps. That is normally also the lowest for mp4a (aac) on youtube. Webm audio lowest on youtube is normally 40Kbps (ogg), I think. Video will most likely never be lower than audio on youtube. You can see there that the lowest video bitrate for video is 197K ( for 144P quality, the lowest).

memo
Posts: 268
Joined: Thu 28 Jun 2018, 10:38

#5 Post by memo »

thanks for the link semme, it is pretty interesting. I have installed it from the PPM , but I couldnot get it to work properly , I followed the instruction but it keep return no results

Here is a screenshot

http://imgur.com/5VFwV5ml.png
Xanialpup 7.5 32 bit

memo
Posts: 268
Joined: Thu 28 Jun 2018, 10:38

Re: Nasa&SpaceX Audio

#6 Post by memo »

enrique wrote:I wonder if any of Puppy radio can listen Nasa or SpaceX Audio.


hi enrique; So do you know how to listen just to Audio? Thanks in advance
I have found some information about SMTUBE, maybe it is helpful.

screenshot;

http://imgur.com/wFZP93wl.png
Last edited by memo on Sun 31 May 2020, 14:39, edited 1 time in total.
Xanialpup 7.5 32 bit

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#7 Post by enrique »

nic007

I am sorry if I confuse you guys. See I seen too many numbers. I take note of them but at the end I ONLY go for what conky reports.

Now as You see Youtube have no AUDIO ONLY feed.
That I know there is no way to tell youtube to transmit ONLY the audio part of the feed.


The audio I spoke before is

Code: Select all

youtube-dl -F https://www.twitch.tv/nasa
[twitch:stream] nasa: Downloading stream JSON
[twitch:stream] nasa: Downloading channel access token
[twitch:stream] nasa: Downloading m3u8 information
[info] Available formats for 38378971632:
format code    extension  resolution note
audio_only     mp4        audio only  112k , mp4a.40.2
160p           mp4        284x160     230k , avc1.4D401F, 30.0fps, mp4a.40.2
360p           mp4        640x360     630k , avc1.4D401F, 30.0fps, mp4a.40.2
480p           mp4        852x480    1377k , avc1.4D401F, 30.0fps, mp4a.40.2
720p           mp4        1280x720   2322k , avc1.4D401F, 30.0fps, mp4a.40.2
720p__source_  mp4        1280x720   4519k , avc1.64001F, 30.0fps, mp4a.40.2 (best)


But as you see https://www.twitch.tv/nasa do have an audio channel.
audio_only mp4 audio only 112k , mp4a.40.2

Now this Audio only

Code: Select all

mpv --ytdl --ytdl-format=audio_only https://www.twitch.tv/nasa
conky reports bandwidth of 26.4-28.7 KiB k/s

But Compress Video at youtube

Code: Select all

mpv --ytdl --ytdl-format=91 https://www.youtube.com/watch?v=21X5lGlDOfg
conky reports 16-23.5 KiB k/s

Yes compress Video at youtube is less than a audio ONLY at www.twitch.tv

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#8 Post by enrique »

Semme
1rst THANK YOU for responce. I am at this moment seeing the dock of dragon so no time to check link fully.

One thing is transcoding to or playing Audio ONLY but the bandwidth is fully consume with the whole video signal.

But what I am looking was to consume the lowest bandwidth. I do not mind to see video. The Idea is to listen to voice most of the time and ONLY play high quality video on the important parts like docking.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#9 Post by Semme »

Yeah. Running Pup I tend to stay away from these Python type apps. Thought it might be interesting though..
I could not get it to work properly...
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#10 Post by enrique »

hehehehe after all it did not record ;)

it seems the audio of this stream is incompatible with mp4 or even mkv.
root@live:/mnt/sda7/nasa# mpv --ytdl https://www.youtube.com/watch?v=21X5lGlDOfg --record-file="stream.mp4"
Playing: https://www.youtube.com/watch?v=21X5lGlDOfg
(+) Video --vid=1 (h264 1280x720 60.000fps)
(+) Audio --aid=1 (aac 2ch 48000Hz)
[ffmpeg] mp4: Tag [15][0][0][0] incompatible with output codec id '86018' (mp4a)
[recorder] Write header failed.

Disabling stream recording.
AO: [alsa] 48000Hz stereo 2ch float
VO: [gpu] 1280x720 yuv420p

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#11 Post by nic007 »

enrique wrote:nic007

I am sorry if I confuse you guys. See I seen too many numbers. I take note of them but at the end I ONLY go for what conky reports.

Now as You see Youtube have no AUDIO ONLY feed.
That I know there is no way to tell youtube to transmit ONLY the audio part of the feed.


The audio I spoke before is

Code: Select all

youtube-dl -F https://www.twitch.tv/nasa
[twitch:stream] nasa: Downloading stream JSON
[twitch:stream] nasa: Downloading channel access token
[twitch:stream] nasa: Downloading m3u8 information
[info] Available formats for 38378971632:
format code    extension  resolution note
audio_only     mp4        audio only  112k , mp4a.40.2
160p           mp4        284x160     230k , avc1.4D401F, 30.0fps, mp4a.40.2
360p           mp4        640x360     630k , avc1.4D401F, 30.0fps, mp4a.40.2
480p           mp4        852x480    1377k , avc1.4D401F, 30.0fps, mp4a.40.2
720p           mp4        1280x720   2322k , avc1.4D401F, 30.0fps, mp4a.40.2
720p__source_  mp4        1280x720   4519k , avc1.64001F, 30.0fps, mp4a.40.2 (best)


But as you see https://www.twitch.tv/nasa do have an audio channel.
audio_only mp4 audio only 112k , mp4a.40.2

Now this Audio only

Code: Select all

mpv --ytdl --ytdl-format=audio_only https://www.twitch.tv/nasa
conky reports bandwidth of 26.4-28.7 KiB k/s

But Compress Video at youtube

Code: Select all

mpv --ytdl --ytdl-format=91 https://www.youtube.com/watch?v=21X5lGlDOfg
conky reports 16-23.5 KiB k/s

Yes compress Video at youtube is less than a audio ONLY at www.twitch.tv
I think you are confusing Kbps (kilobits per second) with KBps (kilobytes per second). 1 KiloByte= 8 x Kilobits. Don't know how youtube's live streams work but uploaded videos generally have video and audio tracks that are split and can be downloaded seperately. At some resolutions, one combined file (video and audio) can be downloaded directly from the google server. There are downloaders that can combine the video and audio streams for you.

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#12 Post by enrique »

nic007

Thanks for hanging around. This week have been the most productive to me here in the forum. I had no issues or contradictions. In fact I am very thankful for all the help you had provide me.

Now I am not trying to contradict you. I know it is hard to believe that Audio Only end up using more bandwidth than Composite Video.

PLEASE see that when we read we see all kind of bit rate information. True. I even look at it and may use as a guide. BUTTTTTT PLEASE see that my decisions are base ONLY on what corky metered. Yes the Practical side or what REALY end up using. Not theoretical of the stream spec.

SO I encourage you to test it your self.

1) Audio Only from https://www.twitch.tv/nasa
Spec : audio_only mp4 audio only 112k , mp4a.40.2
Link:

Code: Select all

mpv --ytdl --ytdl-format=audio_only https://www.twitch.tv/nasa
2) Lowest video from https://www.youtube.com/watch?v=21X5lGlDOfg
Spec : 91 mp4 256x144 HLS 197k , avc1.42c00b, 30.0fps, mp4a.40.5@ 48k
Link:

Code: Select all

mpv --ytdl --ytdl-format=91 https://www.youtube.com/watch?v=21X5lGlDOfg
Close all programs and windows of your Puppy. Look at conky. Make sure no one is using your data, so conky should report 0. Open a terminal and paste link. But let the video run for a minute before making note of the speed or the data consumption. Then do same thing with other link. report yourself here.

Regards youtube feeds. That I know there is NO WAY to tell youtube to send AUDIO Only if it is not already posted as a separate stream Audio channel reported on the manifest. I hope you prove me wrong on this, In fact I am looking if we can still use mobile youtube as it use to provide different set of manifest.

Again THANKS for any report and for helping me here. Please note there is no hurry. All happens because my Internet is from my Cellphone and I try to keep my use as low as possible so that the ISP do not throttle me the speed down once my maximum is reach.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#13 Post by nic007 »

enrique wrote:nic007

Thanks for hanging around. This week have been the most productive to me here in the forum. I had no issues or contradictions. In fact I am very thankful for all the help you had provide me.

Now I am not trying to contradict you. I know it is hard to believe that Audio Only end up using more bandwidth than Composite Video.

PLEASE see that when we read we see all kind of bit rate information. True. I even look at it and may use as a guide. BUTTTTTT PLEASE see that my decisions are base ONLY on what corky metered. Yes the Practical side or what REALY end up using. Not theoretical of the stream spec.

SO I encourage you to test it your self.

1) Audio Only from https://www.twitch.tv/nasa
Spec : audio_only mp4 audio only 112k , mp4a.40.2
Link:

Code: Select all

mpv --ytdl --ytdl-format=audio_only https://www.twitch.tv/nasa
2) Lowest video from https://www.youtube.com/watch?v=21X5lGlDOfg
Spec : 91 mp4 256x144 HLS 197k , avc1.42c00b, 30.0fps, mp4a.40.5@ 48k
Link:

Code: Select all

mpv --ytdl --ytdl-format=91 https://www.youtube.com/watch?v=21X5lGlDOfg
Close all programs and windows of your Puppy. Look at conky. Make sure no one is using your data, so conky should report 0. Open a terminal and paste link. But let the video run for a minute before making note of the speed or the data consumption. Then do same thing with other link. report yourself here.

Regards youtube feeds. That I know there is NO WAY to tell youtube to send AUDIO Only if it is not already posted as a separate stream Audio channel reported on the manifest. I hope you prove me wrong on this, In fact I am looking if we can still use mobile youtube as it use to provide different set of manifest.

Again THANKS for any report and for helping me here. Please note there is no hurry. All happens because my Internet is from my Cellphone and I try to keep my use as low as possible so that the ISP do not throttle me the speed down once my maximum is reach.
Are you sure you did not swop the values you got from Conky around (the video from youtube should have the higher values for sure)? If you watch a live stream from youtube, you will watch the video which include video and audio. Any video with sound has a video and sound track. The video player (in your case mpv) picks this up. This is because video and audio codecs are different. Youtube commonly use the H264 mpeg-4 AVC codec for the video part of mp4's and the aac codec for the audio for videos.

Anyways, let's look at your post above:

1. Audio only feed from twitch.tv is 112 kilobits per second. Correct.
2. The video from youtube: Spec 91 is the code for a video with 144P video quality (197 kilobits per second) and audio quality of 48 kilobits per second. The bitrate for the video part is 197 kilobits per second and the bitrate for the audio part is 48 kilobits per second. So the video actually runs at 245 kilobits per second [197 + 48]. So the stream you got from youtube runs at 245 kilobits per second.

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#14 Post by enrique »

nic007 Be my friend. If I post is because I have nothing else to do. Not to fight. Or even contradict you. I love to keep having all the help you do provide to me most of the time. I am your follower.

1rts be practical and do what I say. Do the test and see for your self.

I know Impossible.

I come from direct Satellite Viewing hacking. So we learn about mpeg transport stream. It is the basics of all video/audio transmission.

https://en.wikipedia.org/wiki/MPEG_transport_stream

Now in order to keep all video/audio stream synchronized and simple to use they try maintain bitrate constant. Without getting on details, they end up adding blank bits(bytes) "FF". So a channel is configure for its maximum bit rate. This is to keep the bandwidth reserved for that Hi Quality Movie they may transmit at one point. But the real situation uses wayyyy wayyy less, and many of the bytes are just "FF".

So until here we could say on an IMAGINARY Feed: Video-Channel-ONLY requires MUNCH MORE Bytes than Audio-Channel-ONLY. But due to constant bitrate they end up using same amount. So Audio and Video are kept in sync.

Now comes the Encapsulation. On the Satellite FEED we do not use Encapsulation. All data is transmitted as TS - mpeg trasport stream.

But here in Internet we do deliver video encapsulated. Depending on the encapsulation the size of the final product or stream can be altered.

SAMPLE: Same quality movie(same bitrate) uses less space as MP4 than as MPEG

Now I can ONLY guess that the packaging of the Low quality Video+Audio I selected end up using a compression ratio much higher. And those Audio Channels that usually are meant for HI Quality Audio ( HIFI Music ) do not compress the data to keep quality and error free. This is just a guess.


NOTE: I did try m.youyube.com but they use same manifest. And m.youyube.com will not work for the live stream. For that the ask for a $$ Account.

Sad I do love nasa live stream.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#15 Post by nic007 »

Nobody's fighting. Besides the print-outs you have provided which is quite telling, logic suggests that it would be extremely difficult for a stream which consists of both video and audio to have a lesser bitrate than an audio only stream of 112 kilobits per second. We are not going to agree on this, it's okay. Let's move on.

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#16 Post by enrique »

Here is my last improved. Now that is the latest I will post the settings for smtube so that we just need to do clicks. I guess this settings should be able to adapt to gtk youtube viewer and youtube-viewer but I do not know how to create the settings.

1) Do not forget the MAIN objective. To automatically select the video/audio that uses the less bandwidth.

2) Please NOTE that Youtube LIVE channels have different properties than regular channels. This force me to have 2 different settings; one for regular channels and one extra for LIVE channels.

SMTUBE

a) Select Menu>View>settings>Players
b) To add a new configuration click on [+]
c) Copy & Paste 1rst settings
Name: MPV+ytdl-worst
Executable: mpv
Parameters: --ytdl --ytdl-format=worstvideo+worstaudio --record-file=/tmp/stream.mkv %u

d) Click in [OK] to save setting
e) To add a new configuration click on [+]
f) Copy & Paste 2nd settings
Name: MPV+ytdl-worst-Live
Executable: mpv
Parameters: --ytdl --ytdl-format=worst --record-file=/tmp/stream.ts %u
g) Click in [OK] to save setting

*If you like use arrows to move up so that they show 1rst.
I you select as TOP, this will become the default option when select the video. The rest are selected by doing right click.

Last comment as you see I set the videos to be save in /tmp. Be careful not to let it running and consuming all your RAM. If you do not like this just delete or change saving to a new location. Notice that LIVE channel did not allow it to be save as MKV. So I was force to save as fundamental mpeg TS file, it has no encapsulation. This means no compression.

Hope it helps others.

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#17 Post by enrique »

Final note.
MPV+ytdl-worst will NOT WORK for LIVE Channels.

If you do select MPV+ytdl-worst-Live on a regular YouTube channel this one will show video. BUT IT WILL NOT be the SMALLEST. Yes final file will be 360P, I guess this is YouTube Defaults. Plus recorded TS file will in fact be bigger than the standard MP4 as it has no compression.

So to work as expected you need to select the correct seting for the correct channel.

Edit:
Also you need to understand that there are Youtube recordings made from a LIVE Channels. Guess what. Yes this recordings are certaing no LIVE anymore. But they where recorded using LIVE. So as results this Record Youtube will need to be watch with MPV+ytdl-worst-Live since their feeds where saved from Live feeds.

Post Reply