miroslavpejic85 / mirotalksfu

🏆 WebRTC - SFU - Simple, Secure, Scalable Real-Time Video Conferences Up to 8k, compatible with all browsers and platforms.
https://sfu.mirotalk.com
GNU Affero General Public License v3.0
2.15k stars 340 forks source link

Recording Download as .mp4 format #176

Closed MORRA-RM closed 1 week ago

MORRA-RM commented 1 week ago

Feature request

Current Recording download is in .webm format. Was wondering if recordings could be saved as .mp4. Or maybe a choice given.

Pros

This would alleviate having to convert to .mp4.

Additional context

Some users are asking for this feature because they are saying it takes longer to edit a .webm then an .mp4. It might be because the .mp4 is more familiar. Thank you

miroslavpejic85 commented 1 week ago

Opting for .webm provides several benefits that make it particularly suitable for web applications. Here are some advantages of using the WebM format:

  1. Web Optimization: WebM is tailored for efficient streaming, offering low latency and quick load times, making it perfect for live and online video content.
  2. Open and Royalty-Free: Utilizing VP8/VP9 for video and Opus for audio, WebM is free from licensing fees, making it cost-effective for developers.
  3. Efficient Compression: WebM files are smaller in size without sacrificing quality, which helps reduce storage needs and bandwidth usage.
  4. High-Quality Video: Despite the smaller file sizes, WebM maintains high-definition quality, supporting resolutions up to 4K and beyond.
  5. Broad Browser Support: Most modern browsers, including Chrome, Firefox, and Edge, offer native support for WebM, eliminating the need for additional plugins.
  6. Future-Proof: WebM continues to evolve, with ongoing development to support new codecs like AV1, enhancing compression efficiency and quality over time.
  7. Transparency Features: WebM supports alpha channels, enabling videos with transparent backgrounds for web overlays and interactive elements.

Special Considerations for Safari

While WebM excels in many aspects, it is not fully supported on Safari. To ensure compatibility across all platforms, especially on Apple devices, recorded videos in Safari are saved in the .mp4 format.

H.264

mirotalk-sfu-webm

You can prioritize recording to use H.264 as the preferred video compression standard for the following reasons:

Converting WebM to MP4

If you need to convert a WebM file to MP4, you can easily do so using ffmpeg. Here’s how:

# Install ffmpeg
sudo apt install -y ffmpeg

# Convert WebM to MP4
ffmpeg -i input.webm output.mp4
MORRA-RM commented 1 week ago

This is perfect. Thank you