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.
Do you already have a solution for step 1?