Menu
Products
Products
Video Hosting
Upload and manage your videos in a centralized video library.
Image Hosting
Upload and manage all your images in a centralized library.
Galleries
Choose from 100+templates to showcase your media in style.
Video Messaging
Record, and send personalized video messages.
CincoTube
Create your own community video hub your team, students or fans.
Pages
Create dedicated webpages to share your videos and images.
Live
Create dedicated webpages to share your videos and images.
For Developers
Video API
Build a unique video experience.
DeepUploader
Collect and store user content from anywhere with our file uploader.
Solutions
Solutions
Enterprise
Supercharge your business with secure, internal communication.
Townhall
Webinars
Team Collaboration
Learning & Development
Creative Professionals
Get creative with a built in-suite of editing and marketing tools.
eCommerce
Boost sales with interactive video and easy-embedding.
Townhall
Webinars
Team Collaboration
Learning & Development
eLearning & Training
Host and share course materials in a centralized portal.
Sales & Marketing
Attract, engage and convert with interactive tools and analytics.
"Cincopa helped my Enterprise organization collaborate better through video."
Book a Demo
Resources
Resources
Blog
Learn about the latest industry trends, tips & tricks.
Help Centre
Get access to help articles FAQs, and all things Cincopa.
Partners
Check out our valued list of partners.
Product Updates
Stay up-to-date with our latest greatest features.
Ebooks, Guides & More
Customer Stories
Hear how we've helped businesses succeed.
Boost Campaign Performance Through Video
Discover how to boost your next campaign by using video.
Download Now
Pricing
Log in
Get a demo
Get Started
Converting RTMP streams to HLS often becomes necessary when a single live feed must reach devices with different network conditions and playback needs. RTMP works well for contribution, but HLS is better suited for modern delivery because it adapts to changing bandwidth and plays smoothly on most players. This shift from a push-style RTMP feed to segmented HLS files helps maintain stability, reduce buffering, and ensure consistent viewer access. To make this transition reliable, precise FFmpeg commands are used to reshape the stream into small, time-based segments that HLS can distribute efficiently. Prerequisites To follow these steps, have these set up on your system: FFmpeg is installed and working on your computer. Download it from the official site and check if it runs by typing ffmpeg -version in the command line. An RTMP stream source, like a live video feed from a camera or server, with its URL ready. A folder on your computer to save the HLS output files. Basic knowledge of using the command line to run programs. Understanding RTMP and HLS for Video Conversion RTMP pushes live data streams from encoders to servers or CDN origins using a persistent TCP connection. In contrast, HLS converts a live stream into small transport stream (.ts) segments referenced by a playlist (.m3u8) file, allowing adaptive streaming over HTTP/HTTPS. This enables smooth playback on smartphones, browsers, and smart TVs and is friendly to CDNs and caches. Basic FFmpeg Command for RTMP to HLS Conversion : ffmpeg -i rtmp://example.com/live/stream -c:v libx264 -preset veryfast -crf 23 -c:a aac -b:a 128k -hls_time 6 -hls_list_size 5 -hls_flags delete_segments+append_list -f hls output.m3u8 Explanation : -i input RTMP URL. -c:v libx264 encodes video using H.264 codec. -preset veryfast balances encoding speed and quality. -crf 23 controls output quality (lower is better quality). -c:a aac with -b:a 128k sets audio codec/bitrate. -hls_time 6 splits video into 6-second segments for low latency. -hls_list_size 5 keeps the playlist limited to recent segments. -hls_flags delete_segments+append_list manages segment files by deleting old ones for disk cleanup while maintaining the playlist. -f hls outputs HLS formatted stream starting from output.m3u8 . Creating Multiple Quality Renditions for Adaptive Bitrate Streaming Start by generating multiple streams with different resolutions/bitrates, then create a master playlist: # 720p stream ffmpeg -i rtmp://example.com/live/stream -c:v libx264 -b:v 3000k -s 1280x720 -c:a aac -b:a 128k -hls_time 6 -hls_list_size 5 -hls_flags delete_segments+append_list -f hls 720p.m3u8 # 480p stream ffmpeg -i rtmp://example.com/live/stream -c:v libx264 -b:v 1500k -s 854x480 -c:a aac -b:a 96k -hls_time 6 -hls_list_size 5 -hls_flags delete_segments+append_list -f hls 480p.m3u8 Then create an HLS master playlist (master.m3u8) referencing both variants: #EXTM3U #EXT-X-STREAM-INF:BANDWIDTH=3000000,RESOLUTION=1280x720 720p.m3u8 #EXT-X-STREAM-INF:BANDWIDTH=1500000,RESOLUTION=854x480 480p.m3u8 Adjusting Video Quality and Segments To make the video look better or fit different needs, change the settings. For higher quality, add a bitrate: ffmpeg -i rtmp://example.com/live/stream -c:v libx264 -b:v 2000k -c:a aac -hls_time 10 -hls_list_size 0 -f hls output.m3u8 This sets the video to 2000 kilobits per second, making it clearer. If you want shorter segments for faster loading, change -hls_time to 5. Test different numbers to see what works for your video. For multiple qualities, create versions at different sizes. Run separate commands for each, like one at 1000k and one at 2000k, saving to different folders. Then, make a master playlist that lists them. Handling Audio and Adding Options Videos often have sound, so ensure it's included. The basic command already adds audio encoding. If the stream has no sound, add -an to skip it. For stereo sound, specify: ffmpeg -i rtmp://example.com/live/stream -c:v libx264 -c:a aac -b:a 128k -hls_time 10 -hls_list_size 0 -f hls output.m3u8 This sets the audio to 128 kilobits per second. If the video stops or has issues, FFmpeg shows errors in the command line. Check the stream URL or network if it fails. Testing and Running the Conversion After running the command, look in your folder for the .m3u8 file and .ts segments. Open the .m3u8 in a video player that supports HLS, like VLC, to check if it plays. The segments update as the live stream continues. For long streams, run the command in the background. On Windows, use a batch file; on Mac or Linux, add & at the end. Stop it by pressing Ctrl+C. This way, you convert live videos to HLS without stopping the flow. Additional Tips and Best Practices Use -g and keyframe interval to align segment boundaries for smoother playback and faster switches. Monitor and tweak -crf and -preset to achieve a good quality/performance balance suitable for your hardware. Ensure your RTMP source uses codecs compatible with HLS (H.264 video, AAC audio) to avoid unnecessary transcoding. Use HTTPS URLs in production and secure servers to protect streams. Clean up old segments either via FFmpeg's delete_segments flag or external scheduled jobs to save disk space. Test playback with multiple players (VLC, Safari, Chrome) and devices. Be aware of increased latency in HLS compared to RTMP; lower segment durations reduce latency but may increase server load.