[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
I'm following http://blog.pkh.me/p/21-high-qualit y-gif
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /wsr/ - Worksafe Requests

Thread replies: 5
Thread images: 1
File: Pepe_pls.png (203 KB, 499x499) Image search: [Google]
Pepe_pls.png
203 KB, 499x499
I'm following http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html

Made the script but got $ /tmp/palette.png: No such file or directory
How do I generate this file?
>>
I generated it, now I'm stuck on...
It is unlikely that you will encode a complete movie, so you might be tempted to use -ss and -t (or similar) options to select a segment. If you do that, be very sure to have both as input options (before the -i). For example:
script
If you don't, it will cause problem at least for the first pass where the output will never have more than one frame (the palette), so that won't do what you want.

That's what's happening. I changed the script -ss to a time within my video and -t to 6 seconds (also valid), it doesn't work, the gif doesn't get created, the file does but it "contains errors". I open the video by itself and get one frame (the palette).
>>
Output for $ ./gifenc.sh video.mp4 is:
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
/tmp/palette.png: No such file or directory

The script:
#!/bin/sh

start_time=2:20
duration=6

palette="/tmp/palette.png"

filters="fps=15,scale=320:-1:flags=lanczos"

ffmpeg -v warning -ss $start_time -t $duration -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -ss $start_time -t $duration -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $1
>>
>>82116
You gave it a video but not a output file
Try
>$ ./gifenc.sh video.mp4 output.gif

and turn
>
ffmpeg -v warning -ss $start_time -t $duration -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $1
into
>
ffmpeg -v warning -ss $start_time -t $duration -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
>>
>>82124
Thanks, I changed it to $2 and added output.gif and got:
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
/tmp/palette.png: No such file or directory

So I opened the video again by itself with mpv and the palette came up for one frame.
Thread replies: 5
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.