kokolegorille
Hello everyone,
I am trying to extract thumbnail from video with waffle and ffmpeg.
I do have a transformer like this
def transform(:thumb, _) do
{:ffmpeg, fn(input, output) -> "-i #{input} -f png #{output}" end, :png}
end
but this fail with
Unable to find a suitable output format
And this fail in the console too.
$ ffmpeg -i small.mp4 -f png out_small.png
...
[NULL @ 0x7f8e93801400] Requested output format 'png' is not a suitable output format
out_small.png: Invalid argument
It looks my ffmpeg does not support png creation, as png is not listed in formats.
$ ffmpeg -formats | grep png
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.0.1.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
DE apng Animated Portable Network Graphics
D png_pipe piped png sequence
I have success using apng, or gif, but not png, nor jpg.
I guess it is my ffmpeg version which is broken. It’s the latest installed by brew, on Mac osx.
So my question is, do You have png listed in your ffmpeg formats?
Thanks in advance
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Kurisu
I have ffmpeg version 3.4.6 and it seems I have the same supported formats.
Here is the output of the command
ffmpeg -formats | grep png:kokolegorille
Thanks, so it seems it’s not only Mac
sneako
I think you just need to provide a few more arguments to your ffmpeg command and that by default, ffmpeg assumes you want to convert the video to another video format.
I am running MacOS and ffmpeg 4.2.2 as well and am able to create a thumbnail with the following command:
ffmpeg -i sample.mp4 -ss 00:00:01.000 -vframes 1 output.pngNote we tell ffmpeg to take 1 frame (with
-vframes 1), from a specific point (-ss <timestamp>) in the video.kokolegorille
Thanks for your response, I have to say I could generate png on the console, with this…
But it fails in the waffle transformation function
I suppose the :png option of waffle trigger -f png
This one work, for animated png.
hauleth
Are you sure that there are no spaces in
inputandoutput?kokolegorille
Thanks for your response,
I am quite confident with the syntax, as this is how it is written in the waffle documentation.
I thought png and jpg would be supported out of the box, but it seems not
OvermindDL1
It’s not a syntax issue they were speaking of but rather that the list form should be used as it will properly escape arguments where the string form will not.
However, running
ffmpeg -ss 01:23:45 -i some-big-video-I-have.mpeg -vframes 1 -q:v 2 output.pngworks fine here and I have the same output fromffmpeg -formats | grep pngas you do.kokolegorille
Thanks for your response, using this syntax is working for me at the command line, but not with waffle.
I still receive unable to find a suitable format when waffle tries to extract the image from the video.
OvermindDL1
Have you tried the list form in waffle though? I.E. instead of something like:
Have you tried:
Instead?
kokolegorille
Oh nice, I will try and report.