Attached: mpv-easy-player-2-en-us.png (854x904, 37K)
/mpv/ - the foss media player
Andrew Campbell
William Thompson
I got a silly idea recently: what if mpv could play text files?
I think it would work like this:
>txt_hook.lua detects when mpv has been invoked on a text file
>runs the text through TTS to create an audio file
>starts playback of that audio file
maybe for bonus points also create a video stream that displays the text, and sync it with the audio file playback. This would be difficult to pull off, unless maybe I paginated it and then ran TTS individually for each page.
but what would I use to generate a video from text? I'm sure I could get some combination of ffmpeg and maybe imagemagick to do it, but could it be done with only ffmpeg?
Also the matter of TTS portability is a big problem with this idea; I don't know of any good open source / cross platform TTS options available. My prototype would probably use `say` on OSX since that has reasonable quality and a reasonable interface. But what would be best used on Linux? Last time I looked into TTS on linux the offerings were abysmal.
Cameron Jackson
Where are the links?
I need a great .conf for anime.
Jose Bell
>mpv easy player
What the hell is this? Terrible name btw
Gavin Long
looks like chinese malware. OP is a fag.
Lincoln Adams
>Terrible name btw
Don't be rude. It seems friendly. Those without the best grasp of a language tend to communicate in a manner a bit too literal and limited, so it seems stilted. But they're trying their best. It's pure.
Mason Torres
it probably turns your computer into a chinese hackbot rented out to russians so they can hack elections n shit.
Wyatt Brown
profile=gpu-hq
You're welcome.
Brayden Bennett
Which version of RAVU use? Luma only, YUV or RGB? Are the chroma ones worth?
Isaiah Brown
# Video
gpu-api=vulkan
vulkan-async-compute=yes
vd-lavc-dr=yes
profile=gpu-hq
scale=haasnsoft
cscale=haasnsoft
deband-iterations=4
deband-range=6
deband-threshold=156
deband-grain=24
temporal-dither=yes
video-sync=display-resample
glsl-shader="~~/shaders/ravu/compute/ravu-r4-rgb-smoothtest1.hook"
Ryder Robinson
>looks like chinese malware
To be fair it gets that from mpv.
Josiah Parker
Total noob here used mpc hc till yesterday, downloaded mpv and installed using the bat and works fine.Now i want to ask how do i make config files or if i can get a good basic one mainly for anime watching what i really care is to prioritize jap dub and eng sub.Thanks
Tyler Young
mpv.io
For video quality start with profile=gpu-hq and change things according to what you want and your hardware can support.
For the dub/sub track selection use:
alang=jpn,jp,ja,eng,en
slang=eng,en,jpn,jp,ja
Isaac Murphy
This is what peak performance looks like
gpu-api=d3d11
gpu-context=d3d11
hwdec=d3d11va
profile=gpu-hq
video-sync=display-resample
Asher Taylor
>gpu-context=d3d11
No need for it.
Carter King
Thanks man.
That was my default.
Christian Butler
What are all these meme settings?
Xavier Russell
>these deband settings
unironically kys
Zachary Robinson
Not him but what are some good debanding settings user?
I just downloaded and started reading about mpv.
Jaxson Ramirez
deband-iterations=2
deband-range=12
deband-threshold=48
deband-grain=0
David Fisher
deband-iterations=16
deband-range=48
deband-threshold=128
deband-grain=64
Matthew Sanders
Has that GUI been implemented yet? I haven't updated in a while. I thought they wanted to add a real GUI or something. Are there any new recommended settings?
Aaron Cook
Anyone else having problem with the sub-export script? Doesn't work for me. I'm on Linux.
Ryder King
Why are you all using gpu-hq? Isn't that pointless for your 10bit animes?
Ethan Gonzalez
>that GUI
How? Looks way nicer than default.
Connor Taylor
Is interpolation a meme or do you find it necessary
Ethan Reyes
but isn't vulkan better?
Sebastian Baker
I get slightly better frame timings with d3d11. And Vulkan still cant take scaled screenshots. With more time I think Vulkan could eventually be better.
Jose Jones
meme
Lincoln Sullivan
>no new stable for 5 months
Is it dead?
Matthew Williams
mpv --show-profile=gpu-hq
Profile gpu-hq:
scale=spline36
cscale=spline36
dscale=mitchell
dither-depth=auto
correct-downscaling=yes
sigmoid-upscaling=yes
deband=yes
Caleb Harris
github.com
> If your Xorg-server is older than ABI version 23, or your kernel is older than version 4.5, or your nvidia driver is not up to date, then you will inevitably get tearing due to the lack of PRIME buffer synchronisation.
>If your Xorg-server is older than ABI version 23
By this do they mean X.Org Video Driver or X.Org Server Extension?
[114759.147] (II) Module ABI versions:
[114759.147] X.Org ANSI C Emulation: 0.4
[114759.147] X.Org Video Driver: 23.0
[114759.147] X.Org XInput driver : 24.1
[114759.147] X.Org Server Extension : 10.0
Mason White
so MPC was just randomly giving me fucktons of unexplainable problems - would get frameskippin when my monitor was in 144hz mode, sometimes when switching between frequencies opening files would just give me a black window, and then out of god damn nowhere files were just taking forever to open.
I got mpv and I'm just using the vanilla config am I good to go? I liked the look of older anime when upscaled with madvr
Juan Campbell
No stick with MPC
Dominic Fisher
>[114759.147] X.Org Video Driver: 23.0
Pretty sure that's it.
Kayden Carter
RGB. No.
Camden Anderson
So this doesn't seem to be anywhere within the mpv manual, or I'm just a blind faggot.
As far as keybinds go, the following three, Alt-0, Alt-1 and Alt-2 rescale the video to half size, normal size and double size respectively. Those are the only options. What I basically want to do is rescale the window up or down in increments, say by 5% or 10% each way. There seem to be no options to do this whatsoever.
I'm running the video borderless, but I want to be able to resize it at will as if I was running WITH the border. What can I do? Is this an impossibility right now?
Luis Myers
is there something like this mpv-easy settings menu anywhere else? preferably without moon runes?
Juan Rogers
Alt+1 add window-scale 0.05
Alt+2 add window-scale -0.05
Henry Young
i think i might just print this shit out and stick it on my wall until I memorize them
David Scott
Well fucking shit. What do you know. You're a life saver m8. Thanks.
Bentley Richardson
my anime shader:
#Profile anime:
profile=gpu-hq
hwdec=auto-copy
deband=yes
deband-grain=0
deband-iterations=4
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
glsl-shader=~~/shaders/SSimSuperRes.glsl
glsl-shader=~~/shaders/anti-bloating.glsl
glsl-shaders=~~/shaders/adaptive-sharpen.glsl
interpolation=yes
video-sync=display-resample
tscale=oversample
sigmoid-upscaling=yes
Dylan Gray
For anime: meme
for porn: necessary
Christopher Ortiz
I want my settings to update in realtime!
Chase Wright
How much grain is too much grain?
Daniel Russell
Is there a way to make MPV youtube-dl streams buffer an unlimited (or very large) number of seconds/bytes ahead of the current position?
My internet is flaky, and it would be nice if I could buffer large chunks of video without resorting to downloading the whole file.
Wyatt Baker
>the foss media player
the fossile* media player
Use VLC
Evan Torres
Wow, talk about a coincidence. I was just about to ask a similar question regarding mpv stream buffering/lag.
Camden Powell
You can specify a cache size but I'm unsure how it interacts with ytdl
You'll have to test it for yourself
Bentley Flores
The most annoying thing is that MPV refuses to cache twitch streams to a file, so you have to reload the stream when you seek into it.
Levi Martin
That is the most annoying?
The black 2px uneven margin on the right is more annoying, as well as that strange when moving the window around issue where it loses the border and stretches to display-res but.. halfway between 2 screens..
I think they had issues open for both but either no one could fix it or the entire dev team was too lazy.
Eli Rogers
what? I've not seen this bug.
Ryan Gray
The border issue is easily reproduced by just resizing the window a ton of times and moving it around.. you'll get it at some point.
The borderless stretched bug I have not yet figured out how to reproduce, there was an user here complaining about seemingly the same issue, but that was quite a while ago.
Isaiah Moore
Oh, oh yes. I see it now. It only happens when you drag the window to resize it.
MPV's actually sort of doing the right thing here, by maintaining the video aspect ratio and not cropping it, the window won't fit perfectly around the video. By simply adding a few pixels to the border, you get to maintain the fine window resizing, as well as preserving the perfect aspect ratio without cropping.
There should be an option to turn on fuzzy scaling though, so that you can have MPV crop the video underneath the window when you resize it, or adjust the aspect ratio dynamically to a non-perfect value so that the video will fit in the window.
Nicholas Cruz
But the video stays 16:9 no? So why would it have no border on .. say 1080p but on 720p downsized? Rounding issue somewhere?
Zachary Cox
You can either make the video 16:0.1:9, or crop the bottom row of pixels off to fit under a 15.99:9 window.
It's not a rounding issue, it's the fact that you can't neatly fit a 16:9 video into a 16.01:9 window.
Lincoln Cooper
It doesn't seem to matter if I set the cache size or second limit. For whatever reason, it only buffers to 3 seconds at a time while playing, only storing more if you pause. My download speed isn't so shit that it shouldn't be able to handle the stream. Is this just the fault of youtube, or does this fall on mpv?
Zachary Lopez
MPV. It can request as much as it wants from the server, but it's not configured to do so.
Juan Foster
What do you mean? Do you mean the program itself isn't configured to, or I haven't configured it properly?
Henry Jackson
How do VLC and MPC do it then? Cut off pixels? Because the border's are always the same size on them.
Kayden Fisher
I'm not sure. My twitch playback will fill the up to 20s buffer when i give it --cache-secs=20.
It could be a ytdl issue.
Tyler Lopez
They just add big black bars to the window.
Kevin Lewis
That was my sneaking suspicion. I don't if it's just the Youtube API or whatever, but sometimes when using ytdl to download videos, it'll start the dl at near maximum download, but sink lower and lower as it goes on. I'm wondering if Youtube is just throttling on purpose, which would kinda make sense given the sheer size of the site's bandwidth.
Adrian Green
My internet is too slow for me to observe that, but it's probably your ISP, not youtube which is throttling. Try running it through a VPN and see if it changes anything.
Benjamin Myers
I highly doubt it's my ISP. Centurylink is pretty much hands off in my experience. And it makes no sense why they would arbitrarily throttle Youtube of all websites, while I routinely get max capacity on any other site (that isn't total ass anyways)
Mason Nelson
Benjamin Myers
>Centurylink
>is an American telecommunications company
Yeah nah, they're throttling your youtube.
Youtube is the first thing companies throttle because it's the largest bandwidth application on their infrastructure, and 99.99% of users wouldn't notice throttling unless they were direct downloading videos.
That MPC? I'm on Linux, so I'm not sure, but if it allows fine window resizing without tiny black bars, it must either be;
1. adjusting the aspect ratio by a small amount to force the video to fix
or
2. Cropping the video slightly to fit it in either horizontally, or vertically.
Asher Murphy
1. You can generate video of just subtitles using ffmpeg.
2. mpv can already play just the subtitle against blank screen with audio track.
Isaiah Brown
>TTS
>Text To Speech
>subtitles
Nicholas Rodriguez
oh yes! I forgot completely about subtitles.
So the problem then is how to sync the subtitles with the audio track outputted from TTS.
I think maybe the sane way to do this is to chunk the input file into chunks small enough to display on the screen, run TTS on each chunk, then concatenate each resulting audio file back into one audio stream keeping track of the timestamp at which each begins.
Brody Butler
The ultimate objective is to point mpv at an epub and have mpv display the text on the screen, start reading it to me with TTS, and let me skip through the file like I'd normally skip through a media file.
(tackling epub comes after I get this working just for plain text files. epub should be easy if I get that far.)
Owen Rivera
Wake me when it can play videos without tearing with Aero disabled
Levi Bell
>Using stable
Cameron Lopez
You could probably do it with the right config but at the same time you can't expect a smooth experience with areo disabled
Easton Morris
>using Windows 7
idiot
Dominic Martinez
No, it's not supported in MPV
But it is supported in VLC and MPC
Nathan Price
I'm not sure then, but I stand by the second part of my post.
Jonathan Jones
It is smooth in VLC and MPC with Aero disabled
Gabriel Scott
There isn't a way to play DASH videos with Widevine, right?
Jacob James
>being this retarded
Ryan Hughes
>Wincuck on a soon to be dead OS
>calling a Linux user retarded
my sides
Luke Bennett
who knows
Liam Morris
Great, now just to figure out what they mean by 'up to date' Nvidia.
Haven't noticed tearing with primusrun/optirun on Debian Stretch so far though so I think I'm good.
Jack Watson
Is deband=yes worth it? Will I actually see improvements in anime?
Austin Hall
deband-grain=0 is best
Kayden Wilson
Yes, especially in dark scenes
If you're watching 10bit anime the improvement will be less notifiable. Banding isn't really an issue now-a-days but most anime encoding groups have no idea what they're doing.
Hunter Miller
maybe yes maybe no
Justin Green
Alright, thanks. Is just putting that in the config file enough or should I tweak the deband settings more?
Justin Reyes
I wouldn't bother, the default deband settings are quite sensible.
Nolan Hernandez
Thanks.
Julian Butler
how to make mpv play all files contained in folders i drag-and-drop into it? i might just drop any other music player if it could do that simple thing
does it pretend 'there's nothing there to play' on linux too?
Matthew Walker
you're welcome
Jackson Myers
what's wrong with $ mpv folder/*?
Ryan Long
mpv * is cool enough to bother with adding it to explorer context menu
but it doesn't fucking go into the folders inside the folder and doesn't add files from those folders which is the whole fucking problem
Logan Brooks
Is there any way to use mpv to combine an srt file and an audio file into an mp4? I can't fine any way to embed srt files using mpv.
Right now I'm using ffmpeg:
#!/bin/bash
PROJECT=$1
PROJECTDIR="/tmp/mpv-txt/$PROJECT"
FRAGMENT=$2
TEXT=$3
mkdir -p $PROJECTDIR
#generate tts audio
say $TEXT -o $PROJECTDIR/tts.aiff
#generate srt file
echo "1" > $PROJECTDIR/tts.srt
echo "00:00:00.000 --> $(ffprobe -v quiet -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -sexagesimal $PROJECTDIR/tts.aiff | grep -o "[0-9]\+:[0-9]\+:[0-9]\+\.[0-9]\{1,2\}")" >> $PROJECTDIR/tts.srt
echo "$TEXT" >> $PROJECTDIR/tts.srt
#output combined srt and tts audio as an mp4
OUT="$PROJECTDIR/$PROJECT-$FRAGMENT.mp4"
ffmpeg -v quiet -i $PROJECTDIR/tts.aiff -i $PROJECTDIR/tts.srt -c:a mp3 -c:s mov_text $OUT
#add to fragment list and quit
echo $OUT >> $PROJECTDIR/fragments.txt
echo $OUT
(I don't think there is any way I can reasonably support windows. First off this will have an external dependency on either OSX's `say` or linux's `espeak`. Secondly it doesn't look like I can construct SRT files from inside a lua script so I need to use a script to do it. I could rewrite that bash script in something like python but that would add a python dependency windows users would need to resolve. And I don't see any way to use just lua to get generated subtitles into mpv without having an SRT file to load. Somebody please correct me if I'm wrong about that.)
Blake Stewart
Isn't espeak outdated as fuck?
Henry Young
(Also, the reason I'm combining the SRT and audio into a single mp4 is because I'm going to do this hundreds/thousands of times per file and then concatenate them all together at the very end. This greatly simplifies SRT file generation)
Thomas Richardson
$ find some-folder/ -type f -exec mpv {} +
profit
>explorer
die winfag
William Flores
Yeah espeak kind of sucks. It works but sounds very mechanical. But it's what exists on linux. If there's a better option I'm not familiar with it.
`say` on OSX has pretty high quality though.
In the future maybe I'll be able to incorporate support for some 'cloud' TTS solutions, provided they allow me to programmatically send them text and download audio files. But that's a low priority.
Nathan Bailey
Actually you know what, I think I'm going to pull in python as a dependency anyway because splitting the input text into sentences would be a royal pain in the ass in Lua or bash.
(Python specifically not because I like it but because most people probably already have it.)