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: 
Veeta
Visitor

30fps MP4 plays only after conversion to 24fps

I'm having trouble getting a 30fps source stream to play on a Roku 3 with 7.1.0 firmware. I used ffmpeg to change it from 29.97fps source to 23.98fps and it started working. The video encoding guidelines at https://sdkdocs.roku.com/display/sdkdoc/Video+Encoding+Guidelines#VideoEncodingGuidelines-SupportedV... say H.264 should play with either frame rate, so I'm not sure what else might be the problem.

Here is what ffprobe tells me each stream is...

Does not play (Video SG node give error -5 : Video error -5 - malformed data):
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720, 1016 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)


Does play:
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720, 957 kb/s, 23.98 fps, 23.98 tbr, 19184 tbn, 47.96 tbc (default)


Audio streams are identical.
0 Kudos
3 REPLIES 3
renojim
Community Streaming Expert

Re: 30fps MP4 plays only after conversion to 24fps

That's odd. I always encode my videos with a 29.97fps frame rate because there used to be a problem with 24fps way, way back. I haven't seen any problems with 7.1 firmware, so I wonder if it's something else. As a test, you might want to re-encode the original with ffmpeg to 29.97fps and see what happens. Maybe the frame rate change is a red herring and it was just re-encoding it that "fixed" it.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
Veeta
Visitor

Re: 30fps MP4 plays only after conversion to 24fps

I tried re-encoding the original to the same resolution, profile, and frame rate as the original. Still the same result of it not playing. ffprobe says:

    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 1251 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)


Still, the 30fps streams don't play but the 24fps streams do. I'm going to try to get ffprobe to analyze the stream a little more thoroughly.
0 Kudos
Veeta
Visitor

Re: 30fps MP4 plays only after conversion to 24fps

Using roVideoScreen instead of a scene graph video node gave me a little more information.

showHomeScreen | msg = Service does not support range requests. | index =  0
Video status: 0 0
showHomeScreen | msg = Unspecified or invalid track path/url. | index = 0
Video status: 0 0


While it's true that Range requests aren't supported by this simple web server I'm using locally, the 24fps stream will play and 29.97 will not. Not even if I run it through ffmpeg to "sanitize" it first. I'll try again with a different server which supports Range requests, but I'd love to know what the correlation is for requiring Range support vs. frame rate.
0 Kudos