FAQ  •  Register  •  Login

Samsung PN60E550 losing connection before the stream ends

<<

velocipete

Serviio newbie

Posts: 10

Joined: Sun Dec 16, 2012 3:46 am

Post Thu Dec 27, 2012 4:07 am

Samsung PN60E550 losing connection before the stream ends

Being a Serviio forum Newbie, I had accidentally posted the following under a previously existing topic (Samsung AllShare TV disconnect problem), which discusses a problem that's different from what I am experiencing. I'm hoping that starting a new topic will get me some better results.
Here is my original post:

I have been using Serviio (running on Windows XP Pro) streaming to a Sony blu-ray player for quite some time, and it worked perfectly.
Recently, I bought a Samsung PN60E550 Plasma TV, which is given me disconnect problems.
Whether I stream from online sources or from shared folders (mostly .flv files), regardless of the length of the video, the TV will always lose the network connection a couple of minutes before the end of the video. In addition to the Samsung C/D/E renderer profile I also tried all the others. Some of them work with the TV, but will also terminate the video before the end, however at different times.
Just now I installed Serviio 1.1, but the problem remains.
After the TV loses connection I can switch to the blu-ray player. It still sees the Serviio server and will play everything just fine.
Samsung customer support are of no help, they will only deal with their Allshare server, which I found to be a useless piece of software.
Does somebody have an idea what I could try?

Since my original post I have done some more tests and it seems to me that the problem has to do with the transcoding of the videos.
When streaming videos in formats that are native to the TV (e.g. .mpg or .mov), the TV shows the correct video duration as hours:minutes:seconds and the video plays to the end. However, when streaming files that require transcoding (e.g. .avi or .flv) the TV is showing an incorrect duration, always 1:03:27 for .avi and always 578:42:13 for .flv, regardless of the actual length of the video, and will lose connection to the Serviio server a couple of minutes before the end of the video. The result is repeatable, the connection is lost at the exact same moment when playing the same file again with the same renderer profile.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Dec 28, 2012 12:40 am

Re: Samsung PN60E550 losing connection before the stream end

Does it end at 1:03:27 for avi files? Or is it file dependent?
<<

velocipete

Serviio newbie

Posts: 10

Joined: Sun Dec 16, 2012 3:46 am

Post Fri Dec 28, 2012 2:23 am

Re: Samsung PN60E550 losing connection before the stream end

The TV displays 1:03:27 as file duration for all .avi files, but doesn't end them at that time.
Individual files end at different times, but always prematurely.
The actual length of a file doesn't seem to matter, it always stops just a couple of minutes before the end.
My .avi files are mostly short, but I have .flv files up to 90 minutes in length which I can watch almost to the end before the TV loses connection.
Being no expert on this matter I am probably wrong about this, but here is my layman's theory on what it seems to be doing:
- I'm assuming that when Serviio is transcoding a file on the fly, it will open the original file, transcode a piece of it and then append it to a temporary file in the transcoding folder from where it's being streamed to the TV.
- I'm also assuming that Serviio will always be a bit ahead of the game, so that there is always enough data buffered in the temporary file for the video on the TV not to get stuck.
- Finally, I'm assuming that at the point when Serviio is done reading from the original file, the TV for some reason is thinking that the whole job is over and drops the connection.
Again, that's just a bunch of wild, uninformed guesses, please excuse my ignorance.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Dec 31, 2012 2:09 pm

Re: Samsung PN60E550 losing connection before the stream end

can you post ffmpeg -i of the avi file? I doubt it gets transcoded, unless it's a weird codec combination.
<<

velocipete

Serviio newbie

Posts: 10

Joined: Sun Dec 16, 2012 3:46 am

Post Fri Jan 04, 2013 4:17 am

Re: Samsung PN60E550 losing connection before the stream end

You might be right when you doubt that .avi files get transcoded. I disabled transcoding in Serviio and my TV showed the correct duration for all .avi files and played them properly without any problems.
Only if transcoding is enabled the shown file duration is wrong and the TV loses connection close to the end of the stream.

However, to turn transcoding off is not an option for playing .flv files, which are the majority of the files in my shared folders, because the TV will only say that the file format is not supported.
Strangely enough, when transcoding is disabled, the TV will play the same .flv files it rejected from the shared folder if they are started from the online sources, but it will still show the wrong duration and the connection will crash near the end.

Here are two outputs of ffmpeg, the first for an .avi file and the second for a .flv file:


C:\Program Files\Serviio\lib>ffmpeg -i "C:\Documents and Settings\Peter\My Docum
ents\My Videos\MVI_5711.AVI"
ffmpeg version N-42368-gbf53863 Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 10 2012 03:40:45 with gcc 4.6.3
configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='
-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enab
le-pthreads --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --pkg-config=pk
g-config
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 33.100 / 54. 33.100
libavformat 54. 15.102 / 54. 15.102
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 1.100 / 3. 1.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
[avi @ 0182D2C0] non-interleaved AVI
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, avi, from 'C:\Documents and Settings\Peter\My Documents\My Videos\MVI_
5711.AVI':
Metadata:
creation_time : 2012-11-28 18:47:09
encoder : CanonMVI03
Duration: 00:00:14.53, start: 0.000000, bitrate: 16446 kb/s
Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 640x480, 30 tbr, 30
tbn, 30 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16
, 1411 kb/s
At least one output file must be specified




C:\Program Files\Serviio\lib>ffmpeg -i "C:\Documents and Settings\Peter\My Docum
ents\My Recordings\test.flv"
ffmpeg version N-42368-gbf53863 Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 10 2012 03:40:45 with gcc 4.6.3
configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='
-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enab
le-pthreads --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --pkg-config=pk
g-config
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 33.100 / 54. 33.100
libavformat 54. 15.102 / 54. 15.102
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 1.100 / 3. 1.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
Input #0, flv, from 'C:\Documents and Settings\Peter\My Documents\My Recordings\
test.flv':
Metadata:
moovPosition : 40
avcprofile : 77
avclevel : 31
aacaot : 2
videoframerate : 25
audiochannels : 2
Duration: 00:58:16.15, start: 0.060000, bitrate: 910 kb/s
Stream #0:0: Video: h264 (Main), yuv420p, 512x288 [SAR 1:1 DAR 16:9], 200 tb
r, 1k tbn, 50 tbc
Stream #0:1: Audio: aac, 48000 Hz, stereo, s16
At least one output file must be specified
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Jan 04, 2013 11:18 am

Re: Samsung PN60E550 losing connection before the stream end

remove this from the c/d/e profile

  Code:
<Matches container="avi" vCodec="mjpeg" />
<<

velocipete

Serviio newbie

Posts: 10

Joined: Sun Dec 16, 2012 3:46 am

Post Sat Jan 05, 2013 3:52 am

Re: Samsung PN60E550 losing connection before the stream end

Thanks, my .avi files are now playing perfectly!
Do you have an equally great tip for getting my TV to properly recognize .flv files? That would really make my day.
<<

velocipete

Serviio newbie

Posts: 10

Joined: Sun Dec 16, 2012 3:46 am

Post Sat Jan 05, 2013 3:52 am

Re: Samsung PN60E550 losing connection before the stream end

-
Last edited by velocipete on Sun Jan 27, 2013 4:46 am, edited 2 times in total.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Jan 05, 2013 1:29 pm

Re: Samsung PN60E550 losing connection before the stream end

Does this file play with transcoding off?
<<

velocipete

Serviio newbie

Posts: 10

Joined: Sun Dec 16, 2012 3:46 am

Post Sat Jan 05, 2013 11:50 pm

Re: Samsung PN60E550 losing connection before the stream end

My TV will play .flv files from online sources whether transcoding is enabled or not.
Playing .flv files from shared folders works only if transcoding is enabled.
But regardless of online or shared, whether with or without transcoding, the TV will always lose connection to the server a couple of minutes before the end of the video.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Jan 06, 2013 1:00 pm

Re: Samsung PN60E550 losing connection before the stream end

Online sources are transcoded in any case, no matter the setting. You could try to use the latest FFmpeg
<<

pnm

Serviio newbie

Posts: 6

Joined: Fri Jan 11, 2013 2:21 pm

Post Fri Jan 11, 2013 6:02 pm

Re: Samsung PN60E550 losing connection before the stream end

I have exactly the same problem -- a Samsung smart-tv loosing the connection to the Serviio server ~2-3 minutes before the end of the video file. In this case flash in mp4 containers (which are always transcoded) coming from a linux machine with freshly compiled ffmpeg. Completely consistent -- it happens every time.

Any suggestions? As a slightly wild thought -- is it possible to get Serviio to seamlessly continue encoding/streaming something (replay the same file, next file in database, a short blank video) as it reaches the end of a file?

Log entries and info. below. I can see no log data for the connection going down (thoug lines 3-5 below are presumably the previous session being cleaned up).


2013-01-10 21:32:00,327 DEBUG [VideoDeliveryEngine] Delivering item '11427' for client 'IPAddress=/192.168.1.2, Profile=jv22Samsung'
2013-01-10 21:32:00,327 DEBUG [VideoDeliveryEngine] Delivering file 'test.mp4' using transcoding
2013-01-10 21:32:00,327 DEBUG [AbstractTranscodingDeliveryEngine] No other client uses transcoding job of file 'transcoding-temp-11415-jv22-ORIGINAL.stf', will stop the job
2013-01-10 21:32:00,327 DEBUG [AbstractTranscodingDeliveryEngine] Stopping previous transcoding job of file 'transcoding-temp-11415-jv22-ORIGINAL.stf'
2013-01-10 21:32:00,452 DEBUG [TranscodingJobListener] Deleted temp file '/tmp/Serviio/transcoding-temp-11415-jv22-ORIGINAL.stf': true
2013-01-10 21:32:00,452 DEBUG [AbstractTranscodingDeliveryEngine] No suitable transcoding job exists yet, start one for client 'IPAddress=/192.168.1.2, Profile=jv22Samsung'
2013-01-10 21:32:00,452 DEBUG [MediaItemDAOImpl] Getting file of media item 11427
2013-01-10 21:32:00,453 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: /home/paul/Videos/test.mp4
2013-01-10 21:32:00,453 DEBUG [ProcessExecutor] Starting ffmpeg -fflags +genpts -threads 2 -i /home/paul/Videos/test.mp4 -y -copyts -c:v copy -bsf:v h264_mp4toannexb -mpegts_m2ts_mode 1 -c:a ac3 -b:a 192k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-11427-jv22-ORIGINAL.stf
2013-01-10 21:32:00,953 DEBUG [FileBasedTranscodingDeliveryStrategy] Sending transcoding stream
2013-01-10 21:32:00,954 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file test.mp4: AVC_TS_MP_HD_AC3_T
2013-01-10 21:32:00,954 DEBUG [MediaItemDAOImpl] Marking MediaItem (id = 11427) as read
2013-01-10 21:32:01,001 DEBUG [LocalContentCacheDecorator] Cleared cache (local_resetafterplay)
2013-01-10 21:32:01,001 DEBUG [ResourceDeliveryProcessor] Stream entity has length: 50000000000
2013-01-10 21:32:01,002 DEBUG [ResourceDeliveryProcessor] Sending file back
2013-01-10 21:32:01,002 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/vnd.dlna.mpeg-tts,Content-Length: 50000000000,Date: Thu, 10 Jan 2013 20:32:01 GMT,Server: Linux, UPnP/1.0 DLNADOC/1.50, Serviio/1.1,Cache-control: no-cache,TimeSeekRange.dlna.org: npt=0-5234/5234,contentFeatures.dlna.org: DLNA.ORG_PN=AVC_TS_MP_HD_AC3_T;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000,transferMode.dlna.org: Streaming,realTimeInfo.dlna.org: DLNA.ORG_TLAG=*,MediaInfo.sec: SEC_Duration=5234000;]]
2013-01-10 21:32:01,674 DEBUG [WebServer] Incoming connection from /192.168.1.2:57132
2013-01-10 21:32:01,677 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.1.2
2013-01-10 21:32:01,677 DEBUG [ResourceTransportRequestHandler] HEAD /resource/11427/MEDIA_ITEM/AVC_TS_MP_HD_AC3_T-0/ORIGINAL HTTP/1.0, headers = [getCaptionInfo.sec: 1]]
2013-01-10 21:32:01,678 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.1.2
2013-01-10 21:32:01,678 DEBUG [ResourceDeliveryProcessor] Resource request accepted. Using client 'IPAddress=/192.168.1.2, Profile=jv22Samsung'
2013-01-10 21:32:01,678 DEBUG [ResourceDeliveryProcessor] Request for resource 11427 and type 'MEDIA_ITEM' received
2013-01-10 21:32:01,678 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 11427 (local)
2013-01-10 21:32:01,679 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 11427)
2013-01-10 21:32:01,679 DEBUG [VideoDAOImpl] Reading a Video (id = 11427)
2013-01-10 21:32:01,680 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 11427, format AVC_TS_MP_HD_AC3_T and profile jv22Samsung
2013-01-10 21:32:01,680 DEBUG [AbstractTranscodingDeliveryEngine] Getting media info for transcoded version of file test.mp4
2013-01-10 21:32:01,680 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file test.mp4: AVC_TS_MP_HD_AC3_T
2013-01-10 21:32:01,680 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 11427)
2013-01-10 21:32:01,681 DEBUG [MediaItemDAOImpl] Getting file of media item 11427
2013-01-10 21:32:01,681 DEBUG [ResourceDeliveryProcessor] Sending HEAD response back
2013-01-10 21:32:01,681 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/vnd.dlna.mpeg-tts,Content-Length: 50000000000,Date: Thu, 10 Jan 2013 20:32:01 GMT,Server: Linux, UPnP/1.0 DLNADOC/1.50, Serviio/1.1,Cache-control: no-cache,transferMode.dlna.org: Streaming,realTimeInfo.dlna.org: DLNA.ORG_TLAG=*,contentFeatures.dlna.org: DLNA.ORG_PN=AVC_TS_MP_HD_AC3_T;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000]]


mediainfo test.mp4
General
Complete name : test.mp4
Format : Flash Video
File size : 1.26 GiB
Duration : 1h 27mn
Overall bit rate : 2 069 Kbps

Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : 7
Duration : 1h 27mn
Bit rate mode : Constant
Nominal bit rate : 2 000 Kbps
Width : 960 pixels
Height : 544 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.153

Audio
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : HE-AAC / LC
Codec ID : 10
Duration : 1h 27mn
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz / 24.0 KHz
Compression mode : Lossy


ffmpeg -i test.mp4
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
built on Dec 16 2012 18:56:40 with gcc 4.7.2
configuration: --enable-static --disable-shared --bindir=/tmp/ffmpeg --disable-ffplay --disable-ffserver --enable-pthreads --disable-mmx --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-librtmp --pkg-config=pkg-config
libavutil 51. 32. 0 / 51. 32. 0
libavcodec 53. 42. 0 / 53. 42. 0
libavformat 53. 24. 0 / 53. 24. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 53. 0 / 2. 53. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, flv, from 'test.mp4':
Metadata:
moovPosition : 28
avcprofile : 77
avclevel : 31
aacaot : 2
videoframerate : 25
audiochannels : 2
Duration: 01:27:14.00, start: 0.000000, bitrate: 2069 kb/s
Stream #0:0: Video: h264 (Main), yuv420p, 960x544 [SAR 136:135 DAR 16:9], 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: aac, 48000 Hz, stereo, s16
<<

pnm

Serviio newbie

Posts: 6

Joined: Fri Jan 11, 2013 2:21 pm

Post Mon Jan 14, 2013 8:02 am

Re: Samsung PN60E550 losing connection before the stream end

FWIW -- converting the files in advance (to m2ts files using the ffmpeg command line exposed in the log) and then playing them through Serviio works fine, so this is definitely a problem with Serviio and the Samsung not negotiating the end of the transcoding session correctly. Advance conversion all mp4s via a script is a solution to the problem -- the only disadvantages are that it's not quite as convenient, and gives slightly larger files than the mp4s (though it might be possible to find a more compact format that the Samsung accepts).
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Jan 15, 2013 5:54 pm

Re: Samsung PN60E550 losing connection before the stream end

does this happen with flash videos only?
<<

pnm

Serviio newbie

Posts: 6

Joined: Fri Jan 11, 2013 2:21 pm

Post Wed Jan 16, 2013 9:15 am

Re: Samsung PN60E550 losing connection before the stream end

I think so. It happens every time with flash in mp4 containers and exactly the same happens if I convert the mp4 to mkv containers before streaming (ie. still flash inside the container).

It doesn't happen for the same files pre-converted to m2ts (ie. the format Serviio encodes to on the fly, but fully converted to a file on disk first and then streamed). Or -- in the one case I checked -- such an m2ts repackaged in a mkv container.

I have only limited experience of other formats, but haven't experienced it with anything other than flash.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Jan 17, 2013 3:06 pm

Re: Samsung PN60E550 losing connection before the stream end

maybe it's related to any transcoded format...

Could you try to play the same file via PS3MediaServer?
<<

pnm

Serviio newbie

Posts: 6

Joined: Fri Jan 11, 2013 2:21 pm

Post Mon Jan 21, 2013 1:32 pm

Re: Samsung PN60E550 losing connection before the stream end

Actually I can't get it to play at all in PS3MediaServer (the tv bombs, so I suspect PS3MS is either trying to transcode to something the tv doesn't accept or sending the flash video -- which the tv doesn't understand -- untranscoded).

I installed Serviio primarily to play the Flash/mp4 files, so I don't have files in other formats. Will try to find some and experiment a little to see if there's a pattern here (ie. transcoding generally via Serviio + Samsung AllPlay renderer on this tv is the problem, or it's specifically Flash + AllPlay) -- if I find anything I'll post again. My instinct is that there'd be a flood of posts if all transcoding to Samsung AllPlay renderers consistently lost connections 3 minutes before the end of the film, so it probably is just this particular Flash/tv/network setup.

As I said, the solution for me is to transcode in advance via a script rather than on the fly -- this works perfectly, so for my part the transcoding issue isn't a big problem. But thanks a lot for following it up so far.
<<

velocipete

Serviio newbie

Posts: 10

Joined: Sun Dec 16, 2012 3:46 am

Post Sun Jan 27, 2013 4:56 am

Re: Samsung PN60E550 losing connection before the stream end

To transcode files in advance may be a (cumbersome) solution for files located on shared folders, but unfortunately not applicable to those from online sources.

Why do some of my posts show up double in the forum? Is there a way to delete them?

Return to Samsung

Who is online

Users browsing this forum: No registered users and 7 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.