Hi Devs!<div><br></div><div>First, I would like to thank you for developing this great tool. It allowed me streaming from v4l2 web cam and sound card stream to my rtmp server without loosing a/v sync which is not possible with competition like ffmpeg. </div>
<div><br></div><div>Now get back to problem I've discovered. I've USB microsoft live cam which is capable to stream RAW video and MJPEG video. RAW video is in YUY2. The problem is that whan I stream RAW video in YUY2, contrast or gamma or rounding problem (dont know) are ok. But once I stream in MJPEG, contrast is too high and ligh places are too light so it creates white shapes (sorry for my english). </div>
<div><br></div><div>Here is command line for YUY2 video which is OK</div><div><br></div><div>gst-launch -v -m v4l2src ! queue ! video/x-raw-yuv,format='(fourcc)'YUY2,width=640,height=360,framerate=30/1 ! ffmpegcolorspace ! queue ! videorate ! 'video/x-raw-yuv,framerate=30/1' ! hqdn3d ! x264enc </div>
<div><br></div><div><div><div>I've checked with v4l2-ctl that in the first case, pixel format is </div><div> Pixel Format : 'YUYV'</div><div> Colorspace : SRGB</div></div></div><div><br></div>
<div><br></div><div>Here is command line for MJPEG which has bad contrast</div><div><br></div><div>gst-launch -v -m v4l2src ! image/jpeg,width=640,height=360,framerate=30/1 ! queue ! ffdec_mjpeg ! ffmpegcolorspace ! queue ! videorate ! 'video/x-raw-yuv,framerate=30/1' ! x264enc</div>
<div><br></div><div>v4l2-ctl -V</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"> Pixel Format : 'MJPG'</div><div> Colorspace : SRGB</div><div><br></div><div><br></div>
<div>Streaming in MJPEG with ffmpeg looks good (contrast is ok)</div><div><br></div><div>ffmpeg -f alsa -i plughw:0 -f video4linux2 -s 640x360 -r 30 -i /dev/video0 -vcodec libx264 -threads 0 -vpre slow -b 500000 -strict experimental -acodec libfaac -ar 44100 -f flv rtmp://a.b.c.d/flvplayback/festr</div>
<div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>v4l2-ctl -V</div><div> Pixel Format : 'MJPG'</div><div> Colorspace : SRGB</div></div><div><br></div><div><br></div><div>
Anyone know if this is known issue or bug or misconfiguration? I've tried forcing v4l2 src plugin to video/x-raw-yuv,format='(fourcc)'YV12 format which sets my camera to MJPEG and the result is same, high contrast. </div>
<div><br></div><div><br></div><div>Thank you if you read the whole message and for possible hints. </div><div>Regards</div><div>Martin Vit</div>