Encoding stops after 15-20 seconds

General discussion about Universal Media Server (no support or requests)
Post Reply
dmitche3
Posts: 15
Joined: Thu Feb 19, 2015 12:38 pm

Encoding stops after 15-20 seconds

Post by dmitche3 »

I am trying to use the encoding to play back my MKV files on my Samsung E6100(renderer used). They play back fine without encoding for years. I wanted to try the encoding because I'm watching a lot of Swedish films (no, not porn but Wallander) and the subtitles are way to small to read them. So, that's my initial problem and the encoding was to be my work around. I'm tried just about everything that I can think of. The log files show a strange message that I can't figure out. The subtitles are in the MKV files ripped using ffmpeg.

Just past line 16.580 in the log file is where the issue occurs. There isn't anything obvious. I haven't an educated guess of what is going on but an uneducated one is that it hit the 200MB buffer and something went wrong. So I upped it to 1000MB without any changes. The buffering message never got past 150k before it (I think) received something from the TV:

"
TRACE 2021-06-05 20:19:48.850 [HTTPv2 Request Worker 14] Stripping preceding slash from: /upnp/control/content_directory
TRACE 2021-06-05 20:19:48.850 [HTTPv2 Request Worker 14] Matched media renderer "[TV]doug" based on address 192.168.0.74
"

Thanks in advance.
Attachments
debug.log
(2.78 MiB) Downloaded 18 times
User avatar
SubJunk
Lead Developer
Posts: 3386
Joined: Sun May 27, 2012 4:12 pm

Re: Encoding stops after 15-20 seconds

Post by SubJunk »

Firstly please make sure you're using the latest UMS as there have been a lot of bugfixes since the one you're on.
Then please replace your file renderers/Samsung-NotCD.conf with the attached one to test
Samsung-NotCD.conf
(2.11 KiB) Downloaded 22 times
dmitche3
Posts: 15
Joined: Thu Feb 19, 2015 12:38 pm

Re: Encoding stops after 15-20 seconds

Post by dmitche3 »

Thanks. Yes, I upgraded this shortly after I posted with the same results. I did encounter a different error and that simply hitting the "restart" button doesn't actually reset everything. LOL. After I had stopped messing with the encoding issue I wanted to go back and play the videos, so I listed the MKV extension so as not to transcode and hit the restart server yet it continued acting up, scaring the pajeevers out of me.
Testing write now. I'll modify this posting in a few hours.
dmitche3
Posts: 15
Joined: Thu Feb 19, 2015 12:38 pm

Re: Encoding stops after 15-20 seconds

Post by dmitche3 »

No such luck. I noticed that the Mecoder stops about 8-10 seconds before the video. I'm pretty sure but not certain that before they two coincided much closer. Perhaps the size....
I shut it down immediately after the video stopped. Well, I let a few seconds pass.
New log files.
Thanks. Just made a $20 donation for the great effort you people have done on cleaning up and upgrading that PS3 code and a lot more. :)


Addendum: I just tried this with another MKV file and rather than using mencoder it used ffmpeg rather than mendcoder and worked fine but that file didn't have subtitles. :(
I unchecked the "ffmpeg pass to menencode for problemtic subittles and ffmpeg and tried the original file. It aborted the same as mencoder. :(
Attachments
debug.zip
(186.53 KiB) Downloaded 18 times
dmitche3
Posts: 15
Joined: Thu Feb 19, 2015 12:38 pm

Re: Encoding stops after 15-20 seconds

Post by dmitche3 »

added adendums. See previous posts.

Before I list more findings I should ask the question, When transcoding do the subtitle options effect subtiles that are in the video or just external subtitles? If the latter I'm wasting my time, even though I don't mind working on the problem to figure out what is going on. :)

BTW, I am completely shutting down UMS after each change and not doing a restart server.
General info: 16GB memory, 6.4GB free. 1050-TI video card, AMD 3600x (not overclocked), NMVE or what ever it is drive. lol

I had to rewrite this next section several times based on what I experienced. So far I've had mixed results using ffmpeg. I flipped the box to not pass troublesome subtitles to mencoder and ffmpeg is working sometimes and not others on the same file. I tried disabling subtitles which I thought had done the trick even though subtitles were still displayed. I also tried turning on "use font size,color..." which at first I thought fixed the problem but restarting the server and playing other vids I had issues.
The videos that I'm playing were ripped from DVD using the following ffmpeg command if that helps which works to my needs for the past several years.

ffmpeg.exe -analyzeduration 100M -probesize 100M -i %FILE% %GPUENCODE% -vf scale=1920x1080 -crf 30 -rc-lookahead 8 -bf 8 %FILE%.ripped.mkv

The conf file I enclosed was when I thought it was running. I noticed that ffmpeg was filling up the buffer and my memory was being maintained around the 200MB. I upped my limit to 600 or more since then but it doesn't appear to matter.

Having said this, I then went to play a recently converted mkv and it ran without transcoding. No changes on how I ripped the DVD. I can only surmise that the subtitles on the foreign shows (DVD's are coded for America) is somehow messed up. But I'm at a lose as to why the MKV is not transcoding on Supernatural Season 15 when I tell it not to pass thru. I went into the Samsung E6100 renderer and the Samsung NOtCD and commented out references to MKV being a valid file but that didn't make any differences. I remember with PS3 that was an issue if it wasn't listed but... It still plays the MKV straight as is.

I'm now so confused. I did my tests over three times with the same results. I turned off the TV and tried the tests and vids that were not be transcoded are now being transcoded. I'm not sure if the TV, UMS, or both are getting confused.LOL.
For the time being I'll add back the MKV file extension to the list of formats passed through and go back to working normal.:)

And again, restart server doesn't appear to reload the configuration settings. Which you probably already knew.
User avatar
mik_s
Moderator
Posts: 382
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Encoding stops after 15-20 seconds

Post by mik_s »

I don't have my log viewer setup at the moment to have a good look, but at a glance I did see a connection reset in your first log. I'll have a closer look later when I can and see if I can see why it is happening.
Could you create new logs and pack them using the option from the GUI (see the red section above) as this will include your configuration files along with your trace logs.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
User avatar
mik_s
Moderator
Posts: 382
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Encoding stops after 15-20 seconds

Post by mik_s »

dmitche3 wrote: Sun Jun 06, 2021 12:22 pm TRACE 2021-06-05 20:19:48.850 [HTTPv2 Request Worker 14] Stripping preceding slash from: /upnp/control/content_directory
TRACE 2021-06-05 20:19:48.850 [HTTPv2 Request Worker 14] Matched media renderer "[TV]doug" based on address 192.168.0.74
thats normal, the error happens a bit later

Code: Select all

DEBUG 2021-06-05 20:14:26.174 [HTTPv2 Request Worker 20] Caught exception: Connection reset
TRACE 2021-06-05 20:14:26.174 [HTTPv2 Request Worker 20] 
java.net.SocketException: Connection reset
	at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(Unknown Source)
	at java.base/sun.nio.ch.SocketChannelImpl.read(Unknown Source)
	at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)
	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
	at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
I don't know the cause, but I don't see any speed tests done on your network. It think that UMS is trying to limit the bitrate of transcoded files, but maybe the quality is too low for your TV so it throws an error.
dmitche3 wrote: Mon Jun 07, 2021 12:53 pm Before I list more findings I should ask the question, When transcoding do the subtitle options effect subtiles that are in the video or just external subtitles? If the latter I'm wasting my time, even though I don't mind working on the problem to figure out what is going on.
Depends on your settings but should be able to do both. Check the #--TRANSCODE--# folder for all available combinations.
dmitche3 wrote: Mon Jun 07, 2021 12:53 pm Having said this, I then went to play a recently converted mkv and it ran without transcoding. No changes on how I ripped the DVD. I can only surmise that the subtitles on the foreign shows (DVD's are coded for America) is somehow messed up.
I do see some files that will be transcoded because they have VOBSUB subtitles, and that is probably not defined in the conf. Not sure if it is compatible with your TV so that could be right.

It is possible something is wrong with your configuration but will need to see your conf files to be sure.

It might be better to use FFmpeg as your default renderer and use the #--TRANSCODE--# to test out the options. I don't think I have used any other transcoding engines and have them disabled.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
dmitche3
Posts: 15
Joined: Thu Feb 19, 2015 12:38 pm

Re: Encoding stops after 15-20 seconds

Post by dmitche3 »

mik_s wrote: Mon Jun 07, 2021 5:04 pm I don't have my log viewer setup at the moment to have a good look, but at a glance I did see a connection reset in your first log. I'll have a closer look later when I can and see if I can see why it is happening.
Could you create new logs and pack them using the option from the GUI (see the red section above) as this will include your configuration files along with your trace logs.
I can't get to it today but tomorrow or late tonight I'll do so. No rush on this so don't put yourself out too much on my behalf.
dmitche3
Posts: 15
Joined: Thu Feb 19, 2015 12:38 pm

Re: Encoding stops after 15-20 seconds

Post by dmitche3 »

I'm sorry but I forgot all about this. I went back to my defaults which didn't require encoding and forgot about this issue. It appears that even when re-encoding is working that the subtitles that are in the videos are unaffected. I'm assuming that the settings are for external subtitle files and won't have an impact on the other in the video.
I'm also sorry for putting this in the General Discussions rather than Support. My bad.
Thank you for your help and I am so happy to say after looking over the code and tests to see professional programmers working on this.
atifk87
Posts: 41
Joined: Fri Apr 02, 2021 5:20 pm

Re: Encoding stops after 15-20 seconds

Post by atifk87 »

dmitche3 wrote: Fri Jun 18, 2021 12:35 am I'm sorry but I forgot all about this. I went back to my defaults which didn't require encoding and forgot about this issue. It appears that even when re-encoding is working that the subtitles that are in the videos are unaffected. I'm assuming that the settings are for external subtitle files and won't have an impact on the other in the video.
I'm also sorry for putting this in the General Discussions rather than Support. My bad.
Thank you for your help and I am so happy to say after looking over the code and tests to see professional programmers working on this.
Looking forward to it.
Post Reply