WebRTC Chrome Tricks

This page contains various tricks used in Chrome (in Ubuntu), majority of are them in WebRTC testing domain.

  1. Fake media source - Say you want to use a media file as source instead of camera and mic in Chrome. Since the command is going to be big one, lets create an alias chrome and use alias as command to bring up chrome browser.

    Set the alias.

    alias chrome="rm -rf $HOME/.config/chrome-test && google-chrome --console --no-first-run --user-data-dir=$HOME/.config/chrome-test --use-fake-device-for-media-stream --use-file-for-fake-video-capture=/home/user/files/media/raw.y4m --enable-logging --v=1 --vmodule=*third_party/libjingle/*=3,*=0"

    With this alias chrome is created. Just type chrome in terminal to bring up Chrome browser, and setup call. It will use media file raw.y4m as media source instead of camera and mic.

  2. If you want to WebRTC call with OpenH264FFmpeg enabled, use switch --enable-features=WebRTC-H264WithOpenH264FFmpeg. So alias command would look like as below.
    alias chrome="rm -rf $HOME/.config/chrome-test && google-chrome --console --no-first-run --user-data-dir=$HOME/.config/chrome-test --use-fake-device-for-media-stream --use-file-for-fake-video-capture=/home/user/files/media/raw.y4m --enable-features=WebRTC-H264WithOpenH264FFmpeg --enable-logging --v=1 --vmodule=*third_party/libjingle/*=3,*=0"