Skip to content

No impact of video configurations on headless browser Kubernetes cluster (linux). #156

@ArslanMehmoodTkxel

Description

@ArslanMehmoodTkxel

Despite attempting various resolutions, I've observed no improvement in the video quality. Upon using ffmpeg, I encountered the following logs:

frame=80 fps=0.7 q=0.0 size=1536kB time=00:02:07.31 bitrate=98.8kbits/s dup=0 drop=1165 speed=1.04x
These logs indicate that the generated video is of low quality.

My configurations are as follows:

const stream = await getStream(page, { 
    audio: true, 
    video: true,
    frameSize: 1000,
    bitsPerSecond: 5000000,
    videoConstraints: {
        mandatory: {
            minWidth: 1920,
            minHeight: 1080,
            maxWidth: 1920,
            maxHeight: 1080,
            minFrameRate: 25,
            maxFrameRate: 25,
        }
    }
});

I am launching chrome with these params

const browser = await launch({
      defaultViewport: {
        width: 1080,
        height: 1920,
      },
      args: [
        '--no-sandbox',
        '--window-size=1080,1920',
        '--disable-setuid-sandbox',
        '--start-fullscreen',
        `--headless=new`
      ],

      executablePath: executablePath(),
      timeout: THIRTY_MINUTES_DELAY,
      protocolTimeout: THIRTY_MINUTES_DELAY,
    });

Here is the configuration of ffmpeg

 
const ffmpeg = childProcess.spawn(
        ffmpegPath,
        [ '-y', '-i', '-', '-c:v', 'libx264', '-b:v', '500k', '-c:a', 'copy', file]
    );  

Any suggestions on how to enhance the video quality would be greatly appreciated.

image

Note: I have deployed on Kubernetes cluster the quality was better when i tested this on local machine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions