Recherche avancée

Médias (91)

Autres articles (28)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (5172)

  • How to add arbitrary or custom metadata in MP4 ?

    13 avril 2021, par 大大大大萝卜凉

    The MP4 muxer in ffmpeg only allows certain metadata by default. I would like to add :

    


    com.android.model: Mi 10 Pro
xyz: +22.9835+113.3621/
com.android.version: 1
com.android.manufacturer: Xiaomi


    


    How can I add this with ffmpeg ?

    


  • ffmpeg : single frame from video is highly overexposed image

    9 avril 2021, par mcgregor94086

    I am using ffmpeg on a Raspberry Pi 400, attached to a camera array to capture one image from each camera.

    


    Most images generated are highly overexposed and washed out. I am trying to understand which command line options I should set to prevent this over exposure.
    
Sample grossly over exposed image

    


    Are there options I need to set for the camera to automatically set the right exposure, or some way to set the length of an exposure as opposed to just a "frame" ?

    


    Also, each image is taking about 3 to 4 seconds to capture. I just want to capture the first possible frame and that's it. Is there a set of options which would capture the image is less time ?

    


    /usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video0 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam00.jpg
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 672949.710856, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x184adb0] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam00.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=1.0 q=3.7 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.39x    
video:37kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video0 image in: 3 seconds
linux_capture_photo_and_return_image_path( /dev/video0 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 1 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam00.jpg
1 /dev/video0: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam00.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video2 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam02.jpg
Input #0, video4linux2,v4l2, from '/dev/video2':
  Duration: N/A, start: 672958.327329, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x1d27db0] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam02.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=0.9 q=8.6 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.374x    
video:136kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video2 image in: 4 seconds
linux_capture_photo_and_return_image_path( /dev/video2 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 2 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam02.jpg
2 /dev/video2: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam02.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video4 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam04.jpg
Input #0, video4linux2,v4l2, from '/dev/video4':
  Duration: N/A, start: 672963.021864, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x10bedb0] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam04.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=1.0 q=3.7 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.389x    
video:42kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video4 image in: 4 seconds
linux_capture_photo_and_return_image_path( /dev/video4 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 3 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam04.jpg
3 /dev/video4: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam04.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video6 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam06.jpg
Input #0, video4linux2,v4l2, from '/dev/video6':
  Duration: N/A, start: 672967.663385, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x24e4db0] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam06.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=0.9 q=8.2 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.352x    
video:126kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video6 image in: 4 seconds
linux_capture_photo_and_return_image_path( /dev/video6 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 4 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam06.jpg
4 /dev/video6: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam06.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video8 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam08.jpg
Input #0, video4linux2,v4l2, from '/dev/video8':
  Duration: N/A, start: 672972.189025, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x13fadb0] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam08.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=0.9 q=9.1 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.352x    
video:154kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video8 image in: 3 seconds
linux_capture_photo_and_return_image_path( /dev/video8 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 5 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam08.jpg
5 /dev/video8: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam08.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video17 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam17.jpg
Input #0, video4linux2,v4l2, from '/dev/video17':
  Duration: N/A, start: 672976.730667, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0xae6e20] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam17.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=0.9 q=8.7 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.353x    
video:164kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video17 image in: 4 seconds
linux_capture_photo_and_return_image_path( /dev/video17 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 6 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam17.jpg
6 /dev/video17: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam17.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video19 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam19.jpg
Input #0, video4linux2,v4l2, from '/dev/video19':
  Duration: N/A, start: 672981.425451, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x15a7e20] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam19.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=1.0 q=3.2 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.391x    
video:40kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video19 image in: 4 seconds
linux_capture_photo_and_return_image_path( /dev/video19 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 7 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam19.jpg
7 /dev/video19: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam19.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video21 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam21.jpg
Input #0, video4linux2,v4l2, from '/dev/video21':
  Duration: N/A, start: 672986.050603, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x1722e20] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam21.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=1.0 q=7.8 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.388x    
video:119kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video21 image in: 4 seconds
linux_capture_photo_and_return_image_path( /dev/video21 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 8 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam21.jpg
8 /dev/video21: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam21.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video23 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam23.jpg
Input #0, video4linux2,v4l2, from '/dev/video23':
  Duration: N/A, start: 672990.712888, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x19f4e20] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam23.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=1.0 q=3.4 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.389x    
video:42kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video23 image in: 4 seconds
linux_capture_photo_and_return_image_path( /dev/video23 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 9 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam23.jpg
9 /dev/video23: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam23.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video25 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam25.jpg
Input #0, video4linux2,v4l2, from '/dev/video25':
  Duration: N/A, start: 672995.359539, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x9d7e20] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam25.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=0.9 q=8.4 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.369x    
video:146kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video25 image in: 4 seconds
linux_capture_photo_and_return_image_path( /dev/video25 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 10 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam25.jpg
10 /dev/video25: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam25.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video27 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam27.jpg
Input #0, video4linux2,v4l2, from '/dev/video27':
  Duration: N/A, start: 673000.069328, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x1f90e20] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam27.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=1.0 q=3.9 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.382x    
video:135kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video27 image in: 4 seconds
linux_capture_photo_and_return_image_path( /dev/video27 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 11 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam27.jpg
11 /dev/video27: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam27.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video29 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam29.jpg
Input #0, video4linux2,v4l2, from '/dev/video29':
  Duration: N/A, start: 673004.676618, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x22dde20] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam29.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=1.0 q=9.3 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.385x    
video:165kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video29 image in: 4 seconds
linux_capture_photo_and_return_image_path( /dev/video29 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 12 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam29.jpg
12 /dev/video29: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam29.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video31 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam31.jpg
Input #0, video4linux2,v4l2, from '/dev/video31':
  Duration: N/A, start: 673009.555417, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x22f5e20] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam31.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=0.8 q=8.6 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=0.335x    
video:141kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video31 image in: 4 seconds
linux_capture_photo_and_return_image_path( /dev/video31 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 13 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam31.jpg
13 /dev/video31: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam31.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video33 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam33.jpg
Input #0, video4linux2,v4l2, from '/dev/video33':
  Duration: N/A, start: 673014.171570, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x6d4e20] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam33.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=0.9 q=9.7 Lsize=N/A time=00:00:00.20 bitrate=N/A speed=0.172x    
video:156kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video33 image in: 3 seconds
linux_capture_photo_and_return_image_path( /dev/video33 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 14 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam33.jpg
14 /dev/video33: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam33.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video35 -frames:v 1 -f image2 /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam35.jpg
Input #0, video4linux2,v4l2, from '/dev/video35':
  Duration: N/A, start: 673018.565769, bitrate: 165888 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x1667e20] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam35.jpg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
frame=    1 fps=0.8 q=9.8 Lsize=N/A time=00:00:00.20 bitrate=N/A speed=0.167x    
video:148kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Captured /dev/video35 image in: 3 seconds
linux_capture_photo_and_return_image_path( /dev/video35 , /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/ , 15 ) RETURNS /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam35.jpg
15 /dev/video35: /var/www/html/sonascan/data/scans/10000000e1f45394/20210405184504/SonaCam35.jpg
/usr/bin/ffmpeg -y -hide_banner -ss 0:0:0 -r 15 -s 1920x1080 -f video4linux2 -i /dev/video37 -frames:v 1 -f image2



    


    $ v4l2-ctl --all
Driver Info:
    Driver name      : uvcvideo
    Card type        : FHD Camera: FHD Camera
    Bus info         : usb-0000:01:00.0-1.2.1.1
    Driver version   : 5.10.17
    Capabilities     : 0x84a00001
        Video Capture
        Metadata Capture
        Streaming
        Extended Pix Format
        Device Capabilities
    Device Caps      : 0x04200001
        Video Capture
        Streaming
        Extended Pix Format
Media Driver Info:
    Driver name      : uvcvideo
    Model            : FHD Camera: FHD Camera
    Serial           : 
    Bus info         : usb-0000:01:00.0-1.2.1.1
    Media version    : 5.10.17
    Hardware revision: 0x00000001 (1)
    Driver version   : 5.10.17
Interface Info:
    ID               : 0x03000002
    Type             : V4L Video
Entity Info:
    ID               : 0x00000001 (1)
    Name             : FHD Camera: FHD Camera
    Function         : V4L2 I/O
    Flags         : default
    Pad 0x01000007   : 0: Sink
      Link 0x02000013: from remote pad 0x100000a of entity 'Extension 4': Data, Enabled, Immutable
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
    Width/Height      : 1920/1080
    Pixel Format      : 'YUYV' (YUYV 4:2:2)
    Field             : None
    Bytes per Line    : 3840
    Size Image        : 4147200
    Colorspace        : sRGB
    Transfer Function : Rec. 709
    YCbCr/HSV Encoding: ITU-R 601
    Quantization      : Default (maps to Limited Range)
    Flags             : 
Crop Capability Video Capture:
    Bounds      : Left 0, Top 0, Width 1920, Height 1080
    Default     : Left 0, Top 0, Width 1920, Height 1080
    Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 1920, Height 1080, Flags: 
Selection: crop_bounds, Left 0, Top 0, Width 1920, Height 1080, Flags: 
Streaming Parameters Video Capture:
    Capabilities     : timeperframe
    Frames per second: 5.000 (5/1)
    Read buffers     : 0
                     brightness 0x00980900 (int)    : min=0 max=255 step=1 default=128 value=128
                       contrast 0x00980901 (int)    : min=0 max=255 step=1 default=30 value=30
                     saturation 0x00980902 (int)    : min=0 max=100 step=1 default=64 value=64
                            hue 0x00980903 (int)    : min=-180 max=180 step=1 default=0 value=0
 white_balance_temperature_auto 0x0098090c (bool)   : default=1 value=1
                          gamma 0x00980910 (int)    : min=90 max=150 step=1 default=120 value=120
                           gain 0x00980913 (int)    : min=4 max=8 step=1 default=5 value=5
           power_line_frequency 0x00980918 (menu)   : min=0 max=2 default=1 value=1
      white_balance_temperature 0x0098091a (int)    : min=2800 max=6500 step=1 default=4000 value=4000 flags=inactive
                      sharpness 0x0098091b (int)    : min=0 max=7 step=1 default=2 value=2
         backlight_compensation 0x0098091c (int)    : min=0 max=2 step=1 default=2 value=2
                  exposure_auto 0x009a0901 (menu)   : min=0 max=3 default=3 value=3
              exposure_absolute 0x009a0902 (int)    : min=9 max=2500 step=1 default=123 value=123 flags=inactive
error 22 getting ext_ctrl Exposure, Auto Priority


    


  • RaspberryPi HLS streaming with nginx and ffmpeg ; v4l2 error : ioctl(VIDIOC_STREAMON) : Protocol error

    22 janvier 2021, par Mirco Weber

    I'm trying to realize a baby monitoring with a Raspberry Pi (Model 4B, 4GB RAM) and an ordinary Webcam (with integrated Mic).
I followed this Tutorial : https://github.com/DeTeam/webcam-stream/blob/master/Tutorial.md

    


    Shortly described :

    


      

    1. I installed and configured an nginx server with rtmp module enabled.
    2. 


    3. I installed ffmpeg with this configuration —enable-gpl —enable-nonfree —enable-mmal —enable-omx-rpi
    4. 


    5. I tried to stream ;)
    6. 


    


    The configuration of nginx seems to be working (sometimes streaming works, the server starts without any complication and when the server is up and running, the webpage is displayed).
The configuration of ffmpeg seems to be fine as well, since streaming sometimes works...

    


    I was trying a couple of different ffmpeg-commands ; all of them are sometimes working and sometimes resulting in an error.
The command looks like following :

    


    ffmpeg -re
-f v4l2
-i /dev/video0
-f alsa
-ac 1
-thread_queue_size 4096
-i hw:CARD=Camera,DEV=0
-profile:v high
-level:v 4.1
-vcodec h264_omx
-r 10
-b:v 512k
-s 640x360
-acodec aac
-strict
-2
-ac 2
-ab 32k
-ar 44100
-f flv
rtmp://localhost/show/stream;


    


    Note : I rearranged the code to make it easier to read. In the terminal, it is all in one line.
Note : There is no difference when using -f video4linux2 instead of -f v4l2

    


    The camera is recognized by the system :

    


    pi@raspberrypi:~ $ v4l2-ctl --list-devices
bcm2835-codec-decode (platform:bcm2835-codec):
    /dev/video10
    /dev/video11
    /dev/video12

bcm2835-isp (platform:bcm2835-isp):
    /dev/video13
    /dev/video14
    /dev/video15
    /dev/video16

HD Web Camera: HD Web Camera (usb-0000:01:00.0-1.2):
    /dev/video0
    /dev/video1


    


    When only using -i /dev/video0, audio transmission never worked.
The output of arecord -L was :

    


    pi@raspberrypi:~ $ arecord -L
default
    Playback/recording through the PulseAudio sound server
null
    Discard all samples (playback) or generate zero samples (capture)
jack
    JACK Audio Connection Kit
pulse
    PulseAudio Sound Server
usbstream:CARD=Headphones
    bcm2835 Headphones
    USB Stream Output
sysdefault:CARD=Camera
    HD Web Camera, USB Audio
    Default Audio Device
front:CARD=Camera,DEV=0
    HD Web Camera, USB Audio
    Front speakers
surround21:CARD=Camera,DEV=0
    HD Web Camera, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Camera,DEV=0
    HD Web Camera, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Camera,DEV=0
    HD Web Camera, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Camera,DEV=0
    HD Web Camera, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Camera,DEV=0
    HD Web Camera, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Camera,DEV=0
    HD Web Camera, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Camera,DEV=0
    HD Web Camera, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Camera,DEV=0
    HD Web Camera, USB Audio
    Direct sample mixing device
dsnoop:CARD=Camera,DEV=0
    HD Web Camera, USB Audio
    Direct sample snooping device
hw:CARD=Camera,DEV=0
    HD Web Camera, USB Audio
    Direct hardware device without any conversions
plughw:CARD=Camera,DEV=0
    HD Web Camera, USB Audio
    Hardware device with all software conversions
usbstream:CARD=Camera
    HD Web Camera
    USB Stream Output


    


    that's why i added -i hw:CARD=Camera,DEV=0.

    


    As mentioned above, it worked very well a couple of times with this configuration and commands.
But very often, i get the following error message when starting to stream :

    


    pi@raspberrypi:~ $ ffmpeg -re -f video4linux2 -i /dev/video0 -f alsa -ac 1 -thread_queue_size 4096 -i hw:CARD=Camera,DEV=0 -profile:v high -level:v 4.1 -vcodec h264_omx -r 10 -b:v 512k -s 640x360 -acodec aac -strict -2 -ac 2 -ab 32k -ar 44100 -f flv rtmp://localhost/show/stream
ffmpeg version N-100673-g553eb07737 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --enable-gpl --enable-nonfree --enable-mmal --enable-omx-rpi --extra-ldflags=-latomic
  libavutil      56. 63.101 / 56. 63.101
  libavcodec     58.117.101 / 58.117.101
  libavformat    58. 65.101 / 58. 65.101
  libavdevice    58. 11.103 / 58. 11.103
  libavfilter     7. 96.100 /  7. 96.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[video4linux2,v4l2 @ 0x2ea4600] ioctl(VIDIOC_STREAMON): Protocol error
/dev/video0: Protocol error


    


    And when I'm swithing to /dev/video1 (since this was also an output for v4l2-ctl --list-devices), I get the following error message :

    


    pi@raspberrypi:~ $ ffmpeg -re -f v4l2 -i /dev/video1 -f alsa -ac 1 -thread_queue_size 4096 -i hw:CARD=Camera,DEV=0 -profile:v high -level:v 4.1 -vcodec h264_omx -r 10 -b:v 512k -s 640x360 -acodec aac -strict -2 -ac 2 -ab 32k -ar 44100 -f flv rtmp://localhost/show/stream
ffmpeg version N-100673-g553eb07737 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --enable-gpl --enable-nonfree --enable-mmal --enable-omx-rpi --extra-ldflags=-latomic
  libavutil      56. 63.101 / 56. 63.101
  libavcodec     58.117.101 / 58.117.101
  libavformat    58. 65.101 / 58. 65.101
  libavdevice    58. 11.103 / 58. 11.103
  libavfilter     7. 96.100 /  7. 96.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[video4linux2,v4l2 @ 0x1aa4610] ioctl(VIDIOC_G_INPUT): Inappropriate ioctl for device
/dev/video1: Inappropriate ioctl for device


    


    When using the video0 input, the webcam's LED that recognizes an access is constantly on. When using video1not.

    


    After hours and days of googling and tears and whiskey, for the sake of my liver, my marriage and my physical and mental health, I'm very sincerly asking for your help...
What the f**k is happening and what can I do to make it work ???

    


    Thanks everybody :)

    


    UPDATE 1 :

    


      

    1. using the full path to ffmpeg does not change anything...
    2. 


    3. /dev/video0 and /dev/video1 have access rights for everybody
    4. 


    5. sudo ffmpeg ... does not change anything as well
    6. 


    7. the problem seems to be at an "early stage". Stripping the command down to ffmpeg -i /dev/video0 results in the same problem
    8. 


    


    UPDATE 2 :
    
It seems that everything is working when I first start another Application that needs access to the webcam and then ffmpeg...
Might be some driver issue, but when I'm looking for loaded modules with lsmod, there is absolutely no change before and after I started the application...
Any help still appreciated...

    


    UPDATE 3 :
    
I was checking the output of dmesg.
    
When I started the first application I received this message :
    
uvcvideo: Failed to query (GET_DEF) UVC control 12 on unit 2: -32 (exp. 4).

    And when I started ffmpeg, nothing happend but everything worked...