How can I watch something using youtube-dl+MPV while also saving the file to disk?

How can I watch something using youtube-dl+MPV while also saving the file to disk?
Specifically a stream.

Attached: 1555431967601.jpg (311x273, 16K)

Other urls found in this thread:

github.com/mpv-player/mpv
mpv.io/installation/
github.com/mpv-project/mpv/tree/master/DOCS/man
github.com/mpv-project/mpv/blob/master/DOCS/man/mpv.rst#files
github.com/mpv-project/mpv/blob/master/etc/input.conf
github.com/stax76/mpv.net
pastebin.com/FR0tkGfY
mpv.io/manual/master/#command-interface-seek--[]
twitter.com/NSFWRedditGif

You can just use VLC and hit the record button.

I said youtube-dl and MVP
also wouldn't vlc recompress shit?

mpv can't play and download at the same time, best to just play the stream with mpv and download with another program like ffmpeg or use VLC like user said
>A thread died because OP can't into google

Attached: Mac Pro 2019.jpg (2048x1067, 993K)

why not play with mpv+ytdl
then open another instance of ytdl to download it?

mostly I want it because I want to be able to go back to the start of the stream while the stream is ongoing.

i use peerflix for torrent shit and i'm pretty sure there's a download option for YT-dl
just read the manpages™ lel

yeah but ytdl doesn't allow me to watch the saved footage until the entire stream is done. I wanna do this:

oh really? i thought there's an option for that given how large the program is, mb

add
record-file= "~~/stream.ts"

to your mpv.conf. could also bind this to a key instead

youtube-dl - | tee anus.mp4 | mpv -

forgot to say, this will create a video copy of the stream in the same mpv location

will this let me watch the stream while it's going on and go back in the timeline?

no. you will have to open it manually. just increase cache size and force seek if u dont want to exit the stream at all

yes my bad thats what i use as well but tried a more general approach without testing first

used:record-file= "C:\Users\User\Desktop\stream.ts"
thanks, this does create the file, but I guess MPV has to be on at all times then

fuck, using record-file doesn't seem to keep recording if you pause the playback

can also try
cache=yes
demuxer-seekable-cache=yes
demuxer-max-bytes=2GiB
demuxer-max-back-bytes=1GiB
force-seekable=yes

or even higher cache

>google
Leave Jow Forums forever

actually maybe it does, it's hard to test now that the stream is ongoing and I don't wanna fuck up the recording

thanks for the help user, record-file seems to work fine now but I haven't tried these cache options, what do they do exactly? created temporary 2gb chunks somewhere?

>C:\
Get a system that doesn't spy.

no. they use up your ram until the limit you set is reached. (as opposite to disk space with record-file)

then I'd rather use record-file because I wanna keep the stream

fuck, it doesn't work, I tried going back like 10 minutes, and MPV went back to the start of the stream and killed the timeline
FUCK

Download it with YouTube-dl and have mpv play the file while it is downloading.

I have tried this once. I couldn't get youtube-dl to both
- grab more than the last 5 seconds of the stream
- grab the beginning of the stream

use the cache settings with the record-file settings and report back

seems to work fine so far

youtube-dl url -o file.mp4
mpv file.mp4

you can't go back while watching using this method

how can I put it on a hotkey instead? because opening stream.ts also starts to write over it, replacing it with an empty file.

trying Shift+r
R record-file= "C:\Users\User\Desktop\stream.ts"

putting this in input.conf doesn't do it, do I need to format it in a different way? nothing happens

--record-file=
Record the current stream to the given target file. The target file will always be overwritten without asking.

This remuxes the source stream without reencoding, which makes this a highly fragile and experimental feature. It's entirely possible that
this writes files which are broken, not standards compliant, not playable with all players (including mpv), or incomplete.

The target file format is determined by the file extension of the target filename. It is recommended to use the same target container as the
source container if possible, and preferring Matroska as fallback.

Seeking during stream recording, or enabling/disabling stream recording during playback, can cut off data, or produce "holes" in the output
file. These are technical restrictions. In particular, video data or subtitles which were read ahead can produce such holes, which might
cause playback problems with various players (including mpv).

The behavior of this option might changed in the future, such as changing it to a template (similar to --screenshot-template), being renamed,
removed, or anything else, until it is declared semi-stable.

--stream-record=
Similar to --record-file, but write packets as they are received. The implementation of this does not tolerate seeks (outside of demuxer
cache), or streams being selected/deselected during recording. Can not be set at runtime. Use with care.

R cycle-values record-file "C:\Users\User\Desktop\stream.ts" ""

I don't see the general up so I'll just piggy back here.

Why are none of the keybindings changing when I change things in the config file for MPV.net? Like I'm trying to make it so I can rewind 5 sec at a time when I press left, so I'd change the command in the input config file to this:

Left no-osd seek -5 #menu: Navigate > Jump 5 sec backward

But it does nothing. And even the default 7 seconds doesn't work. It just skips back 10 seconds which means the input file is doing nothing? What am i doing wrong?

maybe write a script to download the video with yt-dl and open the link with mpv, because you can't stream from yt-dl's download I'm pretty sure since it downloads the audio and video stream separately and puts it together with ffmpeg after the download is done.
Sure it's not efficient but you'll sort of get what you want.

make a profile for http/s
[protocol.http]
record-file=

>mpv.net
found the problem. shill your piece of garbage somewhere else

No.

I thought mpv could do anything, why can’t it do this? Why can’t someone program it in?

/mpv/ - the kin/g/ of media players

The official mpv repository:
github.com/mpv-player/mpv

Installation:
mpv.io/installation/

Manual:
github.com/mpv-project/mpv/tree/master/DOCS/man

High quality video output profile (goes into mpv.conf):

profile=gpu-hq

Configuration Files:
github.com/mpv-project/mpv/blob/master/DOCS/man/mpv.rst#files

Input.conf:
github.com/mpv-project/mpv/blob/master/etc/input.conf

Windows Builds: github.com/stax76/mpv.net

Post your system specs and config if you're asking performance related questions.

Attached: mpv-gui.png (1280x720, 123K)

Is there a way to hotkey to show on-screen controls for a brief moment without having to constantly cycle through auto/always/off using "script-binding osc/visibility"
I don't like using "show-progress" unless there's a way to force an OSD bar with it that shows chapters

I use youtube-dl and then double-click on the .part file. But you have to force it to use a single file with both audio and video, instead of combining the best video with the best audio, so that limits video quality heavily.

I would also like a proper answer to OP's question, since the MPV+youtube-dl integration is a second-best experience when it comes to seeking.

Most promising answer so far, but I would still like a proper, full copy of the file to be left in /tmp so I could watch it later.

Peak boomer answer

profile=gpu-hq
hwdec=d3d11va
gpu-api=d3d11
gpu-context=d3d11
sigmoid-upscaling=no
linear-downscaling=no
deband-iterations=4
deband-threshold=48
deband-range=16
deband-grain=48
glsl-shader="~~/Shaders/FSRCNNX_x2_8-0-4-1.glsl"
glsl-shader="~~/Shaders/SSimSuperRes.glsl"
glsl-shader="~~/Shaders/SSimDownscaler.glsl"
video-sync=display-resample
For Interpolation in input.conf
t cycle interpolation ; no-osd set tscale "box" ; no-osd set t-scale-window "sphinx" ; no-osd set tscale-radius "1.0" ; no-osd set tscale-clamp "0.0"
For adaptive sharpen
a change-list glsl-shaders toggle "~~/Shaders/adaptive-sharpen.glsl" ; show-text "Toggle Adaptive Sharpen"
Profile for deinterlace in mpv.conf
[yadif prerequisites]
glsl-shaders-toggle="~~/Shaders/FSRCNNX_x2_8-0-4-1.glsl"
glsl-shaders-toggle="~~/Shaders/SSimSuperRes.glsl"
glsl-shaders-toggle="~~/Shaders/SSimDownscaler.glsl"
glsl-shaders-clr="~~/Shaders/adaptive-sharpen.glsl"
For deinterlace
d cycle-values hwdec "no" "yes" ; apply-profile "yadif prerequisites" ; change-list vf toggle yadif ; show-text "Toggle Deinterlace"
Full mpv.conf
pastebin.com/FR0tkGfY

wm4 is back at mainline mpv.

mpv: ../stream/stream.c:405: stream_peek: Assertion `buf_valid + chunk

Where did you put your inpu.conf file ? Unlike Shinchiro you have to put input.conf/mpv.conf in a config folder(portable_config if its inside mpv.net) and Scripts in portable_config/Scripts. If you didnt create a 'portable_config' folder in mpv.net directory then mpv.net will automatically create a config directory in '%AppData%'. You can copy the contents of that config directory to 'portable_config' and delete the contents of config folder in '%AppData%'. Now, edit the input.conf file in portable_config folder. The input.conf in mpv.net also controls the menus in context menu(so you can edit that if you want).

I did this but now it just seems to be skipping at random intervals anywhere between 5-15 seconds. What in the love of god is happening?

use exact seek
mpv.io/manual/master/#command-interface-seek--[]

Just came back to say I figured that out. Thanks for the help!

For some reason I can't get Vulkan to work anymore with recent git source. It says it failed to create a Vulkan instance.

I'm on Arch. Here are the packages I re-compiled from AUR before compiling mpv-git.
spirv-headers-git
spirv-tools-git
glslang-git

crossc-git
spirv-cross-git

shaderc-git
libplacebo-git
dav1d-git

ffnvcodec-headers-git
ffmpeg-git

mpv-git


Does anyone have any clues. Is Vulkan broken right now?

report it, dude

My mpv.conf is not working anymore on a fresh install. Any idea why? I created a mpv.conf in the same folder as I always did and now it's not working.