FAQ  •  Register  •  Login

Transcode 4K video to 1080 HD

<<

attonyzhou

Serviio newbie

Posts: 10

Joined: Thu May 19, 2016 6:36 am

Post Thu May 19, 2016 6:40 am

Transcode 4K video to 1080 HD

Recently installed Serviio on my Mac and all was awesome, be able to view my 500G of all family photos/videos on my two Samsung TV happily. I kept transcoding=OFF as I didn’t want to lose resolution to let Serviio transcode them. I have some 1080p H264 *.mp4 file which can be played on Samsung E-series TV perfectly without transcoding.

Untill I bought a 4K video camera and captured some 4k videos, the assets can only be played on Mac. I edit them via iMovie then saved to 1080p *.mp4 before watching on TV. I though I should give a go of Serviio transcoding 4K to 1080p HD so that I can watch directly on my TV that doesn’t support 4K.

My 4k video files are *.MP4 which I assumed they’re MP4 container, codec is H264, resolution is 2160x3840. When I tried to play that file from TV with Seriio trancoding=off, TV report the file format isn’t supported.
When I turned serviio transcoding ON, TV reported resolution 2160x3840 isn’t supported. Looks Serviio is doing transcoding(to some format) with same solution.

So, I loacated profile file and added following under Samsung E TV session:

  Code:
         <!-- transcode 4K video to 1080*1920 H264 -->
         <!-- transcode with H264 video -->
         <Video targetContainer="mp4" targetVCodec="h264" targetACodec="ac3" maxHeight="1080" DAR="16:9" aBitrate="448" maxVBitrate="40000">
            <Matches container="*" vCodec="h264"  />
         </Video>



By which I wish Serviio will transcode 4K video to 1920x1080 file by assigning maxHeight="1080". However the TV is still reporting resolution 2160x3840 is not supported so transcoding/changing resolusion is not happening. My guess are a) option maxHeight="1080" doesn’t work b) the profile I inserted isn’t called. I tried with forceVTranscoding on as well.

Any one has experience implementing that? My serviio version is 1.6.1. Thanks.
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Thu May 19, 2016 12:18 pm

Re: Transcode 4K video to 1080 HD

Did you restart the Serviio service (or reboot the computer) after you edited the profile? That is necessary for the change to take effect.

MP4 is not an acceptable target container. It can only be asf, mpeg (MPEG2PS), mpegts (MPEG2TS) or applehttp (HLS). Your TV should support MPEG or MPEGTS.

See this page for more transcoding information: http://www.serviio.org/index.php?option ... icle&id=24
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
<<

attonyzhou

Serviio newbie

Posts: 10

Joined: Thu May 19, 2016 6:36 am

Post Sat May 21, 2016 11:07 am

Re: Transcode 4K video to 1080 HD

Transcoding started to working with modified code:

  Code:
                        <!-- transcode 4K video to 1080*1920 H264 -->
                        <!-- transcode with H264 video -->
                        <Video targetContainer="mpeg" targetVCodec="h264" targetACodec="ac3" maxHeight="1080" maxVBitrate="20000">
                                <Matches container="mp4" vCodec="h264" profile="high" levelGreaterThan="4.2" />
                        </Video>


However, My TV keeps "loading" after around 20 secs, sometimes it will just exit. A performance problem of Mac transcoding?!
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Mon May 23, 2016 12:41 pm

Re: Transcode 4K video to 1080 HD

I have no Mac experience, so I have to defer to someone else about this.
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
<<

attonyzhou

Serviio newbie

Posts: 10

Joined: Thu May 19, 2016 6:36 am

Post Mon May 23, 2016 11:56 pm

Re: Transcode 4K video to 1080 HD

atc98092 wrote:I have no Mac experience, so I have to defer to someone else about this.

Thanks mate for your reply – it has been very useful
My Mac is 2015 4K with Fusion driver – transcoding buffer is on solid disk so it should be quite fast enough. The problem is there is no native CPU/Memory monitoring utility on latest iOS, El Capitan, so I’m unable to know how much CPU/memory has been used during transcoding. The 4K video bitrate is 20Mbps and network is wired so bottleneck is not there either.

Under Serviio delivery setting, I set CPU number to “Optimal”, I may try to force it to maximum which is 4 and get it a go tonight.
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Tue May 24, 2016 4:18 am

Re: Transcode 4K video to 1080 HD

I also am not a MAC user but in general encoding to h264 can be processor intensive. There is no real advantage in trancoding on-the-fly to h264, so you may also want to try transcoding to mpeg2video which is far less intensive. Change your transcode line to (note - I have also changed the container type to mpeg-ts):

<Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3" maxHeight="1080" maxVBitrate="20000">

Save and restart your MAC. ps: I set my CPU's to 4 rather than Optimal but can't really say it makes much difference that I have noticed.
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

attonyzhou

Serviio newbie

Posts: 10

Joined: Thu May 19, 2016 6:36 am

Post Tue May 24, 2016 5:00 am

Re: Transcode 4K video to 1080 HD

DenyAll wrote:I also am not a MAC user but in general encoding to h264 can be processor intensive. There is no real advantage in trancoding on-the-fly to h264, so you may also want to try transcoding to mpeg2video which is far less intensive. Change your transcode line to (note - I have also changed the container type to mpeg-ts):

<Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3" maxHeight="1080" maxVBitrate="20000">

Save and restart your MAC. ps: I set my CPU's to 4 rather than Optimal but can't really say it makes much difference that I have noticed.

Thanks for reply, will try mpeg2video too.
Tried with “mpeg2ts” container before, there were just severe pixilation on my TV so moved to “mpeg” container and pixilation problem disappeared.
<<

attonyzhou

Serviio newbie

Posts: 10

Joined: Thu May 19, 2016 6:36 am

Post Tue May 24, 2016 11:42 pm

Re: Transcode 4K video to 1080 HD

It turned out the problem is caused my old FFMPEG, version 2.4, included within Serviio by default. I upgrade to FFMPEG v3.0 and then I am able to get smooth transcoded video without disruption. Although, transcoding still takes upto 95% of my Quad Intel 3.1G CPU usage, Mpeg2 or H264 really doesn’t make too much difference.

Have gone through the FFMPEG release note, the later version supports Intel QSV (Quick Sync Video) technology which allows decoding and encoding using recent Intel CPU and integrated GPU. However, need a parameter “h264_qsv” passed to FFMPEG command like this:
  Code:
ffmpeg -i INPUT -c:v h264_qsv -preset:v faster out.qsv.mp4

Guess Serviio doesn’t really support this option so still using software transcoding. Anyone have an idea if Serviio has a plan to support it?

PS, when I watch transcoded video on TV, after end of a file, TV will report no network connection and exit DLNA, I have to re-enter to watch next one. When watch non-transcoded files, it’s able to return to video list nicely. Any idea on the cause?
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Wed May 25, 2016 12:14 pm

Re: Transcode 4K video to 1080 HD

Samsung hasn't done a bang up job on their DLNA functionality. I often (like almost always) get a network disconnect after a video ends and it tries to load the next one. If I select the video manually, it plays fine. Sometimes I get the same disconnect error on initial attempt to play, and the second attempt works fine.

It's a Samsung issue, not Serviio. My Sony players never encounter the issue.
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
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Wed May 25, 2016 2:31 pm

Re: Transcode 4K video to 1080 HD

attonyzhou wrote:Guess Serviio doesn’t really support this option so still using software transcoding. Anyone have an idea if Serviio has a plan to support it?
It's being discussed - see https://bitbucket.org/xnejp03/serviio/i ... celeration
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

attonyzhou

Serviio newbie

Posts: 10

Joined: Thu May 19, 2016 6:36 am

Post Thu May 26, 2016 1:19 am

Re: Transcode 4K video to 1080 HD

DenyAll wrote:

Found this there, looks it ought to work.

Support for an external ffmpeg with QSV included (--enable-libmfx) is now implemented. It's done only for h264 encoding. To enable this, you need
the proer FFmpeg and
set -Dserviio.useQSVAcceleration system variable in the startup script of the server
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue May 31, 2016 9:18 pm

Re: Transcode 4K video to 1080 HD

.. for the future 1.7
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Wed Jun 01, 2016 5:18 am

Re: Transcode 4K video to 1080 HD

... and supported by your CPU.

Am including this link to a list of supported CPU for future reference - http://ark.intel.com/search/advanced?s= ... Video=true
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 17 guests

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