Fri Jan 11, 2013 6:02 pm by pnm
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