<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pkst Tech Blog on Medium]]></title>
        <description><![CDATA[Stories by Pkst Tech Blog on Medium]]></description>
        <link>https://medium.com/@pkst?source=rss-69a904a90d60------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SItD_KJIFpLQ9c60ImvbTw.png</url>
            <title>Stories by Pkst Tech Blog on Medium</title>
            <link>https://medium.com/@pkst?source=rss-69a904a90d60------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 15:50:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pkst/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introduction to Our Video Redistribution Platform]]></title>
            <link>https://pkst.medium.com/introduction-to-our-video-redistribution-platform-2c485902b2d9?source=rss-69a904a90d60------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c485902b2d9</guid>
            <category><![CDATA[webrtc]]></category>
            <category><![CDATA[live-streaming]]></category>
            <category><![CDATA[hls]]></category>
            <category><![CDATA[encoder]]></category>
            <category><![CDATA[hlsstreamingserver]]></category>
            <dc:creator><![CDATA[Pkst Tech Blog]]></dc:creator>
            <pubDate>Tue, 09 Jul 2024 20:15:36 GMT</pubDate>
            <atom:updated>2024-07-09T20:21:59.229Z</atom:updated>
            <content:encoded><![CDATA[<p>In the era of live streaming and multimedia content, the need for robust and scalable solutions for video ingestion and processing is more crucial than ever. Today, we introduce two key components in our streaming stack: <strong>pRouter</strong> and <strong>Peekoder</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X68_UlTEe5u-UvUBIfLROA.png" /></figure><h3>pRouter: The Video Reverse Proxy</h3><p><strong>pRouter</strong> is a video reverse proxy designed to accept connections from multiple sources and formats. This essential component enables video ingestion from any modern browser (via WebRTC and WebSocket) and from software using RTMP. The main features of pRouter include:</p><ul><li><strong>WebRTC and WebSocket Connections</strong>: Facilitates streaming from browsers like Firefox, Chrome, and Safari.</li><li><strong>RTMP Compatibility</strong>: Allows video ingestion from software such as OBS Studio.</li><li><strong>Byte Transfer via RecordRTC and RTMP</strong>: Efficiently transfers video streams to subsequent system components.</li></ul><h3>Peekoder: Processing and Restreaming</h3><p><strong>Peekoder</strong> operates behind pRouter in a private network, receiving video through SDP, RTMP, and TCP. Its main functions are:</p><ul><li><strong>Video Decoding</strong>: Processes and decodes incoming video streams.</li><li><strong>Audio Re-encoding</strong>: Re-encodes audio to AAC if not already in that format, ensuring compatibility with final destinations.</li><li><strong>Restreaming to Multiple Destinations</strong>: Enables retransmission to various RTMP destinations like Twitch, YouTube, and custom RTMP servers.</li><li><strong>HLS Generation</strong>: Creates an HLS stream and sends it to the CDN (e.g., using S3/CloudFront).</li></ul><h3>Scalability and Performance</h3><p>One of the standout advantages of Peekoder is its horizontal scalability. This means we can add more Peekoder instances to handle a larger number of simultaneous video streams, ensuring smooth and uninterrupted transmission.</p><p>In our tests, we have found that an instance with 4 cores and 8GB of RAM can support up to 8 simultaneous streams, each with up to 6 different outputs. This optimized performance is partly due to the implementation in <strong>Golang</strong>, which ensures efficient and fast processing.</p><h3>Integration with Specialized Libraries</h3><p>The development of Peekoder includes the use of the <strong>libpkst</strong> library, written in C. This library acts as a wrapper for <strong>libavformat</strong>, specifically designed for this purpose. The reason behind this choice is to ensure that multithreading is fully compatible with the Golang runtime, enabling concurrent and efficient processing.</p><h3>Conclusion</h3><p>With pRouter and Peekoder, we have developed a comprehensive solution for live video ingestion, processing, and distribution. These tools not only facilitate the integration of multiple video sources but also ensure high-quality delivery to various destinations, optimizing both performance and scalability of the system.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c485902b2d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>