欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 科技 > 能源 > Media streaming mental map

Media streaming mental map

2025/5/9 19:22:45 来源:https://blog.csdn.net/fareast_mzh/article/details/147011623  浏览:    关键词: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

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词