Kein solches Eingabeformat: MJPEG

Kein solches Eingabeformat: MJPEG

Ich möchte das Pixelformat meiner Kamera von YUYV in MJPEG konvertieren. Ich habe versucht, dies zu tun, v4l-utilsaber als ich diesen Befehl im Terminal eingegeben habe, passierte Folgendes:

ffmpeg -f video4linux2 -pixel_format MJPEG -i /dev/video0

aber wenn ich das hier bekomme:

ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
  configuration: 
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
[video4linux2,v4l2 @ 0x1aa4380] No such input format: MJPEG.
/dev/video0: Invalid argument

Was ist also falsch und was kann ich tun, um das Problem zu beheben?

Antwort1

-pixel_formatVerwenden Sie stattdessen -vcodecFolgendes:

ffmpeg -f video4linux2 -vcodec MJPEG -i /dev/video0

verwandte Informationen