[FFmpeg-user] v4l2 overlay on mjpeg stream
Carl Eugen Hoyos
ceffmpeg at gmail.com
Mon Jan 25 01:53:37 EET 2021
Am Mo., 25. Jan. 2021 um 00:42 Uhr schrieb Baltazár Radics
<baltazar.radics at gmail.com>:
>
> output of `ffmpeg -i https://192.168.11.139:8080/video -thread_queue_size
> 2048 -i /dev/video3 -filter_complex
> '[0:v]scale=iw*4/3:-1,crop=1280:720[cam];[1:v]scale=4*iw:-1:flags=neighbor[calc];[cam]
> [calc]overlay' -vcodec rawvideo -pix_fmt yuv420p -f v4l2 /dev/video2`:
> http://ix.io/2NeC
> output of `ffmpeg -i /dev/video0 -i /dev/video3 -filter_complex
> '[0:v]scale=iw*4/3:-1[cam];[1:v]scale=4*iw:-1:flags=neighbor[calc];[cam][calc]overlay'
> -vcodec rawvideo -pix_fmt yuv420p -f v4l2 /de
> v/video2`: http://ix.io/2NeD
For future questions:
Please always post all information here on the mailing list, do not
use external resources
except for input samples.
And please find out what top-posting means and avoid it here.
> Input #0, mpjpeg, from 'https://192.168.11.139:8080/video':
> Duration: N/A, bitrate: N/A
> Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
> Input #1, video4linux2,v4l2, from '/dev/video3':
> Duration: N/A, start: 36730.385449, bitrate: 1985 kb/s
> Stream #1:0: Video: rawvideo (Y800 / 0x30303859), gray, 128x64, 1985 kb/s, 30.30 fps, 30.30 tbr, 1000k tbn, 1000k tbc
You cannot synchronize these streams because they have different start times,
there should be a filter incantation that resets the timestamps of the
second input,
something like "setpts=PTS-STARTPTS"
Carl Eugen
More information about the ffmpeg-user
mailing list