[Info] How to tuning MPExended (1 Viewer)

regeszter

Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    Hi,

    I like to share some info regards tuning of the MExtended.

    The profiles are stored in c:\ProgramData\MPExtended\StreamingProfiles.xml

    This is a ffmpeg profile from StreamingProfiles.xml

    <TranscoderProfile>
    <Name>Android FFmpeg HD</Name>
    <Description>HD-quality Android profile based on ffmpeg</Description>
    <Bandwidth>2280</Bandwidth>
    <Targets>
    <Target>android</Target>
    </Targets>
    <Transport>http</Transport>
    <MaxOutputWidth>1280</MaxOutputWidth>
    <MaxOutputHeight>720</MaxOutputHeight>
    <MIME>video/MP2T</MIME>
    <HasVideoStream>true</HasVideoStream>
    <Transcoder>MPExtended.Services.StreamingService.Transcoders.FFMpeg</Transcoder>
    <TranscoderParameters>
    <codecParameters>-codec:v libx264 -b:v 1768k -profile:v baseline -preset:v faster -coder rle -codec:a aac -b:a 512k -ac 2 -strict experimental -async 1 -sn -f mpegts</codecParameters>
    </TranscoderParameters>
    </TranscoderProfile>

    • Changing of the 1768k to a higher value will cause better video quality but needs more network bandwidth.
    • Enable the deinterlacing on server side add -vf yadif. It will cause higher CPU usage but needs for MPTvScheduler internal player.
    • For skipping audio reencoding change aac -b:a 512k -ac 2 with copy. It will cause lower CPU usage.
    • For decrease CPU usage change faster with veryfast or superfast. It will cause lower CPU usage but causes lower video quality.

    Here is my HD profile:
    <codecParameters>-codec:v libx264 -b:v 3096k -profile:v baseline -preset:v superfast -coder rle -codec:a copy -strict experimental -vf yadif -async 1 -sn -f mpegts</codecParameters>

    And my SD profile:
    <codecParameters>-codec:v libx264 -b:v 2048k -profile:v baseline -preset:v superfast -coder rle -codec:a copy -strict experimental -vf yadif -async 1 -sn -f mpegts</codecParameters>


    Do not forget to save the original StreamingProfiles.xml, before you edit it!

    thx,
    regeszter
     

    Zoidberg77

    MP Donator
  • Premium Supporter
  • July 12, 2011
    392
    206
    Home Country
    Germany Germany
    Thank you, regeszter! Good to know, especially the hint for deinterlacing.
    Once in while I try to get Quicksync encoding enabled. But I fail everytime. The latest version of ffmpeg encoder should be able to use QS, but I never got it working (it just fails already as standalone, so no chance in MPextended at all). I tried also QSTranscode, which is working as standalone (command line) but won't work within MPextended and I have no idea why.
    If someone has it running with qsv enabled, I'd appreciate a hint how to do it :)
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    Thank you, regeszter! Good to know, especially the hint for deinterlacing.
    Once in while I try to get Quicksync encoding enabled. But I fail everytime. The latest version of ffmpeg encoder should be able to use QS, but I never got it working (it just fails already as standalone, so no chance in MPextended at all). I tried also QSTranscode, which is working as standalone (command line) but won't work within MPextended and I have no idea why.
    If someone has it running with qsv enabled, I'd appreciate a hint how to do it :)

    What is the qsv option?
     

    Zoidberg77

    MP Donator
  • Premium Supporter
  • July 12, 2011
    392
    206
    Home Country
    Germany Germany
    qsv = QuickSyncVideo
    The codec in ffmpeg would be e.g. h264_qsv instead of libx264 to use QuickSync for h264 encoding
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    of course both require Intel CPU capable of quicksync encoding

    It saves 25% CPU usage on my low power J1900 cpu.

    -c:v h264_qsv -b:v 3096k -preset:v veryfast -coder rle -codec:a copy -strict experimental -vf yadif -async 1 -sn -f mpegts -look_ahead 0

    I changed the bold text in my profile. Try it.
     

    Zoidberg77

    MP Donator
  • Premium Supporter
  • July 12, 2011
    392
    206
    Home Country
    Germany Germany
    Thank you, but it doesn't work for me.
    If I replace the ffmpeg.exe in C:\Program Files (x86)\MPExtended\Service\Streaming with a new 32bit build, I need to remove the -coder rle option, otherwise transcoding doesn't work. But h264_qsv still doesn't work at all. But as said it even doesn't work as standalone (called ffmpeg from command line) on my server. So it may be a simple problem on my side. Only sad that QSTranscode as generic transcoder doesn't work within MPExtendend.
    Thus, if anyone ever has the same problems, but finds a solution: I'm happy to hear :)

    Edit 7/2017:
    Just stumbled across this post. In the end I found out that my Sandy Bridge CPU is just not compatible with newer ffmpeg versions and qsv. I found an older version which should work with my CPU. But the gain in terms of less CPU utilization is quite low and doesn't justify using such an old version...
     
    Last edited:

    Users who are viewing this thread

    Top Bottom