Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Odroid XU4 hardware transcoding support #2762

Closed
crazyquark opened this issue Jul 20, 2017 · 4 comments
Closed

Integrate Odroid XU4 hardware transcoding support #2762

crazyquark opened this issue Jul 20, 2017 · 4 comments

Comments

@crazyquark
Copy link

crazyquark commented Jul 20, 2017

Hello,

Would it be possible to integrate user memeka's changes into the mainline?
https://forum.odroid.com/viewtopic.php?f=98&t=26390

I am a lifetime subscription holder for emby server.

@LukePulverenti
Copy link
Member

I can't seem to find the changes. The link in that topic is dead.

@LukePulverenti
Copy link
Member

Please re-open if you are able to locate the information. Thanks !

@crazyquark
Copy link
Author

I found the code here:
[https://emby.media/community/index.php?/topic/46056-adding-a-new-encoder-interface-issues/](emby forum)
`commit 53f82f538a76b862677f584713d2c3e66cf9a2e0
Author: memeka mihailescu2m@gmail.com
Date: Mon Mar 20 12:46:12 2017 +1030

Add h264_v4l2m2m hw-encoder for Exynos MFC arm platforms (requires ffmpeg support)

diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 80b9cc1..156f62f 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -56,6 +56,10 @@ namespace MediaBrowser.Controller.MediaEncoding
{
return GetAvailableEncoder("h264_omx", defaultEncoder);
}

  •   if (string.Equals(hwType, "h264_v4l2m2m", StringComparison.OrdinalIgnoreCase))
    
  •   {
    
  •       return GetAvailableEncoder("h264_v4l2m2m", defaultEncoder);
    
  •   }
               if (string.Equals(hwType, "vaapi", StringComparison.OrdinalIgnoreCase) && !string.IsNullOrWhiteSpace(encodingOptions.VaapiDevice))
               {
                   if (IsVaapiSupported(state))
    

@@ -649,7 +653,8 @@ namespace MediaBrowser.Controller.MediaEncoding
if (!string.IsNullOrEmpty(request.Profile))
{
if (!string.Equals(videoEncoder, "h264_omx", StringComparison.OrdinalIgnoreCase) &&

  •                !string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase))
    
  •                !string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase) &&
    
  •       !string.Equals(videoEncoder, "h264_v4l2m2m", StringComparison.OrdinalIgnoreCase))
               {
                   // not supported by h264_omx
                   param += " -profile:v " + request.Profile;
    

@@ -700,7 +705,8 @@ namespace MediaBrowser.Controller.MediaEncoding
break;
}
}

  •            else if (!string.Equals(videoEncoder, "h264_omx", StringComparison.OrdinalIgnoreCase))
    
  •            else if (!string.Equals(videoEncoder, "h264_omx", StringComparison.OrdinalIgnoreCase) &&
    
  •   	 !string.Equals(videoEncoder, "h264_v4l2m2m", StringComparison.OrdinalIgnoreCase))
               {
                   param += " -level " + level;
               }
    

@@ -713,11 +719,17 @@ namespace MediaBrowser.Controller.MediaEncoding

         if (!string.Equals(videoEncoder, "h264_omx", StringComparison.OrdinalIgnoreCase) &&
             !string.Equals(videoEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase) &&
  •            !string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase))
    
  •            !string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase) &&
    
  •   !string.Equals(videoEncoder, "h264_v4l2m2m", StringComparison.OrdinalIgnoreCase))
           {
               param = "-pix_fmt yuv420p " + param;
           }
    
  •   if (string.Equals(videoEncoder, "h264_v4l2m2m", StringComparison.OrdinalIgnoreCase))
    
  •   {
    
  •   param = "-pix_fmt nv21 " + param;
    
  •   }
    
  •        return param;
       }
    

diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
index 9c1189f..84530c5 100644
--- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
@@ -142,6 +142,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
"hevc_omx",
"h264_vaapi",
"hevc_vaapi",

  •   "h264_v4l2m2m",
               "ac3"
           };
    

diff --git a/MediaBrowser.WebDashboard/dashboard-ui/encodingsettings.html b/MediaBrowser.WebDashboard/dashboard-ui/encodingsettings.html
index bf66c4f..abcb211 100644
--- a/MediaBrowser.WebDashboard/dashboard-ui/encodingsettings.html
+++ b/MediaBrowser.WebDashboard/dashboard-ui/encodingsettings.html
@@ -12,6 +12,7 @@
OpenMAX OMX (experimental)
Nvidia NVENC (experimental)
Video Acceleration API (VA API) (experimental)

  •   	<option value="h264_v4l2m2m">Exynos V4L2 MFC Encoder (experimental)</option>
                   </select>
                   <div class="fieldDescription">${LabelHardwareAccelerationTypeHelp}</div>
               </div>`
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants