"Permission denied" with ffmpeg (via snap) on external drive

So after a lot of digging I figured the issue is with snap package manager. Apparently by default, snap can't access the media directory so we need to manually fix this.

Check if ffmpeg has access to removable-media like below

> snap connections | grep ffmpeg
desktop                   ffmpeg:desktop                             :desktop                          -
home                      ffmpeg:home                                :home                             -
network                   ffmpeg:network                             :network                          -
network-bind              ffmpeg:network-bind                        :network-bind                     -
opengl                    ffmpeg:opengl                              :opengl                           -
optical-drive             ffmpeg:optical-drive                       :optical-drive                    -
pulseaudio                ffmpeg:pulseaudio                          :pulseaudio                       -
wayland                   ffmpeg:wayland                             :wayland                          -
x11                       ffmpeg:x11                                 :x11                              -

Add that permission if it's missing

sudo snap connect ffmpeg:removable-media