Comments (5)
https://github.com/wm4/mpv-scripts/blob/master/auto-profiles.lua#L20
from mpv-config.
@Argon- It still doesn't explain what math.huge or -math.huge is.
from mpv-config.
http://lua-users.org/wiki/MathLibraryTutorial
from mpv-config.
@Argon- Why do we put an infinity number there? If I put 0 in that block, it will apply the profile which shouldn't be applied.
It applied 2 profiles here:
[auto_profiles] Applying profile SD
Playing: /home/laichiaheng/影片/電影&短片/八惡人/The Hateful Eight.mkv
[lavf] Using subtitle charset: utf-16le
(+) Video --vid=1 (*) 'The.Hateful.Eight.2015.1080p.BluRay.x264.DTS-HD.MA.5.1-RARBG' (h264 1920x704 23.976fps)
Video --vid=2 [P] 'cover_land.jpg' (mjpeg)
Video --vid=3 [P] 'small_cover.jpg' (mjpeg)
Video --vid=4 [P] 'small_cover_land.jpg' (mjpeg)
Video --vid=5 [P] 'cover.jpg' (mjpeg)
(+) Audio --aid=1 --alang=eng (*) 'The.Hateful.Eight.2015.1080p.BluRay.x264.DTS-HD.MA.5.1-RARBG' (dts 6ch 48000Hz)
Subs --sid=1 --slang=eng (*) 'English-SDH-PGS' (hdmv_pgs_subtitle)
Subs --sid=2 --slang=spa 'Spanish-PGS' (hdmv_pgs_subtitle)
(+) Subs --sid=3 '.The Hateful Eight.srt' (subrip) (external)
File tags:
Title: RARBG.COM - The.Hateful.Eight.2015.1080p.BluRay.x264.DTS-HD.MA.5.1-RARBG
AO: [pulse] 48000Hz 5.1(side) 6ch s32
[auto_profiles] Applying profile HDravu
Using hardware decoding (vaapi-copy).
VO: [opengl] 1920x704 nv12
[vo/opengl] after rendering: OpenGL error INVALID_OPERATION.
[vo/opengl] after rendering: OpenGL error INVALID_OPERATION.
[vo/opengl] after rendering: OpenGL error INVALID_OPERATION.
[vo/opengl] after rendering: OpenGL error INVALID_OPERATION.
AV: 00:00:00 / 02:47:44 (0%) A-V: -0.004 DS: 2.636/1
[osd/libass] fontselect: Using default font family: (Source Sans Pro, 400, 0) -> /usr/share/fonts/noto/NotoSansCJK-DemiLight.ttc, 3, NotoSansCJKtc-DemiLight
[osd/libass] fontselect: Using default font family: (Source Sans Pro, 700, 0) -> /usr/share/fonts/noto/NotoSansCJK-Black.ttc, 3, NotoSansCJKtc-Black
AV: 00:00:02 / 02:47:44 (0%) A-V: 0.003 DS: 2.552/1
My profile:
[UHD30]
profile-desc=cond:get('height', 0) > 1080 and get('container-fps', 0) >24
hwdec=vaapi
[UHD24]
profile-desc=cond:get('height', 0) > 1080 and get('container-fps', 0) <=24
interpolation
tscale=catmull_rom
hwdec=vaapi
[FHDoff]
profile-desc=cond:get('height', 0) <= 1080 and get('height', 0) >=800 and get('container-fps', 0) >= 59
profile=opengl-hq
hwdec=no
[FHDon]
profile-desc=cond:get('height', 0) <= 1080 and get('height', 0) >=800 and get('container-fps', 0) < 59
profile=opengl-hq
hwdec=vaapi-copy
[HDnormal]
profile-desc=cond:get('height', 0) <= 720 and get('height', 0) > 576 and get('container-fps', 0) >= 59
hwdec=vaapi
profile=opengl-hq
[HDravu]
profile-desc=cond:get('height', 0) <= 720 and get('height', 0) > 576 and get('container-fps', 0) < 59
hwdec=vaapi-copy
deband
opengl-shaders='/home/laichiaheng/.config/mpv/shaders/ravu-r3.hook'
[SD]
profile-desc=cond:get('height', 0) <= 576
deband
hwdec=vaapi-copy
opengl-shaders='/home/laichiaheng/.config/mpv/shaders/ravu-r3.hook'
from mpv-config.
Why? Well, because I want it to be that way.
When you put a default value that will satisfy the condition, it instantly gets applied. When you do this, you also need an "inverse" profile with inverted conditions that can reverse what an applied profile did (see my 4K and 4K-inverted).
See your [SD]
profile. It will always get activated as it's run before the file is loaded. It will set the ravu shader but this is never removed.
Example: you open a file. Profiles are evaluated and your SD is true by default, so it gets applied and its options get set.
Now the file is loaded, file information present and therefore profiles are re-evaluated. Let's assume we have a 4K file with 60fps. Consequently, [UHD30]
gets applied. It changes hwdec
but deband
and opengl-shaders
are still set.
from mpv-config.
Related Issues (17)
- 关于使用问题 HOT 1
- Only symbolic links in /shaders HOT 1
- Aspect ratio
- Code for decrease/increase pan-and-scan range and change aspect ratio HOT 2
- betterchapters.lua -- wrong keybind names HOT 4
- Some questions about betterchapters HOT 9
- Is this config still useable? HOT 4
- --gapless-audio=yes overidden? HOT 2
- What program are you referring with "/usr/local/bin/resolution"? HOT 3
- Where do i place these? HOT 1
- i'm having issues with OSC HOT 1
- OSD problems HOT 1
- fonts.conf HOT 2
- Location detection in OS X HOT 1
- How to make the window on top automatically? HOT 7
- Some files are just links, not real files. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpv-config.