การเปรียบเทียบโปรโตคอลการส่งผ่านข้อมูลของสตรีมมิงแบบสดบน YouTube
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การไลฟ์สดบน YouTube รองรับโปรโตคอลการส่งผ่านข้อมูลต่อไปนี้สำหรับ
ไคลเอ็นต์ของบุคคลที่สาม
โปรโตคอลการส่งผ่านข้อมูล |
มีการเข้ารหัส |
ตัวแปลงรหัสวิดีโอที่รองรับ |
ความคิดเห็น |
RTMP |
ไม่ |
H.264 |
เหมาะสำหรับการไลฟ์สดที่มีเวลาในการตอบสนองปกติ ต่ำ หรือต่ำมาก |
RTMPS |
ใช่ |
H.264 |
เหมาะสำหรับการไลฟ์สดที่มีเวลาในการตอบสนองปกติ ต่ำ หรือต่ำมาก |
HLS |
ใช่ |
H.264, H.265 (HEVC) |
เหมาะสำหรับความละเอียด 4K มากกว่าเนื่องจากรองรับ HEVC รองรับ HDR ไม่เหมาะสำหรับเวลาในการตอบสนองต่ำมาก |
DASH |
ใช่ |
H.264, VP9 |
เหมาะสำหรับความละเอียด 4K มากกว่าเนื่องจากรองรับ VP9 ไม่เหมาะสำหรับเวลาในการตอบสนองต่ำมาก |
โปรโตคอลการรับส่งข้อความแบบเรียลไทม์ (RTMPS) เป็นโปรโตคอลที่ใช้กันอย่างแพร่หลายสำหรับการสตรีมวิดีโอ
ซึ่ง YouTube Live ยอมรับมาตั้งแต่เริ่มให้บริการ
Real Time Messaging Protocol Secure (RTMPS) เป็นส่วนขยายที่ปลอดภัยของ RTMP
RTMPS เป็นประโยชน์ต่อทั้งครีเอเตอร์และผู้ชมโดยป้องกันการโจมตีแบบ "Man-in-the-Middle"
ในฝั่งการส่งผ่านข้อมูลของไลฟ์สด ซึ่งจะช่วยให้มั่นใจได้ว่าข้อมูลการไลฟ์สดทั้งหมดของครีเอเตอร์ ซึ่งรวมถึงวิดีโอ เสียง และสัญญาณควบคุม จะได้รับการส่งไปยังเซิร์ฟเวอร์ของ YouTube อย่างปลอดภัย เพื่อป้องกันการดัดแปลงหรือการดักฟังระหว่างการส่ง
โปรโตคอลการส่งผ่านข้อมูล HTTP Live Streaming (HLS) และการสตรีมที่ปรับเปลี่ยนได้แบบไดนามิกผ่าน HTTP (DASH) ก็ได้รับการเข้ารหัสเช่นเดียวกับ RTMPS นอกจากนี้ยังรองรับ
ตัวแปลงรหัสที่ RTMP และ RTMPS ไม่รองรับด้วย ตัวแปลงรหัสวิดีโอรุ่นถัดไป เช่น VP9 และการเขียนโค้ดวิดีโอที่ประสิทธิภาพสูง (High Efficiency Video Coding หรือ HEVC) สามารถบีบอัดได้ดีกว่า H.264 มาก ซึ่งช่วยให้ผู้ใช้สตรีมด้วยคุณภาพที่สูงขึ้นสำหรับบิตเรตที่กำหนด หรือสตรีมด้วยคุณภาพเดียวกันขณะใช้บิตเรตที่ต่ำลง ซึ่งอาจช่วยลดการบัฟเฟอร์ได้ ด้วยเหตุนี้ การส่งผ่านข้อมูล HLS หรือ DASH จึงเป็นตัวเลือกที่ดีสำหรับเนื้อหาระดับพรีเมียมที่ต้องการคุณภาพและความละเอียดสูงขึ้น แม้ว่าจะมีเวลาในการตอบสนองสูงกว่าก็ตาม โปรดทราบว่าโดยปกติแล้วการส่งผ่านข้อมูล HLS และ DASH จะมีเวลาในการตอบสนองมากกว่า RTMP เนื่องจาก HLS และ DASH เป็นแบบอิงตามกลุ่ม
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-21 UTC
[null,null,["อัปเดตล่าสุด 2025-08-21 UTC"],[[["\u003cp\u003eYouTube Live Streaming supports four ingestion protocols: RTMP, RTMPS, HLS, and DASH, each with different features and capabilities.\u003c/p\u003e\n"],["\u003cp\u003eRTMP and RTMPS are suitable for normal, low, or ultra-low latency live streaming, with RTMPS providing secure, encrypted transmission.\u003c/p\u003e\n"],["\u003cp\u003eHLS and DASH are encrypted, support advanced codecs like HEVC and VP9, and are better suited for 4K and high-resolution streaming but have higher latency.\u003c/p\u003e\n"],["\u003cp\u003eHLS and DASH offer improved video compression compared to H.264, allowing for higher quality at the same bitrate or equivalent quality with a lower bitrate.\u003c/p\u003e\n"]]],["YouTube Live Streaming uses RTMP, RTMPS, HLS, and DASH protocols. RTMP and RTMPS, the latter being a secure extension, support H.264 and are suitable for low-latency streams. Encrypted HLS supports H.264 and H.265 (HEVC), while encrypted DASH supports H.264 and VP9, both being ideal for 4K and HDR content. HLS and DASH are segment based and offer better compression, but are not suitable for ultra-low latency.\n"],null,["# YouTube Live Streaming Ingestion Protocol Comparison\n\nYouTube Live Streaming supports the following ingestion protocols for\nthird-party clients:\n\n| Ingestion Protocol | Encrypted | Video Codecs Supported | Comment |\n|----------------------------------------------------|-----------|------------------------|-----------------------------------------------------------------------------------------------------|\n| RTMP | No | H.264 | Suitable for normal, low, or ultra-low latency live streaming. |\n| [RTMPS](/youtube/v3/live/guides/rtmps-ingestion) | Yes | H.264 | Suitable for normal, low, or ultra-low latency live streaming. |\n| [HLS](/youtube/v3/live/guides/hls-ingestion) | Yes | H.264, H.265 (HEVC) | Better for 4K resolution because of HEVC support. Supports HDR. Not suitable for ultra-low latency. |\n| [DASH](/youtube/v3/live/guides/encoding-with-dash) | Yes | H.264, VP9 | Better for 4K resolution because of VP9 support. Not suitable for ultra-low latency. |\n\n*Real Time Messaging Protocol (RTMPS)* is a widely-used protocol for video\nstreaming that YouTube Live has accepted since the service began.\n\n*Real Time Messaging Protocol Secure (RTMPS)* is a secure extension to RTMP.\nRTMPS benefits both content creators and viewers by preventing man-in-the-middle\nattacks on the ingestion side of livestreams. This ensures that all of a\ncreator's live streaming data---including video, audio, and control signals---is\nsecurely transmitted to YouTube's servers, protecting it from tampering or\ninterception in transit.\n\nThe *HTTP Live Streaming (HLS)* and *Dynamic Adaptive Streaming over HTTP\n(DASH)* ingestion protocols are also encrypted, like RTMPS. They also support\ncodecs that RTMP and RTMPS don't. Next-generation video codecs such as VP9 and\n*High Efficiency Video Coding (HEVC)* can offer much better compression relative\nto H.264, allowing users to either stream with higher quality for a given\nbitrate or stream with the same quality while using a lower bitrate, which could\ndecrease buffering. This makes HLS or DASH ingestion a good choice for premium\ncontent that requires higher quality and higher resolution, albeit at a\nrelatively higher latency. Note that HLS and DASH ingestion typically incur\ngreater latency than RTMP because HLS and DASH are segment-based."]]