tree: 19f992242d5a8c6db27b7a5d6a39cbd8bddb0d0a [path history] [tgz]
  1. box_byte_stream.cc
  2. box_byte_stream.h
  3. box_byte_stream_unittest.cc
  4. BUILD.gn
  5. DEPS
  6. DIR_METADATA
  7. file_webm_muxer_delegate.cc
  8. file_webm_muxer_delegate.h
  9. live_webm_muxer_delegate.cc
  10. live_webm_muxer_delegate.h
  11. mp4_box_writer.cc
  12. mp4_box_writer.h
  13. mp4_fragment_box_writer.cc
  14. mp4_fragment_box_writer.h
  15. mp4_movie_box_writer.cc
  16. mp4_movie_box_writer.h
  17. mp4_muxer.cc
  18. mp4_muxer.h
  19. mp4_muxer_box_writer_unittest.cc
  20. mp4_muxer_context.cc
  21. mp4_muxer_context.h
  22. mp4_muxer_context_unittest.cc
  23. mp4_muxer_delegate.cc
  24. mp4_muxer_delegate.h
  25. mp4_muxer_delegate_fragment.cc
  26. mp4_muxer_delegate_fragment.h
  27. mp4_muxer_delegate_unittest.cc
  28. mp4_muxer_unittest.cc
  29. mp4_type_conversion.cc
  30. mp4_type_conversion.h
  31. mp4_type_conversion_unittest.cc
  32. muxer.cc
  33. muxer.h
  34. muxer_timestamp_adapter.cc
  35. muxer_timestamp_adapter.h
  36. muxer_timestamp_adapter_unittest.cc
  37. output_position_tracker.cc
  38. output_position_tracker.h
  39. output_position_tracker_unittest.cc
  40. OWNERS
  41. README.md
  42. webm_muxer.cc
  43. webm_muxer.h
  44. webm_muxer_fuzzertest.cc
  45. webm_muxer_unittest.cc
media/muxers/README.md

//media/muxers

This directory contains code for muxing mkv (webm) and mp4 files.

Muxers are based off the media::Muxer interface. These muxers are primarily used by MediaRecorder and ChromeOS video recording.

Since audio and video streams often come from sources with different clocks, timestamp alignment can be handled by MuxerTimestampAdapter. More details on synchronization can be found in the Media Capture and Streams spec.

Currently the following codecs are supported in each muxer:

  • mkv / webm: VP8, VP9, AV1, H.264 for video plus Opus for audio.
  • mp4: VP9, AV1, H.264 for video and Opus, AAC for audio.

Note: webm is a subset of mkv that technically only supports vp8, vp9, and av1 codecs.