Following up on the Pachyderm beginner tutorial, in this quick demo we will analyse a video using ffmpeg.
Let's first create a repo and put a video file into it.
pachctl create repo videos
pachctl put file videos@master:redfox.webm -f https://upload.wikimedia.org/wikipedia/commons/a/a9/Red_fox_%28Vulpes_vulpes%29_looking_for_a_mouse.webm
Next we'll create a pipeline to extract frames from the video using ffmpeg. We will extract only 5 frames per second to limit computation in later pipelines.
pachctl create pipeline -f images.json
Now inspect if the pipeline has run in Pachyderm and then check out a single frame:
pachctl get file images@master:thumb0001.jpg | open -f -a /Applications/Preview.app
Now let's reuse the edge detection pipeline from the Pachyderm beginner tutorial:
pachctl create pipeline -f https://raw.githubusercontent.com/pachyderm/pachyderm/master/examples/opencv/edges.json
Again, inspect when the pipeline has run and then check out a single frame:
pachctl get file edges@master:thumb0001.png | open -f -a /Applications/Preview.app
As the last pipeline, we will stich the edge-detected frames back together using ffmpeg again:
pachctl create pipeline -f edge_video.json
Now once this one is done we can download the resulting video:
pachctl get file video@master:video.mp4