0

Try to capture RTSP stream with ffmpeg. Everything goes nice, if I save video to my home folder. Can't save to another directory. ffmpeg says 'Permission denied' even directory premission is 777.
In short:

ffmpeg  -i 'rtsp://192.168.0.161:554/11' -c:v copy -an new.mp4

good

ffmpeg  -i 'rtsp://192.168.0.161:554/11' -c:v copy -an folder777/new.mp4

Ubuntu Server 18.04.02. ffmpeg snap package v.4.1.
Any suggestion?

  • 2
    Which folder are you trying to save to? There are other reasons than file permissions for getting "permission denied". – Philip Couling Feb 14 at 13:48
  • No matter which folder is. I've tried different folders and diffrrent styles (short: folder/new.mp4; full: /home/user/folder/new.mp4) It can write to home folder (/home/user/) only. What reasons are you talking about? I'd like to listen it. – Роман Голдованський Feb 16 at 23:53
  • 2
    You've missed my point. There are certain things like fusermount that can cause "permission denied" even when file permissions allow. The fact this is a snap package already makes me suspicious this is a mounting issue. Please add an example of where you are trying. Also copy the exact message from the command line. "Permission denied" is rarely printed on a line on its own. If you are doing anything to change user at your terminal, beyond your regular login please state that also. – Philip Couling Feb 17 at 9:38
  • 1
    You're right, Philip. It's a mounting issue. I've tried to change folder which is located at the same drive as home folder. And it works. I've used defaults in fstab mounting (ext4). Still finding solution by trying different mount options, but your help is very valuable. Thx a lot. – Роман Голдованський Feb 18 at 9:29
  • 1
    SOLVED! Have to "snap connect" interface removable-media. – Роман Голдованський Feb 18 at 12:01
0

The thing is I've tried to save video to the folders located at mounted partition. And my snap package have no connection to interface "removable-media". After connection everything works great.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.