[FFmpeg-user] Could not write header for output file #0

Gerhard Dorner gdorner.gd at gmail.com
Thu Feb 27 12:47:39 EET 2020


Hello,

I am new here and with ffmpeg and i hope i do ask here right.

I try to stream a Camera in my local network, but it does not work with
that command

how to debug this error?
or what could be the reason for this error?

greetings

the device is an RPI3B

*ffmpeg -input_format yuyv422 -f video4linux2 -s 1280x720 -r 10 -i
> /dev/video0 -c:v h264_omx -r 10 -b:v 2M -an -f rtsp
> rtsp://localhost:80/live/stream*
>


> ffmpeg version git-2020-02-22-c116dd8 Copyright (c) 2000-2020 the FFmpeg
> developers
>   built with gcc 8 (Raspbian 8.3.0-6+rpi1)
>   configuration: --arch=armel --target-os=linux --enable-gpl --enable-omx
> --enable-omx-rpi --enable-nonfree --enable-libfreetype --enable-libx264
> --enable-libmp3lame --enable-mmal --enable-indev=alsa --enable-outdev=alsa
>   libavutil      56. 41.100 / 56. 41.100
>   libavcodec     58. 72.100 / 58. 72.100
>   libavformat    58. 39.100 / 58. 39.100
>   libavdevice    58.  9.103 / 58.  9.103
>   libavfilter     7. 76.100 /  7. 76.100
>   libswscale      5.  6.100 /  5.  6.100
>   libswresample   3.  6.100 /  3.  6.100
>   libpostproc    55.  6.100 / 55.  6.100
> Input #0, video4linux2,v4l2, from '/dev/video0':
>   Duration: N/A, start: 1135.559187, bitrate: 147456 kb/s
>     Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720,
> 147456 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_omx))
> Press [q] to stop, [?] for help
> [
>
>
> *h264_omx @ 0x2217e10] Using OMX.broadcom.video_encodeCould not write
> header for output file #0 (incorrect codec parameters ?): Invalid data
> found when processing inputError initializing output stream 0:0
> --Conversion failed!*
>


* v4l2-ctl --list-devices*
> bcm2835-codec-decode (platform:bcm2835-codec):
>         /dev/video10
>         /dev/video11
>         /dev/video12
>
> Microsoft® LifeCam HD-3000: Mi (usb-3f980000.usb-1.5):
>         /dev/video0
>         /dev/video1
>
>
> pi at garage-rpi:~ $ *v4l2-ctl -d /dev/video0 --list-formats-ext*
> ioctl: VIDIOC_ENUM_FMT
>         Type: Video Capture
>
>         [0]: 'YUYV' (YUYV 4:2:2)
>                 Size: Discrete 640x480
>                         Interval: Discrete 0.033s (30.000 fps)
>                         Interval: Discrete 0.050s (20.000 fps)
>                         Interval: Discrete 0.067s (15.000 fps)
>                         Interval: Discrete 0.100s (10.000 fps)
>                         Interval: Discrete 0.133s (7.500 fps)
>                 Size: Discrete 1280x720
>                         Interval: Discrete 0.100s (10.000 fps)
>                         Interval: Discrete 0.133s (7.500 fps)
>
                Size: Discrete 960x544
>                         Interval: Discrete 0.067s (15.000 fps)
>                         Interval: Discrete 0.100s (10.000 fps)
>                         Interval: Discrete 0.133s (7.500 fps)
>





-- 
Freundliche Grüsse

*Gerhard Dorner*


More information about the ffmpeg-user mailing list