Conversation
Notices
-
Embed this notice
.config/mpv/scripts-storage/mpv-gallery-view/scripts/gallery-thumbgen.lua: --if only fucking ffmpeg supported percent-style seeking
-
Embed this notice
@Zergling_man Unfortunately, current video formats do not encode a "percent" field, or even an exact playback position (you can only really fully decode keyframes - frames between are just pixel differences), so getting a percentage of a video is guesswork.
-
Embed this notice
@kamehamic That's probably how it works.
-
Embed this notice
@Zergling_man Do the math heh, get duration, convert to seconds and "do the percent on those".
-
Embed this notice
@Zergling_man @butterdog @kamehamic >chatGPT is a proprietrary anti-privacy frontend for stackexchange
-
Embed this notice
@butterdog @kamehamic No, it's just a retarded premise. The thing doesn't know anything about programming, and it can't even correctly feed you the output of blog/forum posts.
-
Embed this notice
@Zergling_man @kamehamic it didn't work? lol
it's helped me with some very complicated ffmpeg command before and be correct every time. I use phind.com
-
Embed this notice
@Zergling_man @kamehamic chat gpt says this;
# Calculate video duration
duration=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 input.mp4)
# Calculate timestamp for 50% duration
percentage=50
timestamp=$(echo "scale=9; $duration * ($percentage / 100)" | bc)
# Take screenshot
ffmpeg -i input.mp4 -ss "$timestamp" -frames:v 1 output_50percent.png
-
Embed this notice
@butterdog @kamehamic Why would you even bother asking a robot?
-
Embed this notice
@Zergling_man Yes, but you likely won't land on the same frame if you seeked from the very start of the video, vs halfway through due to rounding.
-
Embed this notice
@Suiseiseki It already lets you seek by timestamp, as long as it can accurately determine duration (which I won't assume it can, but it thinks it can), it can internally translate a percentage into a timestamp and seek on it.