Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[?] Grab YouTube LiveTV for later offline viewing

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

[?] Grab YouTube LiveTV for later offline viewing

#1 Post by bkpsusmitaa »

We in India watch Republic Media Network Pvt. Ltd. -'s channel regularly on our Cable TV. There are some shows that are only uploaded for viewers at a much later date than when first broadcast.

For personal references and later uses, could the Live Stream be grabbed at a very low resolution of 144P with mp4 mono audio? Gnome RecordMyDesktop isn't a very good tool.

I have installed smtube. But how to play the Live TV? This is the link to Republic Media Network's Republic World YouTube channel.
The link to the Live TV is posted there. Currently, it is: Republic Live.

When the link is posted to the smplayer/Open/URL... the status bar says: unable to locate the URL of the video; and does nothing.

But presently, the smtube can load the URL but can't play. Perhaps because it loads the page using Mozilla firefox. But Mozilla Firefox Browser for an unknown reason can't use the system Audio Hardware, whereas Chrome Browser does without problem.

For smtube the debug info is as posted below:

Code: Select all

WFg2OToyQU9HdF9PS2ppTWpOQjlEWXd1eEJidHAyNXYzS2ZNVk95RG56MTVVc3NrdUpQLXdaU0E",
  "volume": 100,
  "cbrand": "generic",
  "cbr": "Mozilla",
  "cbrver": "5.0",
  "c": "MWEB",
  "cver": "2.20210127.04.00",
  "cplayer": "UNIPLAYER",
  "cmodel": "android 4.0",
  "cos": "Android",
  "cosver": "4.0.4",
  "cplatform": "TABLET",
  "delay": 5,
  "hl": "en_US",
  "cr": "IN",
  "fexp": "23857949,23897180,23923339,23969934,23976578,23987360,23991783,23997401,24631236",
  "vct": "0.000",
  "vd": "NaN",
  "vpl": "",
  "vbu": "",
  "vpa": "0",
  "vsk": "0",
  "ven": "0",
  "vpr": "1",
  "vrs": "0",
  "vns": "2",
  "vec": "null",
  "vemsg": "",
  "vvol": "1",
  "vdom": "1",
  "vsrc": "1",
  "vw": "1036",
  "vh": "583",
  "ismb": 1870000,
  "latency_class": "LOW",
  "lowlatency": "1",
  "lat": 0,
  "relative_loudness": "NaN",
  "optimal_format": "Auto",
  "user_qual": "auto",
  "debug_videoId": "f0-Y-eMhS1A",
  "0sz": false,
  "op": "",
  "yof": false,
  "dis": "",
  "gpu": "Mesa_DRI_Intel(R)_HD_Graphics_520_(Skylake_GT2)_x86/MMX/SSE2",
  "cgr": true,
  "debug_playbackQuality": "auto",
  "debug_date": "Sun Jan 31 2021 12:49:57 GMT+0530 (IST)"
}
For example, could the browser be changed from Mozilla to Chrome? Like this line:

Code: Select all

"cbr": "Mozilla",
Could any help be offered please, in this regard?
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: [?] Grab YouTube LiveTV for later offline viewing

#2 Post by Head_on_a_Stick »

bkpsusmitaa wrote:Mozilla Firefox Browser for an unknown reason can't use the system Audio Hardware
Are you using the firefox-esr package from the Debian repositories?

Have you tried https://youtube-dl.org/?
deadbang

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: [?] Grab YouTube LiveTV for later offline viewing

#3 Post by bkpsusmitaa »

Head_on_a_Stick wrote:
bkpsusmitaa wrote:Mozilla Firefox Browser for an unknown reason can't use the system Audio Hardware
Are you using the firefox-esr package from the Debian repositories?
Yes, installed following your advice on that earlier post on chromium and my earlier notes, and the problem went away. Thank you. The version is 78.6.1esr (32-bit). How to check in future for new updates? Normal like Firefox?
Head_on_a_Stick wrote:Have you tried https://youtube-dl.org/?
Yes, some time back, but the initial screenshot with Synaptic was used with following error. The long man page is very irritating (c programmers are superhumans). I procrastinated. I am posting the output with a current link:

Code: Select all

$ youtube-dl https://www.youtube.com/watch?v=f0-Y-eMhS1A
[youtube] f0-Y-eMhS1A: Downloading webpage
[youtube] f0-Y-eMhS1A: Downloading video info webpage
ERROR: f0-Y-eMhS1A: YouTube said: Invalid parameters.
But thank you. You have given me an impetus. I will try to read the man page and find a suitable code.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: [?] Grab YouTube LiveTV for later offline viewing

#4 Post by stevepusser »

I think Debian's smtube is getting outdated. If you can play the video in VLC, the advanced controls have a record button that will record the stream.

I also could play the stream in QMPlay2's Youtube player and then download it as it went, but that app's my own build, and is not in Debian.
MX Linux packager and developer

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: [?] Grab YouTube LiveTV for later offline viewing

#5 Post by stevepusser »

QMPlay2 downloads the stream in its full HD glory--it has some builtin transcoding capability, but I haven't explored those, or if it can download that 144p stream instead. It does download its own copy of youtube-dl for internal use, and updates it as needed. MystiQ in buster-backports is a fairly easy-to-use GUI frontend to transcoding with ffmpeg.

We also have some Debian-compatible packages of youtube-dl-gui and youtubedl-gui (similar names, different apps) that might also work, in the MX 19 repos. MX 19 packages are the ones built against Buster.

http://mxrepo.com/mx/repo/pool/main/q/qmplay2/
http://mxrepo.com/mx/repo/pool/main/y/youtube-dl-gui
http://mxrepo.com/mx/testrepo/pool/test ... ubedl-gui/

Or maybe simplescreenrecorder, vokoscreen, or another, better screen recorder would be another workaround.
MX Linux packager and developer

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: [?] Grab YouTube LiveTV for later offline viewing

#6 Post by bkpsusmitaa »

Wow, Stevepusser, you appear to be an extraordinary developer! Thank you for your detailed inputs. Your various inputs are much admired. For example, the following:
stevepusser wrote:... We also have some Debian-compatible packages of youtube-dl-gui and youtubedl-gui (similar names, different apps) that might also work, in the MX 19 repos. MX 19 packages are the ones built against Buster.

http://mxrepo.com/mx/repo/pool/main/q/qmplay2/
http://mxrepo.com/mx/repo/pool/main/y/youtube-dl-gui
http://mxrepo.com/mx/testrepo/pool/test ... ubedl-gui/ ...
stevepusser wrote:... simplescreenrecorder, vokoscreen, or another, better screen recorder would be another workaround. ...
stevepusser wrote:... QMPlay2's Youtube player and then download it ... QMPlay2 downloads the stream ... that app's my own build, and is not in Debian ...
stevepusser wrote:... MystiQ in buster-backports is a fairly easy-to-use GUI frontend ...
stevepusser wrote:... Debian-compatible packages of youtube-dl-gui and youtubedl-gui ...
stevepusser wrote:... play the video in VLC ...
I have posted the most feasible one last. The rest programs would require installation and rearrangement, whereas vlc media player is already installed. I have an idea on how to record stream from vlc media player. The instruction is also available at the instructables.com website as follows:
Step 1: Open VLC Media Player. ...
Step 2: Media - Capture Device. ...
Step 3: Change the Capture Mode to Desktop. ...
Step 4: Change the Desired Frame Rate to 30 Fps. ...
Step 5: Click on the Little Down Arrow Near the Play Button - Then Click Convert. ...
Step 6: Select Your Output Destination Folder. ...
Step 7: Then Click Start.

But I am not able to record the audio associated with the video. Furthermore, can't record the desktop even with 1fps. I shall try, and get back. In case any input, kindly don't hesitate to advise please.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: [?] Grab YouTube LiveTV for later offline viewing

#7 Post by stevepusser »

If you can play the stream in VLC, you can use VLC to directly dump the stream to a file. I have used that feature often to just make a short clip of a movie I'm watching.
To add the recording button to the interface, open VLC's "View" menu and click "Advanced Controls." The recording button appears on the lower portion of the VLC program interface, between the "Play" button and the time slider.
Yes, I can use the Media/Open Network Stream menu in VLC to open and record the current live stream URL: https://youtu.be/f0-Y-eMhS1A, but it's HD. Here's a 3MB clip, saved in my home's Video folder: https://drive.google.com/file/d/12_8CTl ... sp=sharing

If you need 144p video because of a slow computer, you will have to trancode the HD video to that resolution, which also takes a while on a slow computer. VLC can handle that transcoding for you, though doing it in that app is a bit more tedious than just using something like MystiQ or qwinff.

A downside to VLC is that it uses a lua script to play YT videos, and that can't be updated automatically like other players (QMPlay2, a current SMPlayer) can update the internal version of youtube-dl that they use, or the system youtube-dl. If YT breaks playback like they do often, you either have to wait for a VLC update, or get a newer version of the lua file from VLC's github and overwrite the older version where it lives on your system.
MX Linux packager and developer

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: [?] Grab YouTube LiveTV for later offline viewing

#8 Post by bkpsusmitaa »

Once again, apologise for arriving late. And a big thank you for your information and the guidance that you have provided (the recording was excellent).
I am trying to follow your advice, but I can't play the said stream (link duly updated) in either VLC Media Player, or SMPlayer. For smplayer, followed the HOWTO from this URL, with a Linux based Network Preference as mpv + youtube-dl
But it shows Exit Code: 2 with the following log file:

Code: Select all

/usr/bin/mpv --no-config --no-quiet --terminal --no-msg-color --input-file=/dev/stdin --no-fs --hwdec=no --sub-auto=fuzzy --no-input-default-bindings --input-vo-keyboard=no --no-input-cursor --cursor-autohide=no --no-keepaspect --wid=60817466 --monitorpixelaspect=1 --osd-level=0 --osd-scale=1 --osd-bar-align-y=0.6 --sub-ass --embeddedfonts --sub-ass-line-spacing=0 --sub-scale=1 --sub-font=Arial --sub-color=#ffffffff --sub-shadow-color=#ff000000 --sub-border-color=#ff000000 --sub-border-size=0.75 --sub-shadow-offset=2.5 --sub-font-size=50 --sub-bold=no --sub-italic=no --sub-codepage=ISO-8859-1 --sub-pos=100 --volume=64 --cache=auto --screenshot-template=cap_%F_%p_%02n --screenshot-format=jpg --screenshot-directory=/tmp/smplayer_screenshots --af-add=lavfi=[acompressor] --audio-pitch-correction=yes --af-add=lavfi=[firequalizer=gain='cubic_interpolate(f)':zero_phase=on:wfunc=tukey:delay=0.027:gain_entry='entry(0,0);entry(62.5,0);entry(125,0);entry(250,0);entry(500,0);entry(1000,0);entry(2000,0);entry(4000,0);entry(8000,0);entry(16000,0)'] --volume-max=100 --ytdl -ytdl-format=[height <=? 144] --term-playing-msg=MPV_VERSION=${=mpv-version:}
INFO_VIDEO_WIDTH=${=width}
INFO_VIDEO_HEIGHT=${=height}
INFO_VIDEO_ASPECT=${=video-aspect}
INFO_VIDEO_FPS=${=container-fps:${=fps}}
INFO_VIDEO_FORMAT=${=video-format}
INFO_VIDEO_CODEC=${=video-codec}
INFO_AUDIO_FORMAT=${=audio-codec-name}
INFO_AUDIO_CODEC=${=audio-codec}
INFO_AUDIO_RATE=${=audio-params/samplerate}
INFO_AUDIO_NCH=${=audio-params/channel-count}
INFO_LENGTH=${=duration:${=length}}
INFO_DEMUXER=${=current-demuxer:${=demuxer}}
INFO_SEEKABLE=${=seekable}
INFO_TITLES=${=disc-titles}
INFO_CHAPTERS=${=chapters}
INFO_TRACKS_COUNT=${=track-list/count}
METADATA_TITLE=${metadata/by-key/title:}
METADATA_ARTIST=${metadata/by-key/artist:}
METADATA_ALBUM=${metadata/by-key/album:}
METADATA_GENRE=${metadata/by-key/genre:}
METADATA_DATE=${metadata/by-key/date:}
METADATA_TRACK=${metadata/by-key/track:}
METADATA_COPYRIGHT=${metadata/by-key/copyright:}
INFO_MEDIA_TITLE=${=media-title:}
INFO_STREAM_PATH=${stream-path}
 --audio-client-name=SMPlayer --term-status-msg=STATUS: ${=time-pos} / ${=duration:${=length:0}} P: ${=pause} B: ${=paused-for-cache} I: ${=core-idle} VB: ${=video-bitrate:0} AB: ${=audio-bitrate:0} https://www.youtube.com/watch?v=f0-Y-eMhS1A

Playing: https://www.youtube.com/watch?v=f0-Y-eMhS1A
[ytdl_hook] youtube-dl failed: unexpected error ocurred 
Failed to recognize file format.
Exiting... (Errors when loading file)
The youtube-dl version in my laptop is

Code: Select all

$ youtube-dl --version
2019.01.17
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

Post Reply