FAQ  •  Register  •  Login

Stuttering on Sony BD Player

<<

rockzOr

Serviio newbie

Posts: 7

Joined: Sat Jan 22, 2022 11:57 am

Post Sat Jan 22, 2022 12:22 pm

Stuttering on Sony BD Player

Hi all,

first of all I like to say a big thx, I recently discovered Serviio and so far it is the best DLNA Server I investigated. It works totally fine on my network.
I am Running the Server on a RasberryPi 4 and this works well even on transcoding.

However, I finally found the first problem now. On a quite old Sony BD Player, transcoding an mkv file to mpegts results in an unwatchable stuttering of video+audio. I can’t quite figure out why but I have no other files with this encoding on the original file, so it might be unique. If anyone can help me out on this, it would be highly appreciated.

Here are some infos that hopefully help:

Original File Encoding:

  Code:
 General
Unique ID                                : 115560040816646257834838572106076882236 (0x56F00DE67EF654FF89D48640CDAB853C)
Complete name                            : S01E01 - Des Endes Anfang.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 1.01 GiB
Duration                                 : 1 h 1 min
Overall bit rate                         : 2 363 kb/s
Encoded date                             : UTC 2019-12-21 09:59:30
Writing application                      : mkvmerge v40.0.0 ('Old Town Road + Pony') 64-bit
Writing library                          : libebml v1.3.9 + libmatroska v1.5.2

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main@L4@Main
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 1 min
Bit rate                                 : 1 593 kb/s
Width                                    : 1 920 pixels
Height                                   : 960 pixels
Display aspect ratio                     : 2.000
Frame rate mode                          : Constant
Frame rate                               : 24.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Bits/(Pixel*Frame)                       : 0.036
Stream size                              : 696 MiB (67%)
Writing library                          : x265 3.2:[Windows][GCC 8.3.0][64 bit] 8bit+10bit+12bit
Encoding settings                        : cpuid=1111039 / frame-threads=3 / numa-pools=12 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x960 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=240 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=6 / scenecut=40 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / no-strong-intra-smoothing / max-merge=3 / limit-refs=1 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-hme / no-weightp / no-weightb / no-analyze-src-pics / no-deblock / no-sao / no-sao-non-deblock / rd=3 / selective-sao=0 / early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=23.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=255 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio #1
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1 h 1 min
Bit rate mode                            : Constant
Bit rate                                 : 384 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls RsSampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -5 ms
Stream size                              : 168 MiB (16%)
Title                                    : Surround
Language                                 : German
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

Audio #2
ID                                       : 3
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1 h 1 min
Bit rate mode                            : Constant
Bit rate                                 : 384 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls RsSampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -5 ms
Stream size                              : 168 MiB (16%)
Title                                    : Surround
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No

Text #1
ID                                       : 4
Format                                   : ASS
Codec ID                                 : S_TEXT/ASS
Codec ID/Info                            : Advanced Sub Station Alpha
Duration                                 : 59 min 54 s
Bit rate                                 : 0 b/s
Count of elements                        : 3
Compression mode                         : Lossless
Stream size                              : 126 Bytes (0%)
Title                                    : forced
Language                                 : German
Default                                  : Yes
Forced                                   : No

Text #2
ID                                       : 5
Format                                   : ASS
Codec ID                                 : S_TEXT/ASS
Codec ID/Info                            : Advanced Sub Station Alpha
Duration                                 : 59 min 54 s
Bit rate                                 : 67 b/s
Count of elements                        : 538
Compression mode                         : Lossless
Stream size                              : 29.5 KiB (0%)
Title                                    : full
Language                                 : German
Default                                  : No
Forced                                   : No

Text #3
ID                                       : 6
Format                                   : ASS
Codec ID                                 : S_TEXT/ASS
Codec ID/Info                            : Advanced Sub Station Alpha
Duration                                 : 58 min 33 s
Bit rate                                 : 82 b/s
Count of elements                        : 748
Compression mode                         : Lossless
Stream size                              : 35.2 KiB (0%)
Title                                    : full
Language                                 : English
Default                                  : No
Forced                                   : No


Transcoded File:

  Code:
 General
ID                                       : 1 (0x1)
Complete name                            : transcoding/Serviio/transcoding-temp-f16c3acc1534cceca21c4c8f738d6cfc.stfFormat                                   : MPEG-TS
File size                                : 26.5 MiB
Duration                                 : 35 s 750 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 6 187 kb/s
FileExtension_Invalid                    : ts m2t m2s m4t m4s tmf ts tp trp ty

Video
ID                                       : 256 (0x100)
Menu ID                                  : 1 (0x1)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@High
Format settings, BVOP                    : No
Format settings, Matrix                  : Default
Format settings, GOP                     : Variable
Codec ID                                 : 2
Duration                                 : 35 s 833 ms
Bit rate mode                            : Variable
Bit rate                                 : 5 558 kb/s
Maximum bit rate                         : 17.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 960 pixels
Display aspect ratio                     : 2.000
Frame rate                               : 24.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.126
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
GOP, Open/Closed                         : Open
GOP, Open/Closed of first frame          : Closed
Stream size                              : 23.7 MiB (90%)

Audio
ID                                       : 257 (0x101)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : 129
Duration                                 : 35 s 712 ms
Bit rate mode                            : Constant
Bit rate                                 : 320 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls RsSampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -6 ms
Stream size                              : 1.36 MiB (5%)
Language                                 : German
Service kind                             : Complete Main

Menu
ID                                       : 4096 (0x1000)
Menu ID                                  : 1 (0x1)
Duration                                 : 35 s 750 ms
List                                     : 256 (0x100) (MPEG Video) / 257 (0x101) (AC-3, German)
Language                                 :  / German
Service name                             : Service01
Service provider                         : FFmpeg
Service type                             : digital television


Transcoding process:

  Code:
 ffmpeg -threads 0 -i /incoming/S01E01 - Des Endes Anfang.mkv -y -threads 0 -c:v mpeg2video -pix_fmt yuv420p -b:v 17000k -maxrate:v 17000k -bufsize:v 17000k -r 24 -g 15 -c:a:0 ac3 -b:a:0 320k -ac:a:0 6 -map 0:0 -map 0:1 -sn -f mpegts /incoming/transcoding/Serviio/transcoding-temp-f16c3acc1534cceca21c4c8f738d6cfc.stf


Additional Infos:

The configured CPU cores are set to optimal, the usage lies around 300% so there is enough room for other processes.
The transcoding folder is set to an external USB3.0 drive with ~ 45MB/s throughput.
The BD player is connected through PowerLine to my router, the server is wired directly on a standalone port with no switch in between. The PowerLine connection is stable at 70-80 Mbit which should be enough even for 8k.
The strangest thing of all is, that it does not always stutter. On ~1/8 starts, the video plays just fine without anything changed. On the next file, it starts stuttering again.
These are the only files that stutter, I have a couple of different encoded videos (around 3000) and until now never experienced this situation, regardless of the original being transcoded or not, being avi, mkv, mpeg, BD, or any other encoding.

Regards
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Sun Jan 23, 2022 2:12 am

Re: Stuttering on Sony BD Player

The video you posted uses H.265, which your Sony BD doesn't support. Transcoding H.265 takes a lot of processing power, and it's possible your Pi simply can't keep up. You are also transcoding the video all the way to MPEG-2, which is probably the biggest issue. Transcoding to H.264 might be more successful.

You might consider getting a player that supports H.265. The two lowest cost options I am aware of would be the Onn 4K Media player (Walmart brand) or the Roku Express 4K+. The Onn retails for $30, and is usually on sale for around $20. The Roku is $40, but currently on sale for $30. Both play H.265 without a problem, and would play that video without requiring transcoding. There's probably a number of generic Android players available online for $20-40 that would support H.265 as well. If they claim 4K support, that should mean H.265 will play.

80 Mbps could be near saturated with a 1080 Blu Ray rip. I've seen several of mine exceed 50 Mbps. My 4K UHD rips are around 50-70 Mbps, with peak rates exceeding 150 Mbps. I would expect an 8K H.265 to easily exceed 150 Mbps. Of course, there is no 8K content yet, and any online source that decides to try streaming 8K will likely compress it down to 30-40 Mbps. Right now, most online 4K content is from 16-25 Mbps, again highly compressed. You might get better network speed using WiFi, although your older Sony player might not support 802.11n, which would limit its speed to about 50 Mbps. That would be another reason to consider a new player, for faster WiFi speeds.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

rockzOr

Serviio newbie

Posts: 7

Joined: Sat Jan 22, 2022 11:57 am

Post Sun Jan 23, 2022 3:39 am

Re: Stuttering on Sony BD Player

Hi,

thanks for your answer. A new player is not an option as it is a specific entertainment system 5.1 with the Sony only connectors. I am aware of the few possible things that this player can run without transcoding but I take it, I can transcode at least. And WiFi is not an option here, since the player has no WiFi at all.

I don’t think the pi is overloaded as stated, it never exceeds more than 320% CPU, mostly stable at 290-300%. Also, I have already transcoded way bigger files which did not cause any problem at all, so I would take out anything network related or CPU for now (unless I find a clue that there indeed is a bottleneck). Also waiting for the file to be completed during pause doesn’t change anything so I’d say keeping up is not a problem here.

The biggest hope I got is the first one, use a better transcoding mechanism (codec) but I am unaware of how to achieve that.
I’ve read about profiles and I know which profile is being used:

Sony BDP-Sx70/SMP-N100 (2010)

And I found that in the profile configuration:

  Code:
 <Profile id="bdp2010" name="Sony BDP-Sx70/SMP-N100 (2010)" extendsProfileId="bdp2012">
                <!-- This profile supports XSub subtitles in AVI containers (Europe and Canada firmwares only) -->
                <Detection>
                        <UPnPSearch>
                                <FriendlyName>(Blu-ray Disc Player|.*Home Theat(re|er) System|Media Player)</FriendlyName>
                                <Manufacturer>Sony Corporation</Manufacturer>
                        </UPnPSearch>
                        <HttpHeaders>
                                <X-AV-Client-Info>.*cn="Sony Corporation"; mn="(Blu-ray Disc Player|.*Home Theat(re|er) System|Media Player)".*</X-AV-Client-Info>
                        </HttpHeaders>
                </Detection>
                <MediaFormatProfiles>
                        <!-- set mkv to divx mime-type to allow subtitle and multiple audio track support for European and Canadian players -->
                        <!-- This native mkv playback disabled by default - read comment in transcoding section for the reasons -->
                        <MediaFormatProfile mime-type="video/divx">MATROSKA</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/divx">AVC_MKV_MP_HD_AAC_MULT5</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/divx">AVC_MKV_MP_HD_AC3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/divx">AVC_MKV_MP_HD_MPEG1_L3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/divx">AVC_MKV_HP_HD_AAC_MULT5</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/divx">AVC_MKV_HP_HD_AC3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/divx">AVC_MKV_HP_HD_MPEG1_L3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/divx">AVC_MKV_MP_HD_DTS</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/divx">AVC_MKV_MP_HD_EAC3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/divx">AVC_MKV_HP_HD_DTS</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/divx">AVC_MKV_HP_HD_EAC3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/divx">AVC_MKV_HP_HD_MLP</MediaFormatProfile>
                        <!-- The following name substitutions are necessary for supporting hardware from multiple regions -->
                        <MediaFormatProfile mime-type="video/mpeg" name="MPEG_PS_PAL,MPEG_PS_NTSC">AVC_MP4_MP_SD_AAC_MULT5</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/mpeg" name="MPEG_PS_PAL,MPEG_PS_NTSC">AVC_MP4_MP_SD_MPEG1_L3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/mpeg" name="MPEG_PS_PAL,MPEG_PS_NTSC">AVC_MP4_MP_SD_AC3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/mpeg" name="MPEG_PS_PAL,MPEG_PS_NTSC">AVC_MP4_MP_HD_720p_AAC</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/mpeg" name="MPEG_PS_PAL,MPEG_PS_NTSC">AVC_MP4_MP_HD_1080i_AAC</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/mpeg" name="MPEG_PS_PAL,MPEG_PS_NTSC">AVC_MP4_HP_HD_AAC</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/mpeg" name="MPEG_PS_PAL,MPEG_PS_NTSC">AVC_MP4_LPCM</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/mpeg" name="MPEG_PS_PAL,MPEG_PS_NTSC">MPEG4_P2_MP4_ASP_AAC</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/mpeg" name="MPEG_PS_PAL,MPEG_PS_NTSC">MPEG4_P2_MP4_SP_L6_AAC</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/mpeg" name="MPEG_PS_PAL,MPEG_PS_NTSC">MPEG4_P2_MP4_NDSD</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AAC_MULT5</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AAC_MULT5_T</MediaFormatProfile>                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AAC_MULT5_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_MPEG1_L3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_MPEG1_L3_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_MPEG1_L3_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AAC_MULT5</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AAC_MULT5_T</MediaFormatProfile>                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AAC_MULT5_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_MPEG1_L3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_MPEG1_L3_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_MPEG1_L3_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AC3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AC3_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_SD_AC3_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HP_SD_MPEG1_L2_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HP_SD_MPEG1_L2_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_AAC_MULT5</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_AAC_MULT5_T</MediaFormatProfile>                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_AAC_MULT5_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_MPEG1_L3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_MPEG1_L3_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_MPEG1_L3_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_AC3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_AC3_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_MP_HD_AC3_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HD_DTS_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HD_DTS_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HD_50_LPCM_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HP_HD_MPEG1_L2_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">AVC_TS_HP_HD_MPEG1_L2_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_AAC</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_AAC_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_AAC_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_AC3</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_AC3_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_AC3_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_MPEG1_L3</MediaFormatProfile>                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_MPEG1_L3_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_MPEG1_L3_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_MPEG2_L2</MediaFormatProfile>                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_MPEG2_L2_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">MPEG4_P2_TS_ASP_MPEG2_L2_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">VC1_TS_AP_L1_AC3_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">VC1_TS_AP_L2_AC3_ISO</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">VC1_TS_HD_DTS_T</MediaFormatProfile>
                        <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO">VC1_TS_HD_DTS_ISO</MediaFormatProfile>
                </MediaFormatProfiles>
                <Transcoding>
                        <Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="320" forceInheritance="true" maxWidth="1920" maxHeight="1080">
                <Matches container="*" vCodec="h265"/>
                    <Matches container="*" vCodec="h264" profile="high_10" />
                    <Matches container="*" vCodec="h264" profile="high_444" />
                    <Matches container="*" vCodec="h264" profile="high_422" />
                    <Matches container="*" vCodec="h264" profile="high" levelGreaterThan="4.1" />
                    <Matches container="*" vCodec="h264" profile="main" levelGreaterThan="4.1" />
                    <Matches container="matroska" vCodec="vp8" />
                                <Matches container="*" widthGreaterThan="1920" />
                </Video>
                        <!-- 2010 model Sony BDP requests all formats except mpeg-ps and mpeg-ts in 32KB chunks which works badly over wifi, hence mkv files are remuxed to mpeg-ts by default in this profile. Natively played
                                mkv files stutter irretrievably after seeks, which seems to be a DLNA firmware issue with the player. If you have a European or Canadian player (not US), you stream over a wired connection and want mkv
                                subtitles, dts support, and multiple audio tracks - but don't care that you can't seek - remove all matroska transcoding matches below to have the player decode mkv natively. -->
                        <Video targetContainer="mpegts" targetACodec="ac3" aBitrate="320" forceInheritance="true">
                                <Matches container="matroska" aCodec="dts-hd" />
<Matches container="matroska" aCodec="vorbis" />
<Matches container="matroska" aCodec="truehd" />
<Matches container="matroska" aCodec="flac" />
<Matches container="matroska" aCodec="eac3" />
<Matches container="mpeg" aCodec="lpcm" />
<Matches container="ogg" vCodec="mpeg4" />
<Matches container="mp4" aCodec="lpcm" />
</Video>
                        <Video targetContainer="mpegts" forceInheritance="true">
<Matches container="matroska" />
                                <!-- remux mp4 container files to mpeg-ts to allow seeking -->
<!-- this also fixes the renderer's jerky playback of mov container files such as iPhone 4 HD video recordings -->
                                <Matches container="mp4" vCodec="h264" />
<Matches container="avi" vCodec="h264" />
                                <Matches container="flv" vCodec="h264" />
</Video>
<!-- unsupported codecs will be transcoded to mpegts with mpeg2video and ac3 audio -->
<Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="320" forceVTranscoding="true" forceInheritance="true">
<Matches container="asf" />
</Video>
                        <Audio targetContainer="lpcm" forceInheritance="true">
                                <Matches container="mp4" />
                                <Matches container="adts" />
                                <Matches container="wav" />
</Audio>
</Transcoding>
<OnlineTranscoding>
                        <Video targetContainer="mpegts" forceInheritance="true"> <!-- dont transcode to ac3 -->
                                <Matches container="mp4" />
                                <Matches container="flv" vCodec="h264" contentType="vod" /> <!-- exclude live flv streams which crash the renderer -->
                                <Matches container="applehttp" vCodec="h264" />
</Video>
</OnlineTranscoding>
                <LimitImageResolution>true</LimitImageResolution>
<MultipleAudioTrackAware>false</MultipleAudioTrackAware>
</Profile>


And this is my problem here, I’m not sure what needs to be changed. So any hint on that would be helpful.

Regards
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Sun Jan 23, 2022 9:23 pm

Re: Stuttering on Sony BD Player

Well, a CPU running at 100% or higher is saturated. I don't know how you're measuring them at over 300%. ;)

One issue I see with the Sony BD player profiles (all of them) is that there's a maxVBitrate="17000" switch. When you're transcoding higher bitrate video, that adds an additional load to the CPU, over an above simply transcoding the video. And that alone might be enough to cause the stuttering you are seeing. I would suggest creating a user-profiles.xml file and create a custom profile that you can tweak. Here's one you could start with, and then you can modify to best fit your media and player.
  Code:

?xml version="1.0" encoding="UTF-8"?>
<Profiles version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.serviio.org/xsd/profiles/v/1.10/Profiles.xsd">
<Profile id="Sony_Test" name="Sony Home Player" extendsProfileId="1">
         <ContentDirectoryMessageBuilder>org.serviio.upnp.service.contentdirectory.SamsungTizenDLNAMessageBuilder</ContentDirectoryMessageBuilder>
      <ResourceTransportProtocolHandler>org.serviio.upnp.protocol.http.transport.SamsungWiseLinkProtocolHandler</ResourceTransportProtocolHandler>
      <Transcoding>
         
     
         <!-- Transcode H.265 video stream to H.264 -->
         <Video targetContainer="mpeg-ts" targetVCodec="h264" targetACodec="ac3" >
             <Matches container="*" vCodec="h265" />
         </Video>
 </Transcoding>
      <ThumbnailsResolution>HD</ThumbnailsResolution>
      <AllowChunkedTransfer>true</AllowChunkedTransfer>
      <MultipleAudioTrackAware>true</MultipleAudioTrackAware>
      <AutomaticImageRotation>true</AutomaticImageRotation>
      <LimitImageResolution>false</LimitImageResolution>
   </Profile>

</Profiles>


I haven't tested this profile, so if I made an error Serviio won't start. You can just remove the test file and then start Serviio again. In the Serviio/config folder, create a text file and name it "user-profiles.xml". Then paste the code above into the file, then restart Serviio. Now change the profile assigned to your TV to this one, which is named "Sony Home Player".

This is an extremely simple transcoding profile. It looks for H.265 video and any container, and if found will transcode the video to H.264 with Dolby Digital audio. It doesn't tie into any other Sony profile, so it's possible that might be some other media combination that won't play, but isn't captured by this profile.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

rockzOr

Serviio newbie

Posts: 7

Joined: Sat Jan 22, 2022 11:57 am

Post Sun Jan 23, 2022 10:44 pm

Re: Stuttering on Sony BD Player

Hi,

thanks a lot for this. I will give it a try and report the result. Hopefully it will work :) I will test that tomorrow evening as today is already over nearly.

Regarding the CPU: Linux or the most used tool top in general counts CPU usage per core. The Pi 4 has an arm CPU with 4 cores, so this leads to a maximum load of 400%. Therefore, I still have 1 core free on the system during transcoding which is more than enough for any other process, even Serviio uses only roughly around 30% of 1 core. The Pi 4 is surprisingly potent if used and configured correctly. I haven’t got it on its limits without graphical usage yet.

Man entry for top:

%CPU -- CPU Usage : The percentage of your CPU that is being used by the process. By default, top displays this as a percentage of a single CPU. On multi-core systems, you can have percentages that are greater than 100%. For example, if 3 cores are at 60% use, top will show a CPU use of 180%.


Regards
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Sun Jan 23, 2022 11:53 pm

Re: Stuttering on Sony BD Player

Thanks for clarifying the way Linux displays CPU utilization. I'm woefully out of practice with Linux, so had forgotten the way they do that.

CPU usage by Serviio can be misleading. I've often seen 100% usage on my Windows PCs, but the computer is still responsive and can be used for other purposes in spite of the heavy workload of Serviio.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

rockzOr

Serviio newbie

Posts: 7

Joined: Sat Jan 22, 2022 11:57 am

Post Mon Jan 24, 2022 7:33 am

Re: Stuttering on Sony BD Player

No problem :) I don’t have knowledge of Serviio but you do so no reason to worry.

That’s true, but windows handles CPU in another way. On top of that, it really determines what you try to do. CPUs today are quite fast and as long as your CPU can handle more threads for serving, you shouldn’t see a problem on using it. But you are not able to start another huge CPU workload. As long as I have 1 core free and threads to be acquired, there is no problem. In my case, I could easily run other tasks beside transcoding cause of that. It seems to what I’ve noticed is, that the optimal setting uses 3 cores and keeps 1 free which actually makes a lot of sense to me.

And finally: as long as the transcoding works at >1 file second per real second, there will never be a problem on the server that he can’t catch up. And this is almost the case for me even on large files with a lot of work. So the only thing remaining should be the encoding. At least that’s my theory for now. Let’s see what it helps now.
<<

rockzOr

Serviio newbie

Posts: 7

Joined: Sat Jan 22, 2022 11:57 am

Post Mon Jan 24, 2022 3:56 pm

Re: Stuttering on Sony BD Player

Sorry for double post, but here's the update:

I have added your code as described in a new user-profiles.xml.
You had 2 errors:

- "<" Opening tag for XML
- mpeg-ts is not valid, should be mpegts

So, nothing critical just so that we are clear here, I added the following:

  Code:
<?xml version="1.0" encoding="UTF-8"?>
<Profiles version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.serviio.org/xsd/profiles/v/1.10/Profiles.xsd">
<Profile id="Sony_Test" name="Sony Home Player" extendsProfileId="1">
      <ContentDirectoryMessageBuilder>org.serviio.upnp.service.contentdirectory.SamsungTizenDLNAMessageBuilder</ContentDirectoryMessageBuilder>
      <ResourceTransportProtocolHandler>org.serviio.upnp.protocol.http.transport.SamsungWiseLinkProtocolHandler</ResourceTransportProtocolHandler>
      <Transcoding>
         <!-- Transcode H.265 video stream to H.264 -->
         <Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3" >
             <Matches container="*" vCodec="h265" />
         </Video>
      </Transcoding>
      <ThumbnailsResolution>HD</ThumbnailsResolution>
      <AllowChunkedTransfer>true</AllowChunkedTransfer>
      <MultipleAudioTrackAware>true</MultipleAudioTrackAware>
      <AutomaticImageRotation>true</AutomaticImageRotation>
      <LimitImageResolution>false</LimitImageResolution>
   </Profile>
</Profiles>


I have changed the profile in Serviio console and retested.
Wow :) It works just like a charm. I can confirm that there are no more stutters. Perfect! CPU load still on 300% and far above 1s/real second. Even the video quality is not far worse.

Now the final question: How can I get this configuration in a "stable" state instead of using a testing profile? I'm unsure if I should extend the other profile or create a copy/new one with the above additionally added or something completely else. Do you have a suggestion here? I think with runing only this profile currently I will get other issues on different files, so I'd prefer adding this solution to the profile directly. But I'm still not versed enough to add it on my own without breaking things :(
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Tue Jan 25, 2022 4:22 pm

Re: Stuttering on Sony BD Player

The user-profiles.xml file can remain without any problems. Any time Serviio is updated, it does not replace or remove that file. It's designed for this exact use, for users that need a customized profile that works better than any included profile. If you modify the regular profiles file, it gets replaced with any Serviio update, so you have to make your changes again. It's fine to just keep using this profile. If you encounter an issue with a different media file, then you can address it in your file. If nothing else appears, you're good to go!

When I copied/pasted that info, I must have missed that opening tag. Glad you caught it. And I should have known better about mpegts. :lol:
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

rockzOr

Serviio newbie

Posts: 7

Joined: Sat Jan 22, 2022 11:57 am

Post Tue Jan 25, 2022 6:22 pm

Re: Stuttering on Sony BD Player

Hehe. Yeah, happens.
Don’t get me wrong here I was never thinking about adjusting the profiles.xml, but rather extend these profiles with the one you created or just create a copy of it in user-profiles.

The thing is I don’t know how these profiles work. From what I understood now is that this custom profile catches the codec to match h.265 and only then it will transcode. But what if I have another format that the player can’t play without transcoding? From my understanding this won’t work, right?

So my thought was to keep the old profile that worked on almost any file and only extend this profile (via extends=) with the h.265 feature or copy it with the adjustment of the h.265 part into a whole new profile. And I just don’t know exactly how to do this. So either I am misunderstanding something here or I need help for an extension for this profile :)
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Wed Jan 26, 2022 6:40 pm

Re: Stuttering on Sony BD Player

Yes, I extended the generic profile just for simplicity. You are correct that it could be beneficial to extend a more specific profile. That way, if there's something unsupported that the user profile doesn't capture, the extended profile would catch it. But if you don't encounter any issues with your current media, there's no big reason to change the extends ID. It won't hurt anything to stay the way it is. But there's no issue changing the Extends to a more appropriate profile. Your choice!
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

rockzOr

Serviio newbie

Posts: 7

Joined: Sat Jan 22, 2022 11:57 am

Post Wed Jan 26, 2022 7:41 pm

Re: Stuttering on Sony BD Player

Ok just to be clear that I understood that correctly:

Instead of the profile „1“ I just place the profile name of the one I used before via auto detect? And that would still work? So I would have the same as before but now included the change for h.265 movies? That would be what I want to be honest. The thing I was unsure about is if I just extend the old profile then will the override for h.265 still work or would something break either this or one of the other profile settings.

I will give it a try if I am able to extend the other one, give it a new name and retest it. If there are any issues I will come back to you ;)

Thanks a lot for your help and your explanations. It helped me understanding the server a little bit better. And the 25$ already payed off for the pro version with you guys supporting it.

Regards
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Thu Jan 27, 2022 12:07 am

Re: Stuttering on Sony BD Player

Yes, you can change "1" to the name of a different profile, and it will then extend that profile. To my understanding, Serviio uses the user-profiles file, and then use the profile that was used for extension if the user profile doesn't find a match for the media.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents

Return to Sony

Who is online

Users browsing this forum: No registered users and 41 guests

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