Score:0

ffmpeg can't access file

no flag

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.

guiverc avatar
cn flag
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 avatar
cn flag
Does this answer your question? [Why can't Chromium suddenly access any partition except for /home?](https://askubuntu.com/questions/1184357/why-cant-chromium-suddenly-access-any-partition-except-for-home)
guiverc avatar
cn flag
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)
no flag
@guiverc ohh I did not know that, I guess I will try to build a version from source then
llogan avatar
jp flag
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](https://stackoverflow.com/a/33766147/).
no flag
Thank you @llogan, this was just an example, i created this folder for this file, this was the only file.
Score:0
no flag

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.