/t/ - Technology

Discussion of Technology

Index Catalog Archive Bottom Refresh
+
-
Options
Subject
Message

Max message length: 0/12000

files

Max file size: 32.00 MB

Total max file size: 50.00 MB

Max files: 5

Supported file types: GIF, JPG, PNG, WebM, OGG, and more

CAPTCHA
E-mail
Password

(used to delete files and posts)

Misc

Remember to follow the Rules

The backup domains are located at 8chan.se and 8chan.cc. TOR access can be found here, or you can access the TOR portal from the clearnet at Redchannit 3.0.

.se is back up
.moe has intermittent downtime due to DDoS

Archival System Enabled
No More Thread Transfers


8chan.moe is a hobby project with no affiliation whatsoever to the administration of any other "8chan" site, past or present.

You may also be interested in: AI

Anonymous 04/18/2025 (Fri) 12:24:15 No. 17937
mpv ffmpeg yt-dlp
I doubt someone like ikadev would ever use discord of all things
>>21629 it feels more like obsession than love
>>21653 love is subjective and has multiple meanings obsession my memory plays role here i keep distance but your posts are distinct
>>21646 Cord posts are shitposts lmao
Is baking subs into a webm on ffmpeg in windows from a file's internal subs still cancer? Last time I learned how to do it I had to add more shit to the environment variables and then had to retype the timestamps in milliseconds and respecify the file to point to the subs with nested //// for each / on the file path. It was absolute cancer. Is it better now?
>>21824 Less cancerous still requires slashes.
>>21844 How much less cancer? Do I not need a ffmpeg font folder added to the environment variables or a second timestamp for the subs in milliseconds seperate from the timestamps I'm already using for the video and audio?
>>21824 maybe try ffmpeg in wsl as a possible workaround. or even better, abandon wintardism altogether.
>>21853 See for yourself and report back.
thoughts on kdenlive?
>>22003 bloat
>>22015 agreed. i get by using ffmpeg cli only. i never used it, but if i needed a ui to preview things, i would try paul's lavfi-preview: https://github.com/richardpl/lavfi-preview
sox can do fm synthesis so no
>>22138 <being retardedly broken internally for using integral samples is okay. fm synthesis is much more relevant. lol
someone asked in 4jeet if it's possible to un-pause with fade-in. here is a solution: function pause_toggle() local paused = mp.get_property_native("pause") if not paused then mp.set_property_native("pause", true) else -- un-spause with fade-in effect -- fade in steps, going from step initial value to 0 local step = 25 -- pre-fade-in volume gain local gain = mp.get_property_native("volume-gain") -- timer updating every 0.1 seconds timer = mp.add_periodic_timer(0.1, function() -- set fade-in gain. in the last callback, step will be 0, restoring gain to its original value. mp.set_property_native("volume-gain", gain - step * 0.5) if paused then -- un-pause AFTER setting first fade-in gain mp.set_property_native("pause", false) paused = false end -- done if step is 0 if step == 0 then timer:kill() end step = step - 1 end) end end mp.add_forced_key_binding("SPACE", "key_space", pause_toggle)
>>22268 What should I do with this?
>>22319 i didn't realize you never used lua scripts before. you add it to a lua script file (a new one in this case). script files go under a scripts directory under your configuration directory. you also need local mp = require("mp") above that code. so, if your configuration file path is ~/.mpv/mpv.conf, then you can add a script file ~/.mpv/scripts/rc.lua with the content: local mp = require("mp") function pause_toggle() local paused = mp.get_property_native("pause") if not paused then mp.set_property_native("pause", true) else -- un-spause with fade-in effect -- fade in steps, going from step initial value to 0 local step = 25 -- pre-fade-in volume gain local gain = mp.get_property_native("volume-gain") -- timer updating every 0.1 seconds timer = mp.add_periodic_timer(0.1, function() -- set fade-in gain. in the last callback, step will be 0, restoring gain to its original value. mp.set_property_native("volume-gain", gain - step * 0.5) if paused then -- un-pause AFTER setting first fade-in gain mp.set_property_native("pause", false) paused = false end -- done if step is 0 if step == 0 then timer:kill() end step = step - 1 end) end end mp.add_forced_key_binding("SPACE", "key_space", pause_toggle)
>>22320 I did this yesterday and still the same, also, I use lua scripts since 2021
>>22326 well, describe the problem you're having. does the volume not fade in when you press SPACE to un-pause? how does it not work? try adding this (middle) line for debugging: -- set fade-in gain. in the last callback, step will be 0, restoring gain to its original value. mp.commandv("print-text", "setting volume gain to ".. gain - step * 0.5) mp.set_property_native("volume-gain", gain - step * 0.5) you should see messages printed to the terminal about setting volume gain for 2.5 seconds after un-pausing.
>>22333 In the first place, I use windows10 and when after I made the script all my videos just ear rape me after some seconds, and the "fade" effect doesn't work at all...
>>22372 >I made the script all my videos just ear rape me so, assuming the script is actually running, but not having the desirable effect, what debug messages do you see? you can see them with the console (pressing `) if you don't have a terminal open. --- i can adjust the script to use "volume" instead of "volume-gain". but i'm interested why it doesn't work as expected first.
>>22003 use aviutl
>>22372 maybe you're long gone anon. but i ran into the behavior you described. it was caused by pausing/un-pausing while a previous fade-in was still in progress. fixed version: function pause_toggle() local paused = mp.get_property_native("pause") if not paused then mp.set_property_native("pause", true) else if timer then mp.commandv("print-text", "fade-in in progress") mp.set_property_native("pause", false) else -- un-pause with fade-in effect -- fade in steps, going from step initial value to 0 local step = 25 local timeout = 0.1 local total_period = step * timeout -- pre-fade-in volume gain local gain = mp.get_property_native("volume-gain") -- timer updating every 0.1 seconds timer = mp.add_periodic_timer(timeout, function() -- make sure we don't get stuck looping if other pauses take place while fading in. -- set fade-in gain. in the last callback, step will be 0, restoring gain to its original value. mp.set_property_native("volume-gain", gain - step * 0.5) if paused then -- un-pause AFTER setting first fade-in gain mp.set_property_native("pause", false) paused = false end if step <= 0 then timer:kill() return end step = step - 1 end) mp.add_timeout(total_period + 2 * timeout, function() timer = nil end) end end end mp.add_forced_key_binding("SPACE", "key_space", pause_toggle)
>>22660 and obviously, you can change `step = 25` to `step = 10` and `gain - step * 0.5` to `gain - step * 1.0` for a faster fade-in effect, or adjust the parameters however you like.
>>22660 >Lua error: D:/Programs/mpv/scripts/fade.lua:28: attempt to index global 'timer' (a nil value) It's impossible, I give up...
>>22705 OK, now the fade in unpause is working, now how can I add a "fade away" effect?
>>22709 delayed pausing feels like a weird thing to want. but here you go: function pause_toggle() original_volume_gain = original_volume_gain or mp.get_property_native("volume-gain") local paused = mp.get_property_native("pause") if timer then mp.commandv("print-text", "kill fade-in or fade-out is in progress") niler:kill() if timer then -- in case it was just nil-ed timer:kill() timer = nil end niler = nil end local step = 10 local timeout = 0.05 local total_period = step * timeout local multiplier = 2.0 -- value between 0.25 and 2.0 local gain = original_volume_gain if not paused then local to_step = 1 timer = mp.add_periodic_timer(timeout, function() mp.set_property_native("volume-gain", gain - to_step * multiplier) if to_step == step then mp.set_property_native("pause", true) -- restore original gain while paused mp.set_property_native("volume-gain", gain) paused = true timer:kill() return end to_step = to_step + 1 end) else timer = mp.add_periodic_timer(timeout, function() mp.set_property_native("volume-gain", gain - step * multiplier) if paused then mp.set_property_native("pause", false) paused = false end if step <= 0 then timer:kill() return end
[Expand Post] step = step - 1 end) end niler = mp.add_timeout(total_period + 2 * timeout, function() timer = nil original_volume_gain = nil end) end mp.add_forced_key_binding("SPACE", "key_space", pause_toggle)
>>22717 meh, that ''details' is a parsing bug. raw code: https://paste.rs/QP9AL'
>>22717 meh, that ''details' is a parsing bug. raw code: https://paste.rs/QP9AL
(236.63 KB 1100x1700 1735972305555569.jpg)

>>22717 Thank you very much, that's exactly what I wanted. It sounds like the Musicbee fade out/fade in effects. >>22717
>>22729 you're welcome.
Is there a way to make disable a script, other than removing it from the scripts folder?
>>22917 you can rename the script file by appending a ".disable" extension to it. you can alternatively hide the file by renaming it to ".script_name.lua". the script list code explicitly checks against the dot in the start of the file name, irrespective of platform, which is a great hidden 😏 non-windows(ism). but a developer might get butt-hurt and fix that. so don't rely on that continuing to work forever. i would do neither, and just a create a "scripts.disable" folder and move script files from/to it.
nigger


Forms
Delete
Report
Quick Reply
Drag files here to upload or
click here to select them
No Cookies?
0