streaming with mpv and ytdl

Problems, bugs, suggestions... anything related to SMPlayer.

streaming with mpv and ytdl

Postby kmod » Sat Jan 24, 2015 5:46 am

Hi,

Checking out Smplayer 14.9.0 svn r6686 with mpv as backend. It has been working great. Thanks for the great work.

I have encountered some videos (not on Youtube) that I can download with youtube-dl and stream directly with mpv, but not with Smplayer using mpv as backend and the option '--ytdl-format=bestvideo+bestaudio' in Preferences > Advanced > Options for Mplayer/Mpv. The videos stream if the ytdl option is removed.

For example http://www.dailymotion.com/video/x2fc1m ... rauss_tech

From Smplayer's log:

/home/bee/bin/mpv --no-config --no-quiet --terminal --no-msg-color --slave-broken --no-fs --vd-lavc-threads=4 --hwdec=vaapi --sub-auto=fuzzy --vo=vaapi --ao=pulse --stop-screensaver --no-input-default-bindings --input-x11-keyboard=no --no-input-cursor --cursor-autohide=no --no-keepaspect --wid=71303219 --monitorpixelaspect=1 --osd-scale=1 --sub-ass --embeddedfonts --ass-line-spacing=0 --sub-scale=1 --ass-styles=/home/bee/.config/smplayer/styles.ass --sub-codepage=utf8:ISO-8859-1 --sub-pos=100 --volume=100 --cache=2048 --osd-level=0 --screenshot-template=cap_%F_%p_%02n --audio-channels=2 --af-add=scaletempo --af-add=equalizer=0:0:0:0:0:0:0:0:0:0 --softvol=yes --softvol-max=300 --ytdl --ytdl-format=bestvideo+bestaudio --term-playing-msg=MPV_VERSION=${=mpv-version:}
INFO_VIDEO_WIDTH=${=width}
INFO_VIDEO_HEIGHT=${=height}
INFO_VIDEO_ASPECT=${=video-aspect}
INFO_VIDEO_FPS=${=fps}
INFO_VIDEO_BITRATE=${=video-bitrate}
INFO_VIDEO_FORMAT=${=video-format}
INFO_VIDEO_CODEC=${=video-codec}
INFO_AUDIO_BITRATE=${=audio-bitrate}
INFO_AUDIO_FORMAT=${=audio-format}
INFO_AUDIO_CODEC=${=audio-codec}
INFO_AUDIO_RATE=${=audio-samplerate}
INFO_AUDIO_NCH=${=audio-channels}
INFO_LENGTH=${=length}
INFO_DEMUXER=${=demuxer}
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:}
--term-status-msg=STATUS: ${=time-pos} / ${=length:0} P: ${=pause} B: ${=paused-for-cache} I: ${=core-idle} http://www.dailymotion.com/video/x2fc1m ... rauss_tech

--slave-broken is deprecated (see manpage).
[input_file] Client connected
Playing: http://www.dailymotion.com/video/x2fc1m ... rauss_tech
[ytdl_hook] WARNING: video doesn't have subtitles
[ytdl_hook] ERROR: requested format not available
[ytdl_hook] youtube-dl failed, trying to play URL directly ...
Failed to recognize file format.
Exiting... (Errors when loading file)
kmod
 
Posts: 39
Joined: Wed Jul 16, 2014 10:19 am

Re: streaming with mpv and ytdl

Postby rvm » Fri Jan 30, 2015 5:25 am

It seems bestvideo+bestaudio doesn't work with dailymotion. You can use "best" with dailymotion, but "best" only gives the 720p video with youtube.
rvm
Site Admin
 
Posts: 2782
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: streaming with mpv and ytdl

Postby kmod » Fri Jan 30, 2015 6:20 am

Actually, it seems that bestvideo+bestaudio works only on Youtube but nothing else.
kmod
 
Posts: 39
Joined: Wed Jul 16, 2014 10:19 am

Re: streaming with mpv and ytdl

Postby realnc » Sat Jan 31, 2015 3:49 am

kmod wrote:Actually, it seems that bestvideo+bestaudio works only on Youtube but nothing else.

Yep, says so in the man page of mpv:

Code: Select all
--ytdl-format=<best|worst|mp4|webm|...>
              Video  format/quality  that is directly passed to youtube-dl. The possible values are
              specific to the website and the video, for a given url the available formats can be
              found with the command youtube-dl --list-formats URL. See youtube-dl's
              documentation for available aliases.  To use experimental DASH support for
              youtube, use bestvideo+bestaudio.  (Default: best)


Unfortunately, mpv doesn't seem to allow you to specify alternatives. Something like "bestvideo+bestaudio,best", so that "best" is used if "bestvideo+bestaudio" isn't available.
realnc
 
Posts: 57
Joined: Mon Feb 08, 2010 4:35 pm

Re: streaming with mpv and ytdl

Postby realnc » Sat Jan 31, 2015 4:05 am

realnc wrote:Unfortunately, mpv doesn't seem to allow you to specify alternatives. Something like "bestvideo+bestaudio,best", so that "best" is used if "bestvideo+bestaudio" isn't available.

No, wait. It *does* work! But you have to use "/", not ",". This works:

"--ytdl-format=bestvideo+bestaudio/best"

This uses [email protected] on YouTube (or 30FPS if the video isn't 60; it picks the DASH video and audio streams in any case though), but still picks the "best" stream on other sites.
Last edited by realnc on Thu Mar 05, 2015 8:25 pm, edited 1 time in total.
realnc
 
Posts: 57
Joined: Mon Feb 08, 2010 4:35 pm

Re: streaming with mpv and ytdl

Postby rvm » Sat Jan 31, 2015 4:25 am

Great!
rvm
Site Admin
 
Posts: 2782
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: streaming with mpv and ytdl

Postby realnc » Sat Jan 31, 2015 9:20 am

rvm wrote:Great!

Greater than expected, even ;) I just found out that mpv even plays Twitch.tv live streams. With mplayer as backend, I had to switch between livestreamer and youtube-dl to play URLs from various sites. With mpv, I just drag&drop a link from my browser into SMPlayer and watch. That simple.

Adding mpv supports was a huge win.
realnc
 
Posts: 57
Joined: Mon Feb 08, 2010 4:35 pm

Re: streaming with mpv and ytdl

Postby realnc » Sun Feb 01, 2015 12:02 pm

realnc wrote:I just found out that mpv even plays Twitch.tv live streams.

Except in Windows. The bundled version of youtube-dl.exe that comes with SMPlayer is outdated. Easily fixed by running "youtube-dl.exe -U" though (the "-U" option makes it update itself with the latest version.)
realnc
 
Posts: 57
Joined: Mon Feb 08, 2010 4:35 pm

Re: streaming with mpv and ytdl

Postby kmod » Wed Feb 04, 2015 6:54 pm

realnc wrote:
realnc wrote:Unfortunately, mpv doesn't seem to allow you to specify alternatives. Something like "bestvideo+bestaudio,best", so that "best" is used if "bestvideo+bestaudio" isn't available.

No, wait. It *does* work! But you have to put it in reverse order. This works:

"--ytdl-format=best,bestvideo+bestaudio"

This uses [email protected] on YouTube (or 30FPS if the video isn't 60; it picks the DASH video and audio streams in any case though), but still picks the "best" stream on other sites.


Great finding. However, on my system (Ubuntu 14.04 + Smplayer 14.90 svn r6690) this works only if stream with mpv directly, but using "-ytdl-format=best,bestvideo+bestaudio" in Smplayer only plays 720p
kmod
 
Posts: 39
Joined: Wed Jul 16, 2014 10:19 am

Re: streaming with mpv and ytdl

Postby realnc » Thu Feb 05, 2015 7:16 pm

kmod wrote:Great finding. However, on my system (Ubuntu 14.04 + Smplayer 14.90 svn r6690) this works only if stream with mpv directly, but using "-ytdl-format=best,bestvideo+bestaudio" in Smplayer only plays 720p

You need to disable the internal smplayer youtube support and only enable the mpv streaming support in the network section in the preferences.
realnc
 
Posts: 57
Joined: Mon Feb 08, 2010 4:35 pm

Next

Return to General

Who is online

Users browsing this forum: redxii and 5 guests