Page 1 of 1
Stuttering 'Devil'

Posted:
Sun Feb 06, 2011 11:27 pm
by mh77
I have a Sony Bravia EX700 tv, which was correctly identified by Serviio and designated the Sony Bravia TV profile. It took me a while to figure out how to get Serviio to read the movies on my Synology NAS, but it finally worked. I started to play the movie Devil. The image and sound are crystal clear, but most of the time it's stuttering and is basically unwatchable. Just as I was sitting here, looking at my CPU load, playing with the number of cores to use for transcoding, my tv and audio/video receiver even turned off/on. That has never happened, and it scared me a little bit. (But maybe it was the devil, hehe).
Now, for the movie I'm playing:
================================
C:\Program Files (x86)\Serviio\lib>ffmpeg -i "x:\Movies\Devil (2010)\Devil (2010) 1080p\Devil.2010.BluRay.1080p.DTS.X264_R_Knorloading.mkv"
FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
built on Jan 10 2011 21:46:22 with gcc 4.4.2
configuration: --enable-static --disable-shared --disable-shared --disable-ffplay --disable-ffserver --enable-memalign-hack --enable-libmp3lame --arch=x86 --enable-runtime-cpudetect --enable-w32threads --target-os=mingw32 --cross-prefix=i686-mingw32-
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.92. 0 / 52.92. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.72. 0 / 1.72. 0
libswscale 0.12. 0 / 0.12. 0
[matroska,webm @ 012cbe00] max_analyze_duration reached
[matroska,webm @ 012cbe00] Estimating duration from bitrate, this may be inaccurate
Seems stream 0 codec frame rate differs from container frame rate: 47.95 (48000/1001) -> 23.98 (48000/2002)
Input #0, matroska,webm, from 'x:\Movies\Devil (2010)\Devil (2010) 1080p\Devil.2010.BluRay.1080p.DTS.X264_R_Knorloading.mkv':
Metadata:
title : Devil (2010) 1080P.X264.NL.SUBBED.Bradje
Duration: 01:20:28.67, start: 0.000000, bitrate: 2176 kb/s
Stream #0.0(eng): Video: h264, yuv420p, 1920x800, PAR 1:1 DAR 12:5, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
Metadata:
title : x264
Stream #0.1(eng): Audio: dca, 48000 Hz, 5.1, s16, 1536 kb/s
Metadata:
title : DTS
Stream #0.2(eng): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s
Metadata:
title : AC3
Stream #0.3(dut): Subtitle: [0][0][0][0] / 0x0000
Stream #0.4(eng): Subtitle: [0][0][0][0] / 0x0000
Metadata:
title : Subtitles
At least one output file must be specified
================================
When I was looking at my CPU load though, only one core (out of six) was being used, for about 80-90%. Most other cores weren't used except for one, at about 5%.
My system:
AMD Phenom II X6 1090T, 3.2Ghz
8 GB of RAM
Windows 7, 64 bit OS
My Synology, computer and tv are all connected by wire. I think the Synology has a 1 Gbit connection and the rest a 100 Mbit connection, but they all have at least 100 Mbit.
What could be causing the stuttering? And have you ever heard of a tv as well as the audio/video receiver to power off/on?!
Re: Stuttering 'Devil'

Posted:
Mon Feb 07, 2011 7:57 am
by Illico
mh77 wrote:I have a Sony Bravia EX700 tv...
What could be causing the stuttering? And have you ever heard of a tv as well as the audio/video receiver to power off/on?!
Read the first post of this topic:
viewtopic.php?f=11&t=425#p2339In the
FAQ section you will find this:
- When video bitrate is expensive (>20Mbps), the TV (could) becomes unresponsive - doesn't react on remote commands any more.You could check the movie video bitrate with
http://www.videohelp.com/tools/Bitrate_Viewer_2
Re: Stuttering 'Devil'

Posted:
Mon Feb 07, 2011 6:23 pm
by mh77
Thanks for your reply. I don't quite understand though. The source is MKV so for my tv, the movie is transcoded. So if what you're saying is the cause of my problem, it's the transcoded bitrate that's too high, correct? Is there any way to change it?
I've used the tool you mentioned to analyse the file in the Serviio temp directory for transcoding. It says the average bitrate is about 423.000 kbps! That can't be right?
Of course I'm also wondering why my tv and receiver shut down just like that, my tv came back on but I had to turn the receiver back on manually. But this is probably harder to determine..
Re: Stuttering 'Devil'

Posted:
Mon Feb 07, 2011 7:22 pm
by Illico
mh77 wrote:...I don't quite understand though. The source is MKV so for my tv, the movie is transcoded.
Not transcoded but remux.
Video source h264/AVC is kept as is but Audio DTS (dca) is transcoded to AC3 format supported by your EX700.
mh77 wrote: So then the transcoded bitrate is too high, correct? What good would it do then to check the source movie bitrate?
Yes, video remuxed could be high, you can check the video bitrate profile during time with this tools
http://www.videohelp.com/tools/Bitrate_Viewer_2I've got some movies with 8Mbps average bitrate with 25Mbps peak video bitrate and start stuterring at this peak and sometimes TV becomes unresponsive, and sometimes crach and reboot!!
mh77 wrote: Also, in my post above, you can see that the bitrate of the original is apx 2 MB per second. That's about 16 Mbps.
No, the average bitrate is 2176 kb/s (2Mbps) but you can found some peak arround 10Mbps.
mh77 wrote:Of course I'm also wondering why my tv and receiver shut down just like that, my tv came back on but I had to turn the receiver back on manually. But this is probably harder to determine..
I'm not sure to understand too...you said your TV came back but audio/video receiver is down?!
Could you describe your configuration? What is your receiver model reference?
Re: Stuttering 'Devil'

Posted:
Mon Feb 07, 2011 7:43 pm
by mh77
Sorry, I was just changing my post when you were reacting.
I've used the tool provided to analyse the file in the temp directory, but I'm guessing that's not correct. I'm analyzing the movie now, and it's showing some peaks of 23350 kbps, that's 22,8 Mbps I think. In fact, here's the result of the Bitrate Viewer:

I'm guessing that the video bitrate is the problem then. Is there anything I can do to fix this problem, without re-encoding the movie? Is this a common problem for everyone, or for Sony?
Hm what I think happened then was that my tv crashed and rebooted too, and because the tv shut down, my receiver also shut down. It's a Samsung receiver, it does some communication with external sources to change inputs and apparently, also shut down when there is no more signal

Re: Stuttering 'Devil'

Posted:
Mon Feb 07, 2011 8:02 pm
by Illico
mh77 wrote:...I've used the tool provided to analyse the file in the temp directory, but I'm guessing that's not correct.
Are you sure its the good temp file?
mh77 wrote:I'm analyzing the movie now, and it's showing some peaks of 23350 kbps, that's 22,8 Mbps I think.
Good, yes peak 22.8Mbps at 3/4 of movie time, but some others >20Mbps also appears.
mh77 wrote:I'm guessing that the video bitrate is the problem then. Is there anything I can do to fix this problem, without re-encoding the movie? Is this a common problem for everyone, or for Sony?
without re-encoding: no I don't think so.
For everyone, probably, because DLNA is normatively limited to 20Mbps for such profiles
For the moment, the only solution is to transcode this movie.
mh77 wrote:Hm what I think happened then was that my tv crashed and rebooted too, and because the tv shut down, my receiver also shut down. It's a Samsung receiver, it does some communication with external sources to change inputs and apparently, also shut down when there is no more signal

Ok its clear
Re: Stuttering 'Devil'

Posted:
Mon Feb 07, 2011 8:05 pm
by Illico
Duration: 01:20:28.67, start: 0.000000, bitrate: 2176 kb/s
This value is strange compared to the BitrateViewer result.
Re: Stuttering 'Devil'

Posted:
Mon Feb 07, 2011 9:02 pm
by zip
FFmpeg is not 100% precise with bitrate
Re: Stuttering 'Devil'

Posted:
Tue Feb 08, 2011 6:36 pm
by mh77
Illico wrote:For the moment, the only solution is to transcode this movie.
Ok so it will probably not matter to try and play the movie from my Xbox 360 then. Obviously, tv is my first choice as it doesn't require yet another device to be turned on and it's quiet.
If I would want to transcode the movie, what is the best way to reconfigure Serviio? Would I have to add the forceVTranscoding attribute? And perhaps also the maxVBitrate (set to 20000)?
Re: Stuttering 'Devil'

Posted:
Tue Feb 08, 2011 7:01 pm
by Illico
mh77 wrote:...what is the best way to reconfigure Serviio? Would I have to add the forceVTranscoding attribute? And perhaps also the maxVBitrate (set to 20000)?
Try by removing this line
<Matches container="matroska" vCodec="h264" />
So all mkv will be transcoded into MPEG2TS wih MPEG2VIDEO and AC3-384kbps
- Code:
<Profile id="9" name="Sony Bravia TV" extendsProfileId="1">
<Detection>
<UPnPSearch>
<FriendlyName>BRAVIA.*</FriendlyName>
</UPnPSearch>
</Detection>
<MediaFormatProfiles>
<!-- rename native mpeg2ts with h264/ac3 ac3 formats to those supported by the tv -->
<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3">AVC_TS_MP_HD_AC3</MediaFormatProfile>
<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3">AVC_TS_MP_SD_AC3</MediaFormatProfile>
<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3_T">AVC_TS_MP_HD_AC3_T</MediaFormatProfile>
<MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3_T">AVC_TS_MP_SD_AC3_T</MediaFormatProfile>
<!-- rename transcoded mpeg2ts with h264 to one of the TV's supported profiles -->
<MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_50_AC3_ISO">AVC_TS_MP_HD_AC3_ISO</MediaFormatProfile>
<MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_50_AC3_ISO">AVC_TS_MP_SD_AC3_ISO</MediaFormatProfile>
</MediaFormatProfiles>
<Transcoding>
<!-- For dvr-ms files force mpeg2video transcoding to fix monotone timestamps problems-->
<Video targetContainer="mpegts" targetACodec="ac3" forceVTranscoding="true">
<Matches container="asf" vCodec="mpeg2video" />
</Video>
<!--
First remux all h264 video on MPEG-TS stream with ac3 audio transcoding, expected profile AVC_TS_MP_HD_AC3_ISO or
AVC_TS_MP_SD_AC3_ISO
-->
<Video targetContainer="mpegts" targetACodec="ac3" aBitrate="384">
<Matches container="avi" vCodec="h264" />
<Matches container="mp4" vCodec="h264" />
<!-- <Matches container="matroska" vCodec="h264" /> -->
<!-- if audio different to ac3, must be transcoded -->
<Matches container="mpegts" aCodec="aac" />
<Matches container="mpegts" aCodec="mp3" />
<Matches container="mpegts" aCodec="dca" />
</Video>
<!-- All Others video/audio codec will be transcoded into mpeg2ts, mpeg2video and ac3 audio (MPEG_TS_SD_EU). -->
<Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3" aBitrate="384">
<Matches container="asf" />
<Matches container="avi" />
<Matches container="mp4" />
<Matches container="matroska" />
<Matches container="flv" />
</Video>
</Transcoding>
<AutomaticImageRotation>true</AutomaticImageRotation>
</Profile>
You could also add maxVBitrate option if video still stutters after transcoding.
<Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="20000" targetACodec="ac3" aBitrate="384">
Re: Stuttering 'Devil'

Posted:
Thu Feb 10, 2011 11:51 pm
by mh77
This seems to work, although the max bitrate of 20000 still caused problems. I then tried 18000, same problem. The value is now set at 8000, no more stuttering and image quality was still good. It was an old movie though (Smokey and the Bandit) so I'll use a more recent movie to do some more testing.
Thanks for your help!
Re: Stuttering 'Devil'

Posted:
Sat Feb 12, 2011 6:08 pm
by mh77
Problems are not solved in the least

Just now tried playing an MKV with the changed setting, and it's still stuttering like crazy. If I press pause for a bit and then play again, it's ok for a little while, but then it's stuttering all over the place again.
The thing is though, that my CPU isn't being used completely. On average the CPU use goes up to about 45% (average of the 6 cores) but that's it.
Have now set the max bitrate to 3000. Video is obviously not looking good, but no more stuttering. Even with the bitrate set to 5000, video stutters! I don't know if it's possible at all to get good results with my PC and my TV. How is it possible with a 6 core 3.2 Ghz CPU, 8 GB of RAM and a brand new tv?
Re: Stuttering 'Devil'

Posted:
Sat Feb 12, 2011 9:01 pm
by Cerberus
how many cores have you set serviio to use in the console ? 6 ?
Re: Stuttering 'Devil'

Posted:
Sun Apr 03, 2011 9:24 am
by mh77
Sorry for the incredibly late reply.
I am currently using all 6 cores for transcoding, but I have also tried setting it to 4. Nothing seemed to change.
In the meanwhile, I've 'solved' my problem by only downloading 720p movies. My tv doesn't seem to have a problem with those, probably because of the lower bandwidth. Not ideal of course. With the recent changes to Serviio I'll try playing Devil again and report back here.
Re: Stuttering 'Devil'

Posted:
Mon Jul 04, 2011 5:35 pm
by gmaguire
MH , did you resolve the issue you were having with this ? I have a Bravia 46ex713 that is doing something similiar with 1080 films.
Thanks.
Re: Stuttering 'Devil'

Posted:
Tue Jul 05, 2011 11:54 am
by gmaguire
I resolved this issue with my Bravia KDL-46ex714 by adding maxVBitrate="8192" to the Bravia config in the 3 places where it specifies the Video targetContainer.
eg. <Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3" maxVBitrate="8192" aBitrate="384">
I tried it with maxVBitrate="15360" but was still getting some lag although it was better. It may be worthwhile adding an Bravia EX config into the distro if this is a common issue with the EX range.
The issue seems to be on the TV side, my pc spec is quad core i7 cpu with 16gb ram and gig network, TV does 100mb full duplex. I had similait issues when configuring PS3 media server and had to tune down the video quality also to get it to work smoothly.
I will try and increase aBitrate to see if it remains stable but even at 8192 the picture quality is excellent.
Ger.
Re: Stuttering 'Devil'

Posted:
Tue Jul 05, 2011 12:19 pm
by zip
cool. It might be added to the Bravia
wiki post on this forum. Just to note, maxVBitrate is only used when targetVCodec is used (and different than the actual file's codec)
Re: Stuttering 'Devil'

Posted:
Tue Jul 05, 2011 1:54 pm
by gmaguire
I have installed the 0.6 beta and was setting config up again for Bravia TV but ran into the shuttering issue again even after changing the the bitrate to 8192.
After remembering the changes I made to the 0.5 config I completely removed the remux section below and voila, stuttering gone, I also tried reducing the abitrate to 192 but it made no difference to the stuttering. With the remux gone all seems good so far.
<!-- Remux all other h264 video on MPEG-TS stream with ac3 audio transcoding -->
<!-- expected profile AVC_TS_MP_HD_AC3_ISO -->
<Video targetContainer="mpegts" targetACodec="ac3" aBitrate="384">
<Matches container="avi" vCodec="h264" />
<Matches container="mp4" vCodec="h264" />
<Matches container="matroska" vCodec="h264" />
<!-- if audio different to ac3, must be transcoded -->
<Matches container="mpegts" aCodec="aac" />
<Matches container="mpegts" aCodec="mp3" />
<Matches container="mpegts" aCodec="dca" />
<Matches container="mpegts" aCodec="lpcm" />
<Matches container="mpeg" aCodec="dca" />
</Video>