• Skip to primary navigation
  • Skip to main content
  • Skip to footer
Cyara

Cyara

Cyara Customer Experience Assurance Platform

  • LOGIN
  • CONTACT US
  • WATCH A DEMO
  • PRODUCTS & SERVICES
    • AI-Powered CX Assurance Platform
      • Call Explorer
      • Call Routing & Agent Desktop Testing
      • Cloud Contact Center Monitoring
      • Conversational AI Testing
      • Integrations
      • Omnichannel Testing
      • Voice Quality Testing
    • Products
      • AI Trust
      • Botium
      • CentraCX
      • Cloud Migration Assurance
      • Cruncher
      • Number Trust
      • Pulse
      • Pulse 360
      • ResolveAX
      • testRTC
      • Velocity
      • Voice Assure
    • Services
      • Cyara Academy
      • Consulting
      • Customer Success
      • Support
  • SOLUTIONS
    • IVR Testing
      • IVR Discovery
      • IVR Testing
    • Omnichannel Testing
      • Chatbot Testing & Optimization
      • Cloud Contact Center
      • Contact Center Number Test Types
      • Contact Center Testing
      • Email & SMS Testing
      • Omnichannel Testing
      • Voice of Customer
      • Web Interaction Testing
    • Software Testing & Monitoring
      • Continuous Testing Solutions
      • Customer Experience Monitoring
      • DevOps for Customer Experience
      • Functional Testing
      • Incident Management
      • Load/Performance Testing
      • Regression Testing
    • Voice Quality Testing
      • Agent Desktop Testing
      • Outbound Call Testing
      • Voice Biometrics Testing
      • Voice Quality Testing
  • RESOURCES
    • Blog
    • Events
    • Customer Success Showcase
    • Resources
    • Webinars
  • ABOUT
    • CEO’s Desk
    • Leadership
    • Press Releases
    • Media Coverage
    • Partners
    • Awards
    • About Cyara
    • Careers
    • Employee Profiles
    • Legal

Blog / CX Assurance

February 3, 2016

How Do You Create a .Y4M Video File that Chrome Can Use?

Tsahi Levent-Levi

Tsahi Levent-Levi, Senior Director, Product

This article was originally published on testRTC’s blog, prior to Cyara’s acquisition of Spearline and testRTC. Learn more about Cyara + Spearline.


If you’ve ever tried to replace the camera feed for Chrome with a media file for the purpose of testing WebRTC, you might have noticed that it isn’t the most easy process of all.

Even if you got to the point of having a .Y4M file (the format used by Chrome) and finding which command line flags to run Chrome with – there is no guarantee for this to work.

Why? Chrome likes its .Y4M file in a very very specific way. One which FFmpeg fails to support.

We’ve recently refreshed the media files we use ourselves in testRTC – making them a bit more relevant in terms of content type and containing media that can hold high bitrates nicely. Since we have our own scars from this process, we wanted to share it here with you – to save you time.

Learn More about Cyara testRTC

Why is it so damn hard?

When you use FFmpeg to create a .Y4M file, it generates it correctly. If you try to open the .Y4M file with a VLC player, for example, it renders well. But if you try to give it to Chrome – Chrome will crash from this .Y4M file.

The reason stems in Chrome’s expectations. The header of the .Y4M file includes some metadata. Part of it is the file type. What FFmpeg has is C420mpeg2 to describe the color space used (or something of the sorts), but Chrome expects to see only C420.

Yes. 5 characters making all the trouble.

The only place we found that details is here, but it still leaves you with a lot to do to get it done.

Here’s what you need to do:

Prerequisites:

  • The media file
    • We’ve used .mp4 but .webm is just as good
    • Make sure the origin resolution and frame rate is what you need – for the camera source – Chrome will scale down if and when needed
    • The source file should be of high quality – again, assume it comes out directly from a camera
  • Linux
    • You can make do with Windows or Mac – I’ve used Linux for this though
    • I find it easier to handle for command line tasks (and I am definitely not a Mac person)
  • FFmpeg installed somewhere (get it from here, but hopefully you have it install already)
  • sed command line program

Steps:

  1. Convert the file from .mp4 to .y4m format
  2. Remove the 5 redundant characters

Here’s how to do it from the command line. for all of the .y4m files in your current folder:

ffmpeg -i YOUR-FILE-HERE.mp4 -pix_fmt yuv420p
sed -i '0,/C420mpeg2/s//C420/' *.y4m

Running Chrome:

To run Chrome with your newly created file, you’ll need to invoke it from command line with a few flags:

google-chrome --use-fake-device-for-media-stream --use-file-for-fake-video-capture=YOUR-FILE-HERE.y4m

Things to remember:

  • The resulting .Y4M file is humongous. 10 seconds of 1080p resolution eats up a full gigabyte of disk space.
  • That sed command? It isn’t optimized for speed but it gets the job done, so who cares? It’s a one-time effort anyways.
Learn More about Cyara testRTC

Read more about: Cyara testRTC, Tutorial / How-to Guide, Web Real-Time Communication (WebRTC), WebRTC Monitoring

Start the Conversation

Tell us what’s on your mind, and learn how Cyara’s AI-led CX transformation can help you delight your customers.

Contact Us

Related Posts

qualityRTC network quality score

January 23, 2025

Understanding Cyara’s qualityRTC Network Quality Score: Gain Key Insights into Voice and Network Performance

Cyara qualityRTC helps you overcome WebRTC issues with a wide range of tests. Regain control with our Network Quality Score.

Topics: Cyara testRTC, qualityRTC, Web Real-Time Communication (WebRTC), WebRTC Monitoring

watchRTC from Cyara

October 29, 2024

Empowering CCaaS Vendors with watchRTC: Enhancing Agent Performance Analytics

The rise of remote work has created several new challenges. Overcome WebRTC issues and assure agent performance with Cyara's watchRTC,

Topics: Agent Environment Monitoring, Contact Centers, watchRTC, Web Real-Time Communication (WebRTC), WebRTC Monitoring

Contact center agent

August 27, 2024

Overcoming WebRTC Quality Challenges in Contact Centers with qualityRTC

In our current age of remote work, it's more important than ever to assure your WebRTC performance. Learn how Cyara qualityRTC can help.

Topics: Customer Experience (CX), qualityRTC, Web Real-Time Communication (WebRTC), WebRTC Monitoring

Footer

Cyara logo
 
  • LinkedIn
  • Twitter
  • YouTube

Copyright © 2006–2025 Cyara® Inc. The Cyara logo, names and marks associated with Cyara’s products and services are trademarks of Cyara. All rights reserved. Privacy Statement  Cookie Settings