当前位置: 首页 > news >正文

Media streaming mental map

Media streaming is a huge topic with a bunch of scattered technologies, protocols, and formats. You may feel like hearing fragments without seeing the big picture.

Let’s build that mental map together — here’s a high-level overview that connects everything:


🧭 Big Picture: How Media Streaming Works

1. Input (Media Source)

Where the content comes from:

  • 📹 Live: Webcam, OBS, FFmpeg, phone camera
  • 📁 On-demand: MP4 files, pre-recorded videos

2. Ingestion (First stop for the media)

How the stream enters your system:

  • RTMP ← most common for live input (OBS, FFmpeg push)
  • SRT ← secure UDP alternative for unstable networks
  • WebRTC ← direct browser input for real-time

3. Transcoding & Packaging

Prepare media for delivery:

  • Convert formats (e.g., FLV → MP4 or MPEG-TS)
  • Encode video/audio (e.g., H.264 + AAC)
  • Package into streamable formats:
    • .mp4 for static playback
    • .m3u8 + .ts for HLS
    • .mpd + .m4s for MPEG-DASH
    • WebRTC for low-latency live

Tools: FFmpeg, GStreamer, Media Server (e.g., Nginx with RTMP module, Janus, MediaSoup)


4. Delivery (Send to client)

How media reaches the viewer:

  • HTTP-based (HLS, DASH) → works over CDNs
  • WebRTC → direct peer-to-peer or via SFU
  • Progressive MP4 → like YouTube-style “click-to-play”

5. Playback (What the browser or app does)

How viewers see and hear it:

FormatHow it’s played
.mp4Native <video> tag
.m3u8Native in Safari, hls.js in other browsers
.mpddash.js or native (on some platforms)
WebRTCvia RTCPeerConnection API in JS
RTMP❌ Not playable in browsers anymore

🚀 Quick Visual Map

            [Camera / OBS / File]
                     ↓
                [RTMP / SRT]
                     ↓
               [Media Server / FFmpeg]
                     ↓
        ┌────────────┬──────────────┐
        │            │              │
     [HLS]        [DASH]        [WebRTC]
      ↓             ↓              ↓
 [Browser + JS] [Browser + JS] [Native in browser]

🔧 You Might Work With

You UseIf You Want To
RTMPIngest live feeds
FFmpegTranscode/segment videos
HLS (.m3u8)Serve to most devices
WebRTCReal-time chat/live cam
NginxServe static files and proxy media
JavaScript PlayersControl playback (hls.js, dash.js, video.js)

💡 Tip

If you’re building for mobile web, HLS is usually the easiest first step.
If you’re aiming for real-time interaction, WebRTC is your friend (but more complex).


For example:

  • Live stream with FFmpeg + Nginx HLS
  • WebRTC with Janus
  • A mobile-friendly HTML page with an HLS player
http://www.dtcms.com/a/113667.html

相关文章:

  • 马吕斯定律(Malus‘s Law)
  • [Hot 100] 221. 最大正方形 215. 数组中的第K个最大元素 208. 实现 Trie (前缀树) 207. 课程表
  • Nmap全脚本使用指南!NSE脚本全详细教程!Kali Linux教程!(五)
  • 7-12 最长对称子串(PTA)
  • verilog状态机思想编程流水灯
  • VMware 安装 Ubuntu 全流程实战指南:从零搭建到深度优化
  • 医药档案区块链系统
  • 强引用,弱引用,软引用,虚引用,自旋锁,读写锁
  • 基于springboot放松音乐在线播放系统(源码+lw+部署文档+讲解),源码可白嫖!
  • Linux驱动-①电容屏触摸屏②音频③CAN通信
  • client-go如何监听自定义资源
  • 2011-2019年各省地方财政资源勘探电力信息等事务支出数据
  • Jetpack Compose 自定义标题栏终极指南:从基础到高级实战
  • 蓝桥杯2024年第十五届省赛真题-宝石组合
  • BGP路由协议之特殊配置
  • Linux内核slab分配器
  • Linux 系统安装与优化全攻略:打造高效开发环境
  • Airflow量化入门系列:第四章 A股数据处理与存储优化
  • 浅谈StarRocks 常见问题解析
  • (5)模拟后——Leonardo的可视化操作
  • 探秘叁仟智盒设备:智慧城市的智能枢纽
  • Django4.0 快速集成jwt
  • ASP.NET Core Web API 参数传递方式
  • NLP简介及其发展历史
  • docker stack常用命令
  • C#结构体(Struct)深度解析:轻量数据容器与游戏开发应用 (Day 20)
  • pinia-plugin-persist、vuex
  • Spring Boot项目连接MySQL数据库及CRUD操作示例
  • Java Timer:老派但好用的“定时任务小闹钟“
  • 【Linux】进程间通信、匿名管道、进程池