0

I have seen this problem several times here or in other forums, usually user could not access the home folder. I have no problem with the home folder, ffmpeg works just fine there. But in my folder on level / (/myFolder/) I can not make ffmpeg work. So my command is:

ffmpeg -hwaccel cuvid -c:v h264_cuvid -i *.mkv -vf "hwdownload,format=nv12" -start_number 0 -vsync vfr -q:v 1 images/%07d.jpg

And the output is:

myVideo.mkv: No such file or directory

so it even resolves *.mkv to the actual video name. If I copy this video and the images folder to another location in my home folder and use the command there, it works like a charm.

For test purposes I already did several things which solved similar problems for other people

  • snap install ffmpeg --devmode (version n4.3.1)
  • chmod 777 -R /myFolder (I know it is a bad idea, this is a personal pc and I will change it again)
  • chown myuser -R /myFolder
  • went to the Ubuntu Software -> FFMPEG and activated all permissions
  • execute ffmpeg with sudo

The error message did not change in any kind of way. I use Ubuntu 18.04 with ffmpeg n4.3.1 installed via snap, I can't install it via apt since the version is too old and has no cuda support.

I am happy for every hint.

  • Confined snaps can only access $HOME, and if removable-media is flagged, also /media & /mnt, however other directories are not seen due to the restricted nature of confined snaps. This is intentional; though Classic snaps do see your whole file-system (they run in a lower security model) See https://askubuntu.com/questions/1184357/why-cant-chromium-suddenly-access-any-partition-except-for-home for some clues – guiverc Jun 10 '21 at 10:31
  • 1
  • If the snap isn't compiled to allow --devmode, you can't force it I believe.. which is what you're attempting (and --devmode only works for alpha & beta channels https://snapcraft.io/docs/channels) – guiverc Jun 10 '21 at 10:38
  • @guiverc ohh I did not know that, I guess I will try to build a version from source then – user2267367 Jun 10 '21 at 11:40
  • 1
    Do not use -i *.mkv. It will overwrite your files. For example, the current directory contains 1.mkv, 2.mkv, 3.mkv. The command ffmpeg -i *.mkv output.foo will actually execute as ffmpeg -i 1.mkv 2.mkv 3.mkv output.foo. This means 1.mkv is the only input and all the rest of the .mkv files are interpreted as output files. Use a for loop instead. – llogan Jun 10 '21 at 19:45
  • Thank you @llogan, this was just an example, i created this folder for this file, this was the only file. – user2267367 Jun 13 '21 at 20:28

1 Answers1

0

Like guiverc pointed out, apparently snap installed apps can only access $Home. Therefore I compiled and installed FFMPEG by myself, everything works fine now.