Jump to content

Weird problem with ffmpeg and longer .ts files


pataphysician

Recommended Posts

pataphysician

I use nextpvr to record and then these are automatically copied to my emby tv or movie collection, nextpvr records as the native .ts from the broadcast. I have never had any problems playing them until the 4.0 series server, when I had a strange problem on recordings that were over an hour, exactly at 1 hour 11 minute point in playback, ffmpeg would crash, initially I thought there was something wrong with the recordings, as it was just one show. But I had recorded and played back the previous season of this show on the 3.7 server just fine, and now these old recordings had the exact same problem. They all played back fine on Emby for Kody, but on AndroidTV and FireTV they would crash, which seemed to probably be something in the remuxing, which happens on these devices with .ts files, but not on Emby for Kodi on my Linux machine. As a temporary fix I converted the new recordings to mpeg2 in a mkv, which doesn't get remuxed. I don't have transcoding turned on, because my server is pretty weak, and all devices are connected by wire, so streaming .ts files is my preference as it uses so little server resources, and electricity, and has given me flawless playback until now. Now that I have some time, I looked at the issue again, and with the latest server 4.2.1, ffmpeg no longer hard crashes, but gets killed and restarts with jittery scene and repeat of audio, again always at the 1 hour 11 minute mark on any .ts recording over an hour, these restarts will happen every minute or so until the end of the film.

 

Attached is a log from when it happens where you can see ffmpeg get the q command which is a soft kill, it will then go on to create several new log files as it keeps happening, I can provide more files if necessary.

ffmpeg-directstream-6aef15f5-27dd-469f-8995-d01b147a107b_1.txt

Edited by pataphysician
Link to comment
Share on other sites

Hi there, if you turn transcoding back on, does it end up playing the same way, or does it transcode? This will tell us whether or not the app would have wanted to transcode it. Thanks.

Link to comment
Share on other sites

pataphysician

Here is the first log, playing the show and forwarding to 1 hour 10 minutes , then the log ends at the first stutter

ffmpeg-directstream-9020e277-7590-4524-b941-c38582f274bc_1.txt

 

Then there are a series of short new logs as it continues to stutter every minute or so

ffmpeg-directstream-eb347f5c-bfb0-47c8-91da-0d6ce52a1044_1.txt

ffmpeg-directstream-48dd20a4-aadf-4f69-a485-50c3a3eaf027_1.txt

ffmpeg-directstream-d0c93399-66a5-44ba-a4fe-9388dd4f05ac_1.txt

ffmpeg-directstream-ed92a89c-0914-469e-88fd-6869dc77ecdb_1.txt

Link to comment
Share on other sites

  • 4 weeks later...
pataphysician

Yeah, I'm  still having that problem, did you have a chance to look at the logs I posted in that thread some weeks ago, were they any help?

Link to comment
Share on other sites

pataphysician

I turned on debug features and then played one of the problem videos, PBS Country S1E1, fast forwarding to about 1:10 and then let it play, then used the send logs in the app just now, not sure how you will match that up with my user though.

Link to comment
Share on other sites

I turned on debug features and then played one of the problem videos, PBS Country S1E1, fast forwarding to about 1:10 and then let it play, then used the send logs in the app just now, not sure how you will match that up with my user though.

 

Please tell me the name of the Emby user that was logged in at the time and the exact time you sent the log.

 

Thanks.

Link to comment
Share on other sites

Can you describe what exactly happened when you let this item play after the FF?

 

There is so much in the logs that I cannot see your seek event.  There are a lot of discontinuity messages and the like that you can see sometimes in live streams.

 

Can you test recording one of these exact same channels with Emby?

Link to comment
Share on other sites

pataphysician

I did try to record with Emby with the same effect back when it first happened, I was thinking maybe its was due to NTFS data streams that nextpvr used for metadata, but no luck, they had the same problem.

 

This is Emby on Windows 7, but since Windows 7 is going to be out of support in a few months, I decided this weekend to start the switch to Linux and use Emby PVR, so I setup a test system and decided to copy over some of the problem recorded ts files, to see if I would still have the problem, and they all play completely fine.

 

So my guess is, this is either something specific to windows 7, or maybe there is something screwed up on my emby server which I've been using for three years, so either way it's probably not worth bothering with, thanks for all your help.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...