Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bounce
Newbie

Re: Correct FFMPEG Settings Roku & HLS

Error Spit Out with Non-Encrypted Video Modification:
=================================================================
Warning occurred while setting a field of an RoSGNode
-- Tried to set nonexistent field "streamformat" of a "Video" node
   at line 111 of file pkg:/source/PlayerTask.brs
=================================================================

That Line is as expected...
video.streamformat = "hls"

Plays HLS fine from CloudFront from VLC Player.. Seems like a format issue that Roku doesn't like. Here is the main HLS File
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=8628k,CODECS="avc1.640028,mp4a.40.2"
final-stream-high.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=6628k,CODECS="avc1.4d001f,mp4a.40.2"
final-stream-wifi4.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=5128k,CODECS="avc1.4d001f,mp4a.40.2"
final-stream-wifi3.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3596k,CODECS="avc1.4d001f,mp4a.40.2"
final-stream-med.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1296k,CODECS="avc1.42001f,mp4a.40.2"
final-stream-wifi1.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=664k,CODECS="avc1.42001e,avc1.66.30,mp4a.40.2"
final-stream-low.m3u8


And Supporting Cast Member:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:11
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:10.535333,
final-stream-low1.ts
#EXTINF:10.514000,
final-stream-low2.ts
#EXTINF:8.978622,
final-stream-low3.ts
#EXT-X-ENDLIST
0 Kudos
bounce
Newbie

Re: Correct FFMPEG Settings Roku & HLS

Also Attaching Debug Info From VideoSpec

Here is the File that Works:
***** Analyzed File Results *****

*** General Parameters ***
- Name:  HLS_15M_00001.ts
- Container:  Mpeg Transport Stream
- Size:  1.25 MB
- Duration:  6s 6ms
- Bitrate:  1 075 Kbps

*** Video Track Parameters ***
- Format:  H.264/MPEG-4 AVC
- Bitrate:  Max.: --- / Average: 893 Kbps / Min.: ---
- Frame rate (fps):  Max.: Undefined / Average: 59.940 / Min.: Undefined
- Encoding profile:  Main@L3.1
- Image size:  960*540
- Pixel Aspect Ratio:  Undefined
- Display Aspect Ratio:  16:9
- Interlacing:  Progressive

*** First Audio Track Parameters ***
- Format:  AAC - MPEG-4 audio
- Bitrate:  127 Kbps
- Resolution:  Undefined
- Rate:  44.1 KHz
- Channel(s):  2 (stereo)
- Position:  Front: L R

*** Miscellaneous ***
- Subtitle(s): No Subtitle
- Album: Undefined
- Performer: Undefined
- Genre: Undefined
- Encoded date: Undefined
- Album artist: Undefined


Video That Doesn't Work:
***** Analyzed File Results *****

*** General Parameters ***
- Name:  final-stream-high2.ts
- Container:  Mpeg Transport Stream
- Size:  11.01 MB
- Duration:  9s 309ms
- Bitrate:  9 463 Kbps

*** Video Track Parameters ***
- Format:  H.264/MPEG-4 AVC
- Bitrate:  Max.: --- / Average: --- / Min.: ---
- Frame rate (fps):  Max.: Undefined / Average: 119.880 / Min.: Undefined
- Encoding profile:  High@L4.0
- Image size:  1920*1080
- Pixel Aspect Ratio:  Undefined
- Display Aspect Ratio:  16:9
- Interlacing:  Progressive

*** First Audio Track Parameters ***
- Format:  AAC - MPEG-4 audio
- Bitrate:  Undefined
- Resolution:  Undefined
- Rate:  48.0 KHz
- Channel(s):  2 (stereo)
- Position:  Front: L R

*** Miscellaneous ***
- Subtitle(s): No Subtitle
- Album: Undefined
- Performer: Undefined
- Genre: Undefined
- Encoded date: Undefined
- Album artist: Undefined


So I guess my questions comparing the results are as followed:
No Video Bitrate? High Frame Rate? Differing Encoding Profile? No Audio Bitrate? High Sample Rate? 44khz vs 48?

If one of these is bad, how shall I go about correcting?
0 Kudos
mkammes
Roku Guru

Re: Correct FFMPEG Settings Roku & HLS

Edit: Fixed it!

 

There is a trailing "0" in your OUTPUT_HLS statement. In addition, -hls_wrap has been deprecated.

I also added -report to trace issues.

OUTPUT_HLS="-hls_time 10 -hls_key_info_file keyinfo -hls_list_size 0 -hls_flags delete_segments -hls_allow_cache 0 -start_number 1 -segment_format mpegts -copyts -report" #multiple segments

 

0 Kudos