Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to Load Video from HDFS into Spark, Extraction of Image Frames, Inverting and then again loading to HDFS

How to Load Video from HDFS into Spark, Extraction of Image Frames, Inverting and then again loading to HDFS

New Contributor

Hi

I have started developing a python application where I have to perform following tasks in sequence:

1) Load the Video (*.avi / *.mp4 etc.) from HDFS into Spark (without saving it into local PC which is an overhead)

2) Inside Spark Job (using CV2 functions), extract image frames from loaded video.

3) Perform any transformation on the extracted image like Invert the Image frames.

4) Store the Inverted frames back to HDFS


From above steps, I have code to :

- extract the image frames from video using CV2

- Inverting the image frame using PIL.ImageOps


Seeking solutions for Step 1 and using CV2 with Spark because the code which I use to extract frames is in CV2 which should be integrated with Spark.


Any idea or suggestion would be very helpful.

Don't have an account?
Coming from Hortonworks? Activate your account here