Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
btpoole
Level 7

File Conversion Problem. . .Maybe

Attempting to convert ts to mp4 file for play on Roku. I am using Handbrake and all seems good. I go to roku and pull up show everything looks good. Press play and it dumps me back. When I first press play, it does come up for a second as though it is loading, but then dumps back. Any ideas to what may cause this. I have attempted (3) different shows I have converted all with same results.
Thanks
0 Kudos
3 Replies
b14d3
Level 7

Re: File Conversion Problem. . .Maybe

Can we get clips of the xml to take a look at that?
0 Kudos
destruk
Level 10

Re: File Conversion Problem. . .Maybe

If the filename you are trying to play has spaces, those might need to be converted to %20 url encoded, or %2520 double url encoded depending on your server. Also ensure the file has permissions for anonymous reading (chmod 777)
What does it say in debug when it fails? Do other files play with the same encode settings for the channel? etc etc.
0 Kudos
btpoole
Level 7

Re: File Conversion Problem. . .Maybe

Sorry for delay in replying.

The channel was created by a user for the NextPVR program. I think it is no longer being worked on but was suppose to work according to other users. When I run the ts file thru the batch file for conversion it creates the mp4 and the bif files. I am able to pull up the show on the channel and it shows a scene not just a generic or blank icon. When play is pushed it gives a buffering bar for a second then dumps out. To make sure the file was good I was able to upload it to Plex and watch the show with no problems. Here is the code that processes the file for conversion.

set roku_dir=E:\PROGRAM INSTALL BACKUPS\roku-npvr-server

rem ---------------------------------------------------------
rem Convert the video to mp4
rem----------------------------------------------------------
"%roku_dir%\Third Party\HandBrakeCLI\HandBrakeCLI.exe" -i %1 -o "%~dpn1.mp4" -b 1500 -B 128 -R 48 --custom-anamorphic --keep-display-aspect -O -r 29.97

rem ---------------------------------------------------------
rem Create the video thumnail png
rem----------------------------------------------------------

"%roku_dir%\Third Party\ffmpeg\ffmpeg.exe" -i "%~dpn1.mp4" -vframes 1 -ss 400 -s 224x158 -f image2 "%~dpn1_sd.png"
"%roku_dir%\Third Party\ffmpeg\ffmpeg.exe" -i "%~dpn1.mp4" -vframes 1 -ss 400 -s 304x238 -f image2 "%~dpn1_hd.png"


rem ---------------------------------------------------------
rem Create the bif files
rem----------------------------------------------------------

REMmkdir "%~dpn1_sd"
REM mkdir "%~dpn1_hd

"%roku_dir%\Third Party\ffmpeg\ffmpeg.exe" -i "%~dpn1.mp4" -r .1 -s 240x180 "%~dpn1_sd\%%08d.jpg"
"%roku_dir%\reindex.exe" "%~dpn1_sd" > "%roku_dir%\logs\sdlog.txt"
"%roku_dir%\Third Party\ffmpeg\ffmpeg.exe" -i "%~dpn1.mp4" -r .1 -s 320x240 "%~dpn1_hd\%%08d.jpg"
"%roku_dir%\reindex.exe" "%~dpn1_hd" > "%roku_dir%\logs\hdlog.txt"

pushd "%~dp1"

"%roku_dir%\Third Party\Roku\biftool.exe" -t 10000 "%~dpn1_sd"
"%roku_dir%\Third Party\Roku\biftool.exe" -t 10000 "%~dpn1_hd"

popd

rmdir /s /q "%~dpn1_sd"
rmdir /s /q "%~dpn1_hd"
0 Kudos