Page 1 of 1

Add mpeg2 hardware encoding with QSV

PostPosted: Mon Feb 11, 2019 11:52 pm
by vaerc
Hi! This is Paul, longtime user of serviio, first time poster. I've been really happy with this as my main media server. For a troublesome old Panasonic DMP-BDT210 unit that I was helping to get working as a streaming device, I wrote a custom user profile to transcode nearly everything into two compatible formats (one audio, one video). The current version (1.10.1) doesn't have fully compatible Panasonic profiles for my use. Since I expect a lot of transcoding will be done, I thought it would make sense to take advantage of the i3-3220 processor on the network, and the h264 hardware encoding it can do.

I was amazed it performed >600 fps on HD media files, and correctly streamed to my phone's bubbleupnp client (I had to manually set 16:9 aspect ratio - might want to take a look at the h264_qsv ffmpeg command! DAR in the profile doesn't help). However the Panasonic wouldn't accept the content. I tried with mpeg and mpegts containers. For some reason, transcoded h.264 content cannot be played. UNtranscoded h.264 files can be played, though, as can mpeg2video.

So, for now, I'm relegating all video transcoding to mpeg2video, which works fine, at the cost of 2 cores at 50% usage. I'd like to test the processor's ability to hardware encode this format. The FFMPEG version I pulled supports this, according to their hardware accel page and the -encoders option shows mpeg2_qsv available. I followed all the steps https://forum.serviio.org/viewtopic.php?f=5&t=22512 to get acceleration working right. Can mpeg2_qsv be implemented in an update as well?

Re: Add mpeg2 hardware encoding with QSV

PostPosted: Tue Feb 12, 2019 3:00 am
by atc98092
There's already a bitbucket request for this (https://bitbucket.org/xnejp03/serviio/i ... celeration). I noticed Zip marked it for version 1.7, which we are well past. There's no updates to the BB request since 2016, so a reminder might be welcome.

Re: Add mpeg2 hardware encoding with QSV

PostPosted: Wed Feb 13, 2019 10:10 pm
by zip
it's already supported

https://bitbucket.org/xnejp03/serviio/i ... t-28053334

You need a custom ffmpeg build, with the QSV built-in and pass the system property

Re: Add mpeg2 hardware encoding with QSV

PostPosted: Wed Feb 13, 2019 11:55 pm
by atc98092
I just checked, and the ffmpeg Windows bulds available for download at https://ffmpeg.zeranoe.com/builds/ include the proper library (libmfx) for Intel hardware acceleration. I'm going to have to implement this myself now. :D

Re: Add mpeg2 hardware encoding with QSV

PostPosted: Tue Mar 05, 2019 1:39 am
by vaerc
Thank you for the replies, I will check it out at my next chance. Sorry I didn't reply earlier, I'll have to check the settings here for notifications!

Paul

Edit: If I read your 2016-05-25 bitbucket post correctly, Mr. Nejedly, the hardware encoding supported is only h264, not mpeg2. I was having success with ffmpeg hardware encoding, but the networked player seems to only accept mpeg2 streams, despite the fact it can locally play h264 video (via usb thumbdrive).

Re: Add mpeg2 hardware encoding with QSV

PostPosted: Wed Mar 06, 2019 9:26 pm
by zip
I'll include mpeg2 hw encoding in v2