How can I correctly provide a mock webcam video to Chrome?

After reading the link you provided I noticed that we can also provide an mjpeg.

Depending on what your test requirements – this may be sufficient for you. As a terminal command with ffmpeg installed:

ffmpeg -i oldfile.mp4 newfile.mjpeg

then I tested by running Google Chrome from the terminal using:

google-chrome --use-fake-device-for-media-stream --use-file-for-fake-video-capture=newfile.mjpeg

After navigating to Tracking JS I could see the video being played back.

I hope that works for you!

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)