FAQ  •  Register  •  Login

0.6, "Sony Bravia TV" profile, mp4 stuttering

<<

pizzaguy541

Serviio lover

Posts: 89

Joined: Sun Jan 02, 2011 10:01 am

Location: United States

Post Sat Sep 24, 2011 12:03 pm

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

patters wrote:That's strange - a few guys tested this to be ok on 2010 Bravias with Beta 4 so we removed that particular online transcode section since it seemed it had been added primarily to fix TED streams, but at the expense of transcoding every other H.264 stream.

Paging Illico and pizzaguy541 to the thread... :)
I don't think that I can be of much help as I don't own a Bravia tv.

The only DLNA device that I'm currently testing with is a Sony BDP.
<<

tvkdlna

DLNA master

Posts: 103

Joined: Sat Jan 08, 2011 4:50 pm

Post Sat Sep 24, 2011 1:53 pm

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

New data in.

I tested with a h264 sample from different source; The Simpsons Movie – 720p Trailer, and albeit there was bit of a struggle to maintain audio sync, it didn't stutter at all.

For this sample 'ffmpeg -i' says the following:
  Code:
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-ffserver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enable-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-config
  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

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (5000000/104271) -> 23.98 (24000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'The Simpsons Movie - Trailer.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isomavc1
    creation_time   : 2007-02-19 05:03:04
  Duration: 00:02:17.30, start: 0.000000, bitrate: 4283 kb/s
    Stream #0.0(und): Video: h264 (Main), yuv420p, 1280x544, 4221 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
    Metadata:
      creation_time   : 2007-02-19 05:03:04
    Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 64 kb/s
    Metadata:
      creation_time   : 2007-02-19 05:03:08
At least one output file must be specified

I vaguely remember reading somewhere that if you feed video with non-standard resolution to a Sony TV via DLNA, you may be asking for trouble. Could it be that the 480x352 resolution of my original test material is causing the stutter? I've now confirmed the phenomenon with more than one file.

If that's the case, and given that everything seems to work nicely when transcoded; I guess either Serviio or the profile (not sure if it can be done with the means of the profile alone) should always transcode video material with non-standard resolution.

Edit: The same seems to happen also with 480x272 resolution. With both these low resolutions the outcome isn't completely consistent; most of the time you get heavy stutter, then again sometimes the video plays otherwise ok, but audio is several seconds out of sync. None of this happens if the material is transcoded.

Edit #2: I noticed that in all my troubled samples the video stream profile is "Video: h264 (Constrained Baseline)", but in the working Simpsons sample it's "Video: h264 (Main)". Maybe this too could have an effect on this.
Last edited by tvkdlna on Sun Sep 25, 2011 3:51 am, edited 2 times in total.
Sony Bravia KDL-32W5500, OpenSUSE, Windows
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Sep 25, 2011 12:51 am

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

that might be the cause. You cannot ATM define a transcoding matcher based on resolution
<<

tvkdlna

DLNA master

Posts: 103

Joined: Sat Jan 08, 2011 4:50 pm

Post Sun Sep 25, 2011 7:08 am

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

I found somewhat elegant way to make all the bad things go away.

See the following and pay attention to sections starting with "<!-- Transcode all h264 video with BASELINE on MPEG-TS stream with MPEG2VIDEO and ac3 audio transcoding -->":
  Code:
   <Profile id="9" name="Sony Bravia TV" extendsProfileId="1">
      <!-- All models *except* 2011 series which need a separate profile -->
      <Detection>
         <UPnPSearch>
            <!-- 2009 models known to support UPnPSearch, and all 2010 models -->
            <FriendlyName>BRAVIA KDL-\d{2}(WE5|(E53|E55|V55|V56|W55|W57|Z55|Z57)\d0|[EHLNPB]X\d[01]\d) *</FriendlyName>
         </UPnPSearch>
         <HttpHeaders>
            <!-- 2008 models, and possibly older or different region 2009 firmwares which may not support UPnPSearch -->
            <X-AV-Client-Info>.*BRAVIA KDL-\d{2}(([A-Z](1|5|E1|R1|BR45|BR9|[1357]0\d{2}|4\d{3}))|(S55|S57|W51|Z51|Z58)\d0) *</X-AV-Client-Info>
         </HttpHeaders>
      </Detection>
      <DeviceDescription>
         <!-- act as WMP so that the TV doesn't show root categories -->
         <ModelName>Windows Media Player Sharing</ModelName>
         <ModelNumber>3.0</ModelNumber>
         <Manufacturer>Microsoft Corporation</Manufacturer>
      </DeviceDescription>
      <ContentDirectoryMessageBuilder>org.serviio.upnp.service.contentdirectory.SonyDLNAMessageBuilder</ContentDirectoryMessageBuilder>
      <ContentDirectoryDefinitionFilter>org.serviio.upnp.service.contentdirectory.definition.WMPContentDirectoryDefinitionFilter</ContentDirectoryDefinitionFilter>
      <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_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU">AVC_TS_MP_HD_AC3</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU">AVC_TS_MP_SD_AC3</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T">AVC_TS_MP_HD_AC3_T</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T">AVC_TS_MP_SD_AC3_T</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T">AVC_TS_HP_HD_MPEG1_L2_T</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T">AVC_TS_HP_SD_MPEG1_L2_T</MediaFormatProfile>
         <!-- rename transcoded mpeg2ts with h264 to one of the TV's supported profiles -->
         <MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO">AVC_TS_MP_HD_AC3_ISO</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO">AVC_TS_MP_SD_AC3_ISO</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO">AVC_TS_HP_HD_MPEG1_L2_ISO</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO">AVC_TS_HP_SD_MPEG1_L2_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>
         <!-- Transcode all h264 video with HIGH/MAIN > Level 4.1 on MPEG-TS stream with MPEG2VIDEO and ac3 audio transcoding -->
         <!-- expected profile MPEG_TS_SD_EU/MPEG_TS_SD_NA/MPEG_TS_SD_KO -->
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="384">
            <Matches container="avi" vCodec="h264" profile="high" levelGreaterThan="4.1" />
            <Matches container="avi" vCodec="h264" profile="main" levelGreaterThan="4.1" />
            <Matches container="matroska" vCodec="h264" profile="high" levelGreaterThan="4.1" />
            <Matches container="matroska" vCodec="h264" profile="main" levelGreaterThan="4.1" />
            <Matches container="mp4" vCodec="h264" profile="high" levelGreaterThan="4.1" />
            <Matches container="mp4" vCodec="h264" profile="main" levelGreaterThan="4.1" />
         </Video>
         <!-- Transcode all h264 video with BASELINE on MPEG-TS stream with MPEG2VIDEO and ac3 audio transcoding -->
         <!-- expected profile MPEG_TS_SD_EU/MPEG_TS_SD_NA/MPEG_TS_SD_KO -->
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="192">
            <Matches container="avi" vCodec="h264" profile="baseline" />
            <Matches container="mp4" vCodec="h264" profile="baseline" />
            <Matches container="matroska" vCodec="h264" profile="baseline" />
         </Video>
         <!-- Remux h264 video with AC3 audio to MPEG-TS stream without transcoding -->
         <!-- expected profile AVC_TS_MP_HD_AC3_ISO -->
         <Video targetContainer="mpegts">
            <Matches container="avi" vCodec="h264" aCodec="ac3" />
            <Matches container="mp4" vCodec="h264" aCodec="ac3" />
            <Matches container="matroska" vCodec="h264" aCodec="ac3" />
         </Video>
         <!-- Remux all other h264 video to 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" />
            <Matches container="ogg" vCodec="mpeg4" />
         </Video>
         <!-- All Others video/audio codec will be transcoded into mpeg2ts, mpeg2video and ac3 audio -->
         <!-- expected profile MPEG_TS_SD_EU/MPEG_TS_SD_NA/MPEG_TS_SD_KO -->
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="192">
            <Matches container="asf" />
            <Matches container="avi" />
            <Matches container="mp4" />
            <Matches container="matroska" />
            <Matches container="flv" />
            <Matches container="wtv" />
            <Matches container="ogg" />
         </Video>
         <Audio targetContainer="lpcm">
            <!-- To allow "pause" then "resume" functions and album art for TVs that support it - transcode to mp3 instead -->
            <Matches container="asf" />
            <Matches container="mp4" />
            <Matches container="ogg" />
            <Matches container="flac" />
         </Audio>
      </Transcoding>
      <OnlineTranscoding>
         <!-- Transcode all h264 video with BASELINE on MPEG-TS stream with MPEG2VIDEO and ac3 audio transcoding -->
         <!-- expected profile MPEG_TS_SD_EU/MPEG_TS_SD_NA/MPEG_TS_SD_KO -->
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="192">
            <Matches container="avi" vCodec="h264" profile="baseline" />
            <Matches container="mp4" vCodec="h264" profile="baseline" />
            <Matches container="matroska" vCodec="h264" profile="baseline" />
         </Video>
      </OnlineTranscoding>
   </Profile>

This doesn't take any existing functionality away, but only deals with h264 "baseline" profile (although it also seems to match "constrained baseline", which is good). Since both h264 "baseline" and "constrained baseline" profiles are defined to be "primarily for low-cost applications" (see http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles), they are likely to present odd screen resolutions, which seem to be just the thing causing problems to Bravia TV's with h264, and now solved with transcoding.

I can now play any h264 content, both local and online, without a hitch and even TED seems to be happy.

I suggest these changes to "Sony Bravia TV" profile.

Edit: Removed junk from the commenting and made it more consistent.
Last edited by tvkdlna on Sun Sep 25, 2011 7:22 pm, edited 3 times in total.
Sony Bravia KDL-32W5500, OpenSUSE, Windows
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Sep 25, 2011 2:37 pm

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

let few people confirm it works and then create a bitbucket ticket for inclusion in the future release. thanks.
<<

ptyork

User avatar

Serviio newbie

Posts: 18

Joined: Wed May 11, 2011 7:36 pm

Location: Augusta, GA, USA

Post Mon Sep 26, 2011 2:01 pm

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

I can give you at least one thumbs up. Solved my out-of-sync audio issues nicely. I've not done a lot of testing, but so far this appears quite kosher.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Mon Sep 26, 2011 2:24 pm

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

I tested "The Simpsons Movie – 720p Trailer.mp4" on my 46EX501 (2010) model with the "Sony Bravia TV" profile selected: no stuttering and no audio sync problem . :?:
I have no "Baseline" mp4 samples...
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
<<

tvkdlna

DLNA master

Posts: 103

Joined: Sat Jan 08, 2011 4:50 pm

Post Mon Sep 26, 2011 3:21 pm

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

Illico wrote:I have no "Baseline" mp4 samples...

TED is a good place to start, their recordings are of h264 "constrained baseline" profile in mp4 container.

For online test: http://www.ted.com/talks/rss

For local test: Open the URL above to browser, download any of the feed items, play it from the disk.
Sony Bravia KDL-32W5500, OpenSUSE, Windows
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Mon Sep 26, 2011 3:24 pm

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

So TED shows work fine on my Sony EX501 with default 0.6 "Sony Profile".

EDIT: The only issue, is on bad display ratio but could be resolved with that options : viewtopic.php?f=11&t=2956#p18767
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
<<

tvkdlna

DLNA master

Posts: 103

Joined: Sat Jan 08, 2011 4:50 pm

Post Mon Sep 26, 2011 4:02 pm

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

Illico wrote:So TED shows work fine on my Sony EX501 with default 0.6 "Sony Profile".

EDIT: The only issue, is on bad display ratio but could be resolved with that options : viewtopic.php?f=11&t=2956#p18767

It's likely that newer Bravia models are more capable with h264. For the older sets though, like my W5500, transcoding to mpeg seems to be the only somewhat sure way to get things working.

Out of curiosity: Does transcoding fix your ratio issue? I've noticed my set to be way less picky with mpeg than it is with h264.
Sony Bravia KDL-32W5500, OpenSUSE, Windows
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Mon Sep 26, 2011 4:10 pm

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

tvkdlna wrote:It's likely that newer Bravia models are more capable with h264. For the older sets though, like my W5500, transcoding to mpeg seems to be the only somewhat sure way to get things working.

I'm afraid it's true (W5500 is a 2009 model)
tvkdlna wrote:Out of curiosity: Does transcoding fix your ratio issue? I've noticed my set to be way less picky with mpeg than it is with h264.

ratio issue is not fixed with transcoding for now...we need to implement the padding options.
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
<<

tvkdlna

DLNA master

Posts: 103

Joined: Sat Jan 08, 2011 4:50 pm

Post Mon Sep 26, 2011 4:53 pm

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

Illico wrote:
tvkdlna wrote:It's likely that newer Bravia models are more capable with h264. For the older sets though, like my W5500, transcoding to mpeg seems to be the only somewhat sure way to get things working.
I'm afraid it's true (W5500 is a 2009 model)

So, for the sake of stone age Sony equipment, do you vote for this change? I'd like to create the bitbucket ticket zip requested.

To be considered: Both "baseline" and "constrained baseline" are low-bandwidth h264 profiles, and transcoding them (even if they would work remuxed in new Bravias) creates negligible CPU cost. It's true that you should always remux rather than transcode, but for older Bravias remuxing just isn't an option in this case.

Edit: I just noticed zip already created the ticket. Damn the man is fast. :)
Sony Bravia KDL-32W5500, OpenSUSE, Windows
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Mon Sep 26, 2011 5:37 pm

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

Well, ticket is opened, we'll work on this change.
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
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Wed Sep 28, 2011 12:05 am

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

So you're only proposing to transcode H.264 that's at these 'baseline' oddball resolutions, right? (since the profile level implies a certain resolution) If so then that's fine by me. I'd object if it was all H.264. The TED talks was the one online feed that the V5500 couldn't play properly. The rest were ok.
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

tvkdlna

DLNA master

Posts: 103

Joined: Sat Jan 08, 2011 4:50 pm

Post Wed Sep 28, 2011 4:58 am

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

Turned out this wasn't the whole story.

Please test samples from this url: http://www.coveragefirst.com/portal/server.pt?open=17&objID=1084&DirMode=1&parentname=Dir&parentid=1&mode=2

They are of the "main" h264 profile, but won't play without stuttering in my W5500. How is it with newer Bravias?

'ffmpeg -i' of one of them:
  Code:
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-ffserver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enable-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-config
  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

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 50.00 (50/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Leadership_Team _v3.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2011-06-03 14:31:34
    encoder         : HandBrake 0.9.5 2011010300
  Duration: 00:05:39.77, start: 0.000000, bitrate: 461 kb/s
    Stream #0.0(und): Video: h264 (Main), yuv420p, 640x360 [PAR 1:1 DAR 16:9], 392 kb/s, 50 fps, 50tbr, 90k tbn, 180k tbc
    Metadata:
      creation_time   : 2011-06-03 14:31:34
    Stream #0.1(eng): Audio: aac, 44100 Hz, mono, s16, 62 kb/s
    Metadata:
      creation_time   : 2011-06-03 14:31:34
At least one output file must be specified

If I manually put it through the same ffmpeg procedure Serviio does:
  Code:
"C:\Program Files\Serviio\lib\ffmpeg.exe" -i "Leadership_Team _v3.mp4" -y -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 384k -ac 1 -map 0:0 -map 0:1 -sn -f mpegts test.ts
the resulting 'test.ts' shows strange characteristics:
  • Video: MPEG4 Video (H264) 640x368 119047.62fps [Video - AVC (H.264), Main Profile, Level 3.1, 640x368, 119047.619 fps (0100,e0,00)]
  • Audio: Dolby AC3 44100Hz mono 384kbps [Audio - Dolby Digital, 44.1 kHz, 1 chn, 384.0 kbit/s (0101,bd,00)]
Now, that's a high fps (actually made my W5500 reboot).

These samples seem to have some common features with my earlier stuttering samples:
  • major_brand: mp42
  • high (90k) tbn
Could there be something wrong with the Serviio ffmpeg procedure?
Sony Bravia KDL-32W5500, OpenSUSE, Windows
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Wed Sep 28, 2011 7:56 am

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

The 2009 Bravias in general cannot play H.264 that doesn't confirm to AVCHD-specified resolutions, so that may be a better way to make the distinction between what will play natively and what needs transcoding, and since AVCHD is a standard the same behaviour may also apply to other devices. I have already created a ticket for this:
https://bitbucket.org/xnejp03/serviio/i ... resolution

So it may be that if Zip implements this basic form of resolution sorting we could apply it to all videos for the 2009 Bravias, and only to the OnlineTranscoding section for the 2010/2011 models.

However, in the case of that latest example I would say the problem lies with how it has been encoded (that crazy frame rate).
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

tvkdlna

DLNA master

Posts: 103

Joined: Sat Jan 08, 2011 4:50 pm

Post Thu Sep 29, 2011 4:49 am

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

patters wrote:The 2009 Bravias in general cannot play H.264 that doesn't confirm to AVCHD-specified resolutions [...]

Could you please download and test these two samples in V5500 with unmodified 0.6 profile:Because this is bothering me: They work remuxed in my W5500. So there evidently is h264 material that's not conforming to AVCHD resolutions, but still works remuxed (at least in W5500).

If they don't work remuxed in V5500, I give up trying to find a remuxing solution to this (as it likely wouldn't apply to anything but my particular Bravia model), and go along with your idea of transcoding any non-conforming resolution.
Sony Bravia KDL-32W5500, OpenSUSE, Windows
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Fri Sep 30, 2011 12:53 am

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

Yep both of those play remuxed on Bravia V5500. Strange - 384 is not even a valid AVCHD-SD resolution according to http://en.wikipedia.org/wiki/AVCHD
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

tvkdlna

DLNA master

Posts: 103

Joined: Sat Jan 08, 2011 4:50 pm

Post Fri Sep 30, 2011 5:14 am

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

Ok then, I'll keep digging.

So far I've found that in all my h264 samples that stutter, ffmpeg remux seems to do something bad to video stream fps. That is, after remux there is no fps whatsover. Here's an example:

  Code:
"C:\Program Files\Serviio\lib\ffmpeg.exe" -i "Leadership_Team _v3.mp4" -y -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 384k -ac 1 -map 0:0 -map 0:1 -sn -f mpegts test.ts

Before remux:
  Code:
"C:\Program Files\Serviio\lib\ffmpeg.exe" -i "Leadership_Team _v3.mp4"
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-ffserver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enable-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-config
  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

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 50.00 (50/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Leadership_Team _v3.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2011-06-03 14:31:34
    encoder         : HandBrake 0.9.5 2011010300
  Duration: 00:05:39.77, start: 0.000000, bitrate: 461 kb/s
    Stream #0.0(und): Video: h264 (Main), yuv420p, 640x360 [PAR 1:1 DAR 16:9], 392 kb/s, 50 fps, 50tbr, 90k tbn, 180k tbc
    Metadata:
      creation_time   : 2011-06-03 14:31:34
    Stream #0.1(eng): Audio: aac, 44100 Hz, mono, s16, 62 kb/s
    Metadata:
      creation_time   : 2011-06-03 14:31:34
At least one output file must be specified

After remux:
  Code:
"C:\Program Files\Serviio\lib\ffmpeg.exe" -i test.ts
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-ffserver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enable-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-config
  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
[mpegts @ 01a29c60] max_analyze_duration 5000000 reached at 5014400

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 50.00 (50/1)
Input #0, mpegts, from 'test.ts':
  Duration: 00:05:39.76, start: 1.400000, bitrate: 927 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0.0[0x100]: Video: h264 (Main), yuv420p, 640x360 [PAR 1:1 DAR 16:9], 50 tbr, 90k tbn, 180k tbc
    Stream #0.1[0x101](eng): Audio: ac3, 44100 Hz, mono, s16, 384 kb/s
At least one output file must be specified

Notice that after remux, in stream #0.0; "50 fps" is missing. This likely is the reason why MPCHC reported these ridiculously high frame rates I mentioned earlier: in the lack of actual fps information, it's some kind of estimate based on god knows what. More importantly, this may also be the reason why Bravias stutter. Maybe they're in trouble without the h264 video stream fps information.

I also found this not to be the only case ffmpeg h264 remux is causing problems with mpegts, see: http://ffmpeg.org/pipermail/ffmpeg-user/2011-April/000514.html

There may actually be a bug in ffmpeg h264 remuxing and we may have to transcode because of it. Which could also mean that this case eventually has little or nothing to do with the video resolution.

To be noted: I'm not a guru when it comes to ffmpeg, I just google. Someone with actual expertise: please throw in better ideas, or better yet, a solution on how you make ffmpeg to maintain h264 video stream fps while remuxing to mpegts. If i knew that, I could confirm or rule out this missing fps being an issue.
Sony Bravia KDL-32W5500, OpenSUSE, Windows
<<

tvkdlna

DLNA master

Posts: 103

Joined: Sat Jan 08, 2011 4:50 pm

Post Fri Sep 30, 2011 3:23 pm

Re: 0.6, "Sony Bravia TV" profile, mp4 stuttering

Here's some more:

http://ffmpeg-users.933282.n4.nabble.com/MPEGTS-no-PCR-when-muxing-H264-td2989848.html
http://ffmpeg-users.933282.n4.nabble.com/MPEG-TS-structure-td2133188.html

Be aware the the mpegts file output from ffmpeg is not very friendly to set top boxes. However, software decoders can usually play the .ts without a problem.

Seems that ffmpeg "vcodec copy" has always been more or less broken in the context of trying to produce mpegts from h264.
Sony Bravia KDL-32W5500, OpenSUSE, Windows
Next

Return to Sony

Who is online

Users browsing this forum: No registered users and 11 guests

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