2

Whenever I use ffmpeg inside a Python script using subprocess it doesn't work. Here is the code I am using:

import subprocess

subprocess.call('ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video1 output.mkv', shell=True)

here is the error it produces:

[video4linux2,v4l2 @ 0x1a87220] The device does not support the streaming I/O method. /dev/video1: Function not implemented

  • Pretty sure ffmpeg is not installed by default as the codec for it requires acceptance of a different license? Not entirely sure that is accurate though – maple_shaft Nov 30 '16 at 16:59
  • To rule out the pbvious does this work from the commandline? – Steve Robillard Nov 30 '16 at 17:00
  • yes it works from commandline. I am trying to run this on a raspberry pi if it makes any difference. I followed a tutorial to install ffmpeg on the Pi. – Daveyman123 Nov 30 '16 at 18:16
  • it has something to do with video4linux2 but im not sure what. I am a newb to python. can anybody help me further? – Daveyman123 Nov 30 '16 at 19:30

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.