soniCron 5 Posted June 22, 2015 Posted June 22, 2015 (Not sure if this belongs here or the Roku section, but it seems to be a server issue, not a client issue.) Running Ubuntu 15.04 server 3.0.5641.4 and playing to Roku: I noticed that transcoding seemed to be a little slow on my server. Watching the play progress/transcode progress on the dashboard, it would take watching more than half of the program for the transcode bar to reach the end. So I looked into the logs to see what's going on. Long story short, it's not going slow, but it seems to be transcoding the same portions over and over and over until transcoding is complete. Here's the rundown: According to the transcoding logs, the content in question is transcoding at about 220fps. A 44 minute program should complete transcoding in about 5 minutes under these conditions. Halfway through the 44 minute program (22 mins in), it's still transcoding. First I thought it was throttling. Nope. I had turned that off at some point, so it is transcoding at full speed the entire time. Then I thought it was doing it piecemeal, but the progress didn't reflect that. If it were keeping just ahead of the watch progress, it would stay just barely ahead the whole time. Not the case. It will transcode quite a ways ahead, stop for a while, then transcode a little more, stop, etc. Then I realized if I refreshed the dashboard, sometimes the transcoding bar would go backward, as if it hadn't already transcoded something. So I looked at the logs further. Every 2 minutes (approximately), a new transcoding log was being created. Its start point ("-ss hh:mm:ss.000") was 2 minutes after the last start point from the previous transcoding log. However, according to the log, the transcoding would get 15-20 minutes worth of program material in each shot. ("frame=32295 fps=232 q=24.0 size=N/A time=00:22:27.05 bitrate=N/A"...) Then looking at the main server log, it was cleaning up old transcode files that had the same position id #s as older transcode files. (In other words: the bit that's tacked on and incremented from FFmpeg's "start_number" parameter.) Basically, at least according to the logs and FFmpeg's output, on my setup when playing to Roku, the server is transcoding about 242 minutes, or FOUR HOURS worth of video for every 44 minute program! It varies slightly depending on transcoding speed, but it's effectively transcoding the same material over and over and over, starting at 2 minutes intervals in the program material every 2 minutes real-world time. Surely it should stop the transcode if it's going to start over every 2 minutes, or start from the last point the FFmpeg output completed before the process was killed... no? I could understand if it would transcode 2 minute chunks and wait for the player to catch up before encoding the next 2 minute chunk, but it's encoding full blast, as far as it can until 2 minutes are up, then it starts over at last program time + 2 minutes and goes again full blast and keeps this up until it's able to complete the full transcoding in one of its sprints before its 2 minute cycle is up. Turning throttling on slows this process, but it still keeps starting the transcode process at time signatures that have already been transcoded, every 2 minutes. It actually makes it worse because it transcodes several more times over before it's able to complete the stream. This doesn't seem to happen when playing to the web client or the Android client. If it makes a difference, the FFmpeg command between the Roku and the Android client appear identical, except for different sizing mechanisms. So something in the server seems to think it needs to stop and restart the transcoding when playing to the Roku. The server logs don't indicate anything that triggers this. It just says it's killing FFmpeg, cleaning up, and starting a new transcode. Also, it should be emphasized: it's not exactly 2 minutes each time. It varies from 2 minutes to 2 and a half or so. So it doesn't seem to be a timer or something that triggers this behavior. Just thought y'all should know something is afoot!
soniCron 5 Posted June 27, 2015 Author Posted June 27, 2015 Is nobody else experiencing this issue? It manifests on the Roku by video jumping back a second or two or three every so often, causing subtitles to get out of sync. Anybody else seeing this?
Luke 42077 Posted June 29, 2015 Posted June 29, 2015 the latest release should not be creating a transcoding log every 2 minutes. 1
soniCron 5 Posted July 1, 2015 Author Posted July 1, 2015 I'm using 3.0.5641.4 on Ubuntu. Is this the version you're referring to? Or you're saying you've fixed it in another version?Thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now