FAQ  •  Register  •  Login

Sony KDL-40NX711 stutters playing MPEG transport streams

<<

AeroSC

Serviio newbie

Posts: 12

Joined: Fri Sep 30, 2011 1:49 am

Post Fri Sep 30, 2011 2:14 am

Sony KDL-40NX711 stutters playing MPEG transport streams

I'm having a problem with constant stuttering during playback of recorded HD TV shows encoded as mpeg transport streams. Regular mpeg2 files from standard def shows play fine with no hiccups. I thought I could lower the bitrate settings in the device profile, but it doesn't seem to make a difference. Reading the forum, it seems that parameter is only invoked if the file has to be transcoded.
Anybody have any ideas?
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Fri Sep 30, 2011 5:11 am

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

AeroSC wrote:I'm having a problem with constant stuttering during playback of recorded HD TV shows encoded as mpeg transport streams. Regular mpeg2 files from standard def shows play fine with no hiccups. I thought I could lower the bitrate settings in the device profile, but it doesn't seem to make a difference. Reading the forum, it seems that parameter is only invoked if the file has to be transcoded.
Anybody have any ideas?


post ffmpeg -i for the file that wont play (see my signiture for howto)
Phil Bennett
Beta Tester Group
Wiki | FAQ

Samsung LE40C750 LCD | Samsung BD-C5900 | Sony PS3 | Windows 7 |
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Fri Sep 30, 2011 7:55 am

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

You could also check the video bitrate with that tool. 20Mbps/25Mbps should be the maximum bitrate supported by Sony Bravia TV.
Also, what is your network configuration? wired, wifi,etc?
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

AeroSC

Serviio newbie

Posts: 12

Joined: Fri Sep 30, 2011 1:49 am

Post Fri Sep 30, 2011 4:58 pm

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

Thanks for the replies and I'll certainly check the file with the tools mentioned (I knew of them and should have done that in the first place).

My suspicion is that I have a bandwidth issue (802.11n single band connection between the server and the TV). Quick math based on file size and recording time suggests the file should be streaming at a max of around 15Mbps (1.8MB/sec) and, thus, within the limits of the renderer of the TV to handle.

Pardon my ignorance, but does the server stream at the native bitrate of the file (for files the TV can display without transcoding) or does it vary the bitrate based on the available network bandwidth (a la Netflix)? If it is at the native bitrate, is there anything I can do to the device profile to have all mpeg2ts files transcoded to a lower bitrate?
<<

AeroSC

Serviio newbie

Posts: 12

Joined: Fri Sep 30, 2011 1:49 am

Post Sat Oct 01, 2011 12:58 am

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

As I thought, the measured bitrate is well below 20Mbps for the files I'm trying to play. The average is around 10Mbps and the peak was under 17Mbps. I should have no problems passing that amount of data over a 802.11n connection. Ffmpeg analysis to follow.
<<

AeroSC

Serviio newbie

Posts: 12

Joined: Fri Sep 30, 2011 1:49 am

Post Sat Oct 01, 2011 1:05 am

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

Ffmpeg -i result

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\HTPC>cd ..

C:\Documents and Settings>cd ..

C:\>cd program files

C:\Program Files>cd serviio

C:\Program Files\Serviio>cd lib

C:\Program Files\Serviio\lib>ffmpeg -i "F:\Nikita-(Alexandra)-2011-02-17-0.tp"
ffmpeg version N-31480-g8bc3a48, Copyright (c) 2000-2011 the FFmpeg developers
built on Jul 14 2011 23:37:53 with gcc 4.4.2
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-mingw32- --pkg-config=pkg-co
nfig
libavutil 51. 11. 0 / 51. 11. 0
libavcodec 53. 8. 0 / 53. 8. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 25. 0 / 2. 25. 0
libswscale 2. 0. 0 / 2. 0. 0
[mpeg2video @ 0176a940] mpeg_decode_postinit() failure
Last message repeated 11 times
Input #0, mpegts, from 'F:\Nikita-(Alexandra)-2011-02-17-0.tp':
Duration: 01:02:57.69, start: 6128.396933, bitrate: 10429 kb/s
Program 33707
Stream #0.0[0x800]: Video: mpeg2video (Main), yuv420p, 1920x1080 [PAR 1:1 DA
R 16:9], 19210 kb/s, 33.16 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x801](eng): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
At least one output file must be specified

C:\Program Files\Serviio\lib>
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sat Oct 01, 2011 1:12 am

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

[mpeg2video @ 0176a940] mpeg_decode_postinit() failure <----- corrupt file.
Phil Bennett
Beta Tester Group
Wiki | FAQ

Samsung LE40C750 LCD | Samsung BD-C5900 | Sony PS3 | Windows 7 |
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

AeroSC

Serviio newbie

Posts: 12

Joined: Fri Sep 30, 2011 1:49 am

Post Sat Oct 01, 2011 2:10 am

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

Are you sure this is a problem? I've got another file (standard def mpeg) that gives the same error message from the ffmpeg -i and it plays fine on the TV.

From what I've seen checking random files, all my transport stream recordings give that error.

FWIW, all these files were recorded using BeyondTV 4 and play back just fine with that software.

Could the audio be causing the problem since it has to convert from the original 5.1 to 2.0 on the transport streams but not on the mpeg2video since it is recorded in 2.0? I thought there was something in the profile to do that.
<<

AeroSC

Serviio newbie

Posts: 12

Joined: Fri Sep 30, 2011 1:49 am

Post Mon Oct 03, 2011 12:42 am

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

As an experiment, I added the following to the Sony Bravia profile:

<!-- Transcode all Transport Streams to lower bitrate -->
<Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="8192" targetACodec="ac3" aBitrate="384" forceVTranscoding="true">
<Matches container="mpegts" />
</Video>

I can certainly tell the difference in image quality with the lower bitrate and it does improve the stuttering quite a bit, although it is still noticeable. Still, I'd like to think there are further improvements to be had. As a point of reference, I also have a Samsung B-series TV connected to the same network (although the connection to the server is wired) and these transport stream files play perfectly with no issues. I could make a long ethernet cable and wire the Sony in to the wired network and test that to make sire it's not just a bandwidth issue. If it is, I guess all I'm looking for is a way to transcode these files into a lower bitrate suitable for the bandwidth of my network.

Thanks for the help so far. I'm excited to get all this up and working successfully. Very high WAF (Wife Approval Factor) potential especially if you can get support for mounting ISO's.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Mon Oct 03, 2011 3:57 pm

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

AeroSC wrote:... I could make a long ethernet cable and wire the Sony in to the wired network and test that to make sire it's not just a bandwidth issue. If it is, I guess all I'm looking for is a way to transcode these files into a lower bitrate suitable for the bandwidth of my network.

For me, this is the test that will confirm that it's a Network Bandwidth issue.
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

AeroSC

Serviio newbie

Posts: 12

Joined: Fri Sep 30, 2011 1:49 am

Post Mon Oct 03, 2011 8:17 pm

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

Illico,

I'll make up a cable and give that a test, but I was hoping one of you guys could confirm that the modification I made to the profile is correct to transcode the transport stream file to a lower bitrate and conver the 5.1 audio to 2-ch. If so, then all I need to do is find a rate that my network can keep up with (provided the cabled test gives me smooth playback).

Thanks
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Tue Oct 04, 2011 8:48 am

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

- You need to add "forceStereo="true" to convert the 5.1 audio to 2-ch and aBitrate="192" is enough for stereo bitrate
- Others are ok.
- Place this <video ...> element in first position in <transcoding> section.
- To be sure, you could enable detailed logging file (see signature link) and check the ffmpeg command line used to stream your MPEGTS files.


  Code:
         <!-- Transcode all Transport Streams to lower bitrate -->
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="8192" targetACodec="ac3" aBitrate="192" forceVTranscoding="true" forceStereo="true">
            <Matches container="mpegts" />
         </Video>
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

AeroSC

Serviio newbie

Posts: 12

Joined: Fri Sep 30, 2011 1:49 am

Post Tue Oct 04, 2011 1:12 pm

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

Cool. I'll give it a try tonight.
<<

AeroSC

Serviio newbie

Posts: 12

Joined: Fri Sep 30, 2011 1:49 am

Post Wed Oct 05, 2011 1:06 pm

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

I modified the profile as suggested and dialed the video bitrate down to 4500. This seemed to fix the stuttering problem until I tried to fast forward. Sometimes, the FF worked OK. I could see it skipping forward but eventually, the image froze and did not update. I could resume playback and then continue the FF and make a bit more progress. After 10 mins, or so, the stuttering began again. I could pause the stream, count to 10, then play and it would be smooth for a short time, but the stuttering eventually returns.

I checked CPU usage during playback to see the load due to transcoding and things never got higher than ~55% so I think I'm OK there.

I still haven't tried hard wiring. That will be my next step and answer the bandwidth issue. I did set up a QoS rule in my router to prioritize traffic on the two ports Serviio uses hoping that would help.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Wed Oct 05, 2011 1:37 pm

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

Could you enable detailed logging file (see signature links), celan the log file, restart serviio service, start to stream the file and look at the ffmpeg command line used by serviio?
Try locally the same ffmpeg command line in windows terminal and check the "fps" of the transcoding process.
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

AeroSC

Serviio newbie

Posts: 12

Joined: Fri Sep 30, 2011 1:49 am

Post Wed Oct 26, 2011 4:12 pm

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

Using a long ethernet cable, I wired the TV directly to the switch the HTPC is on and all my problems went away. So it's definitely a bandwidth issue. I've placed an order for a couple of MoCA kits from Netgear and that should solve the issue (theoretical 270Mbps bandwidth).

Now, I do have one other issue:

I have my HTPC set to hibernate if there is no activity going on. It seems that Serviio (unlike some other applications such as XBMC and BeyondTV) does not prevent hibernation if it is streaming to another device. Can anyone confirm this? If so, what solutions are available?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Oct 27, 2011 11:52 am

Re: Sony KDL-40NX711 stutters playing MPEG transport streams

AeroSC wrote:I have my HTPC set to hibernate if there is no activity going on. It seems that Serviio (unlike some other applications such as XBMC and BeyondTV) does not prevent hibernation if it is streaming to another device. Can anyone confirm this? If so, what solutions are available?

No workaround AFAIK, there is an open ticket for this - will try to plan it for the next major release (0.7)

Return to Sony

Who is online

Users browsing this forum: No registered users and 23 guests

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