Rich_Morin
I want to extract selected images from downloaded video files. I’d like to know whether Membrane is a reasonable tool for this job, whether anyone else has done similar tasks with it, etc. I’m also unsure about how its “pipeline” approach would fit a “random access” use case.
For purposes of discussion, assume that I’ll be using VLC media player to download videos from web sites such as YouTube, storing them as MP4 files. Because I’ll be processing the images, I’d like to get them into Nx tensor format.
Can someone give me some advice, clues, and/or suggestions?
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
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted”
Version...
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
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
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
Latest Membrane Threads
Latest on Elixir Forum
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
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
kwando
I would use ffmpeg to extract images from the video files. Could probably skip VLC and use ffmpeg directly as well.
Then loading the extracted images from disk and do whatever I have to do in nx
Probably not gonna be the most efficient way of doing it, but might be good enough
No idea on how membrane works.
kokolegorille
I am also using ffmpeg to extract images from video, there is a ffmpex wrapper, but I wrote a simple one.
Membrane is good if You want to receive or stream rtmp, or webrtc…
But for YT, I would check this python package, and maybe use erlport to interface python script.
https://github.com/pytube/pytube
There are tools to transform images from/to nx…
by @kip
and
by @cocoa
Rich_Morin
It seems like FFmpeg only extracts images in PNG format. This might work well with ExPNG, but I think I’ll want to get them into Nx format at some point. Suggestions?
kokolegorille
It can use more format… like jpg. But if You want them in nx, the 2 packages have a to_nx() function.
kwando
The wonderful image library can load images and convert them to/from tensors
Edit: didn’t notice you already got this suggestion;)
kip
As of image version 0.21.0 which I just published you can leverage the Evision.VideoCapture module to extract images from a video.
You can therefore use either the more idiomatic API in Image.Video or simply leverage the code that is there to use
Evisiondirectly.Depending on the codec support of the OpenCV installation on your system I suspect you may not need to use the FFMEG CLI approach any more.
Example using Image
Example using Evision directly
Using images in Nx
Both
ImageandEvisionsupport zero-copy “export” of images toNx. Just callImage.to_nx/1orEvision.Mat.to_nx/1as appropriate.