Skip to content
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

Using mpv with youtube-dl and add the video to the history #8560

Closed
vonpupp opened this issue Feb 14, 2016 · 1 comment
Closed

Using mpv with youtube-dl and add the video to the history #8560

vonpupp opened this issue Feb 14, 2016 · 1 comment

Comments

@vonpupp
Copy link

@vonpupp vonpupp commented Feb 14, 2016

Hello,

I use youtube-dl within mpv, so I can stream long videos and the monitor wont go to energy saving mode. This is working great, however I would like to have an authenticated version of the script so the video is added to the history and "tracked" by Google, so it will improve the suggestions. The ultimate goal is to integrate this with vimperator so I can watch videos with a keystroke out of the browser but keeping the suggestions updated.

This is my draft of the authenticated script version:

> $ cat mpv-watch-youtube-240.sh
quality="best[height=240]"
string="$quality $1 &"
echo "playing: $string"
mpv --ytdl-raw-options=username=<email>,password=<password>,verbose=-vvv --ytdl-format $string

Authentication seems to work fine (I get an error with wrong password), here is an output from a regular video using authentication (correct auth scenario):

> $ ./mpv-watch-youtube-240.sh "https://www.youtube.com/watch?v=aMxqsHxp_Sk"      
playing: best[height=240] https://www.youtube.com/watch?v=aMxqsHxp_Sk &
Playing: https://www.youtube.com/watch?v=aMxqsHxp_Sk
[ytdl_hook] [debug] System config: []
[ytdl_hook] [debug] User config: []
[ytdl_hook] [debug] Command-line args: [u'--no-warnings', u'-J', u'--flat-playlist', u'--sub-format', u'ass/srt/best', u'--no-playlist', u'--format', u'best[height=240]', u'--username', u'PRIVATE', u'--verbose', u'-vvv', u'--password', u'PRIVATE', u'--all-subs', u'--', u'https://www.youtube.com/watch?v=aMxqsHxp_Sk']
[ytdl_hook] [debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[ytdl_hook] [debug] youtube-dl version 2016.02.05.1
[ytdl_hook] [debug] Python version 2.7.11 - Linux-4.3.3-2-ARCH-x86_64-with-glibc2.2.5
[ytdl_hook] [debug] exe versions: ffmpeg 2.8.4, ffprobe 2.8.4, rtmpdump 2.4
[ytdl_hook] [debug] Proxy map: {}
 (+) Video --vid=1 (flv1)
 (+) Audio --aid=1 (mp3)
libEGL warning: DRI2: failed to authenticate
[vo/opengl] Suspected software renderer or indirect context.
[vo/opengl] Suspected software renderer or indirect context.
AO: [pulse] 22050Hz stereo 2ch s16
VO: [vdpau] 426x240 yuv420p
[vo/vdpau] Compositing window manager detected. Assuming timing info is inaccurate.
AV: 00:00:02 / 01:02:35 (0%) A-V:  0.000 Cache:  9s+752KB

The video playback is ok however it does not get added to the history.

Am I missing something? Perhaps is there another option for this? I didn't find any on the documentation.

Thank you very much.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Feb 14, 2016

Closing as a duplicate of #5054, it's for marking the video as watched when downloading but it could be adapted for the mpv case.

@jaimeMF jaimeMF closed this Feb 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.