You can easily configure videos for use with your Roku set-top box using one of the Roku presets on Encoding.com. Simply choose a preset, then set a destination location for the output files and you’re done. See below for details and screenshots.
Roku Preset for Single Bitrate Output
After uploading your source video file in the web interface, select roku_800 from the drop-down listing for an 800kbps bitrate (screenshot below). You can also choose other bitrates: roku_1200, roku_1800, roku_2700.
API template
If you are sending XML to our API, use this template to make a 800kbps Roku mp4 file:
<?xml version="1.0"?> <query> <format> <output>roku_800</output> <destination>ftp://username:password@yourserver.com/output/filename.mp4?passive=yes</destination> <size>640x480</size> <bitrate>800k</bitrate> <audio_bitrate>128k</audio_bitrate> <audio_sample_rate>44100</audio_sample_rate> <audio_channels_number>2</audio_channels_number> <keep_aspect_ratio>yes</keep_aspect_ratio> <video_codec>libx264</video_codec> <profile>roku</profile> <audio_codec>libfaac</audio_codec> <keyframe>200</keyframe> <audio_volume>100</audio_volume> <file_extension>mp4</file_extension> </format> </query>
HTTP Live Streaming for Roku (Adaptive Bitrate Streaming)
After uploading your source video file in the web interface, select roku_HLS from the drop-down listing to generate the index file (.m3u8) and h264 segments (.ts) for adaptive streaming (screenshot below).
If you are using the API to run Roku HLS adaptive bitrate jobs, here is your XML template:
<?xml version="1.0"?> <query> <format> <output>roku_hls</output> <destination>ftp://username:password@yourserver.com/output/filename.m3u8?passive=yes</destination> <size>0x480</size> <audio_bitrate>96k</audio_bitrate> <audio_sample_rate>44100</audio_sample_rate> <audio_channels_number>2</audio_channels_number> <keep_aspect_ratio>yes</keep_aspect_ratio> <video_codec>libx264</video_codec> <profile>roku</profile> <audio_codec>libfaac</audio_codec> <audio_volume>100</audio_volume> <bitrates>1200k,800k,600k,400k,200k,110k</bitrates> <framerates>29.97,29.97,29.97,29.97,15,10</framerates> <keyframes>90,90,90,90,45,30</keyframes> <pack_files>no</pack_files> <segment_duration>10</segment_duration> <add_audio_only>no</add_audio_only> <still_image>no</still_image> </format> </query>
Additional notes regarding Roku HTTP Livestreaming
We strongly recommend against the use of two-pass encoding, since in that case you will see a blurry I-frame “popping” at the beginning of each 10-second segment. Also, be aware that 5 different bitrates will output 30 segment (.ts) files per minute of video, so a 10-minute video will be 300 files. To manage all of the files well, we also suggest that you organize your Roku encodes into a separate destination directory. Otherwise you could find yourself having thousands of segment files in one directory.