{"action":"created","issue":{"url":"https://api.github.com/repos/MediaBrowser/Emby/issues/2762","repository_url":"https://api.github.com/repos/MediaBrowser/Emby","labels_url":"https://api.github.com/repos/MediaBrowser/Emby/issues/2762/labels{/name}","comments_url":"https://api.github.com/repos/MediaBrowser/Emby/issues/2762/comments","events_url":"https://api.github.com/repos/MediaBrowser/Emby/issues/2762/events","html_url":"https://github.com/MediaBrowser/Emby/issues/2762","id":244308873,"number":2762,"title":"Integrate Odroid XU4 hardware transcoding support","user":{"login":"crazyquark","id":2444933,"avatar_url":"https://avatars3.githubusercontent.com/u/2444933?v=4","gravatar_id":"","url":"https://api.github.com/users/crazyquark","html_url":"https://github.com/crazyquark","followers_url":"https://api.github.com/users/crazyquark/followers","following_url":"https://api.github.com/users/crazyquark/following{/other_user}","gists_url":"https://api.github.com/users/crazyquark/gists{/gist_id}","starred_url":"https://api.github.com/users/crazyquark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazyquark/subscriptions","organizations_url":"https://api.github.com/users/crazyquark/orgs","repos_url":"https://api.github.com/users/crazyquark/repos","events_url":"https://api.github.com/users/crazyquark/events{/privacy}","received_events_url":"https://api.github.com/users/crazyquark/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-20T10:03:06Z","updated_at":"2017-08-28T12:41:37Z","closed_at":"2017-08-05T18:03:32Z","body":"Hello,\r\n\r\nWould it be possible to integrate user memeka's changes into the mainline?\r\n[https://forum.odroid.com/viewtopic.php?f=98&t=26390](https://forum.odroid.com/viewtopic.php?f=98&t=26390)\r\n\r\nI am a lifetime subscription holder for emby server."},"comment":{"url":"https://api.github.com/repos/MediaBrowser/Emby/issues/comments/325342618","html_url":"https://github.com/MediaBrowser/Emby/issues/2762#issuecomment-325342618","issue_url":"https://api.github.com/repos/MediaBrowser/Emby/issues/2762","id":325342618,"user":{"login":"crazyquark","id":2444933,"avatar_url":"https://avatars3.githubusercontent.com/u/2444933?v=4","gravatar_id":"","url":"https://api.github.com/users/crazyquark","html_url":"https://github.com/crazyquark","followers_url":"https://api.github.com/users/crazyquark/followers","following_url":"https://api.github.com/users/crazyquark/following{/other_user}","gists_url":"https://api.github.com/users/crazyquark/gists{/gist_id}","starred_url":"https://api.github.com/users/crazyquark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazyquark/subscriptions","organizations_url":"https://api.github.com/users/crazyquark/orgs","repos_url":"https://api.github.com/users/crazyquark/repos","events_url":"https://api.github.com/users/crazyquark/events{/privacy}","received_events_url":"https://api.github.com/users/crazyquark/received_events","type":"User","site_admin":false},"created_at":"2017-08-28T12:41:37Z","updated_at":"2017-08-28T12:41:37Z","body":"I found the code here:\r\n[https://emby.media/community/index.php?/topic/46056-adding-a-new-encoder-interface-issues/](emby forum)\r\n`commit 53f82f538a76b862677f584713d2c3e66cf9a2e0\r\nAuthor: memeka <mihailescu2m@gmail.com>\r\nDate:   Mon Mar 20 12:46:12 2017 +1030\r\n\r\n    Add h264_v4l2m2m hw-encoder for Exynos MFC arm platforms (requires ffmpeg support)\r\n\r\ndiff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs\r\nindex 80b9cc1..156f62f 100644\r\n--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs\r\n+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs\r\n@@ -56,6 +56,10 @@ namespace MediaBrowser.Controller.MediaEncoding\r\n                 {\r\n                     return GetAvailableEncoder(\"h264_omx\", defaultEncoder);\r\n                 }\r\n+\t\tif (string.Equals(hwType, \"h264_v4l2m2m\", StringComparison.OrdinalIgnoreCase))\r\n+\t\t{\r\n+\t\t    return GetAvailableEncoder(\"h264_v4l2m2m\", defaultEncoder);\r\n+\t\t}\r\n                 if (string.Equals(hwType, \"vaapi\", StringComparison.OrdinalIgnoreCase) && !string.IsNullOrWhiteSpace(encodingOptions.VaapiDevice))\r\n                 {\r\n                     if (IsVaapiSupported(state))\r\n@@ -649,7 +653,8 @@ namespace MediaBrowser.Controller.MediaEncoding\r\n             if (!string.IsNullOrEmpty(request.Profile))\r\n             {\r\n                 if (!string.Equals(videoEncoder, \"h264_omx\", StringComparison.OrdinalIgnoreCase) &&\r\n-                    !string.Equals(videoEncoder, \"h264_vaapi\", StringComparison.OrdinalIgnoreCase))\r\n+                    !string.Equals(videoEncoder, \"h264_vaapi\", StringComparison.OrdinalIgnoreCase) &&\r\n+\t\t    !string.Equals(videoEncoder, \"h264_v4l2m2m\", StringComparison.OrdinalIgnoreCase))\r\n                 {\r\n                     // not supported by h264_omx\r\n                     param += \" -profile:v \" + request.Profile;\r\n@@ -700,7 +705,8 @@ namespace MediaBrowser.Controller.MediaEncoding\r\n                             break;\r\n                     }\r\n                 }\r\n-                else if (!string.Equals(videoEncoder, \"h264_omx\", StringComparison.OrdinalIgnoreCase))\r\n+                else if (!string.Equals(videoEncoder, \"h264_omx\", StringComparison.OrdinalIgnoreCase) &&\r\n+\t\t\t !string.Equals(videoEncoder, \"h264_v4l2m2m\", StringComparison.OrdinalIgnoreCase))\r\n                 {\r\n                     param += \" -level \" + level;\r\n                 }\r\n@@ -713,11 +719,17 @@ namespace MediaBrowser.Controller.MediaEncoding\r\n \r\n             if (!string.Equals(videoEncoder, \"h264_omx\", StringComparison.OrdinalIgnoreCase) &&\r\n                 !string.Equals(videoEncoder, \"h264_qsv\", StringComparison.OrdinalIgnoreCase) &&\r\n-                !string.Equals(videoEncoder, \"h264_vaapi\", StringComparison.OrdinalIgnoreCase))\r\n+                !string.Equals(videoEncoder, \"h264_vaapi\", StringComparison.OrdinalIgnoreCase) &&\r\n+\t\t!string.Equals(videoEncoder, \"h264_v4l2m2m\", StringComparison.OrdinalIgnoreCase))\r\n             {\r\n                 param = \"-pix_fmt yuv420p \" + param;\r\n             }\r\n \r\n+\t    if (string.Equals(videoEncoder, \"h264_v4l2m2m\", StringComparison.OrdinalIgnoreCase))\r\n+\t    {\r\n+\t\tparam = \"-pix_fmt nv21 \" + param;\r\n+\t    }\r\n+\r\n             return param;\r\n         }\r\n \r\ndiff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs\r\nindex 9c1189f..84530c5 100644\r\n--- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs\r\n+++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs\r\n@@ -142,6 +142,7 @@ namespace MediaBrowser.MediaEncoding.Encoder\r\n                 \"hevc_omx\",\r\n                 \"h264_vaapi\",\r\n                 \"hevc_vaapi\",\r\n+\t\t\"h264_v4l2m2m\",\r\n                 \"ac3\"\r\n             };\r\n \r\ndiff --git a/MediaBrowser.WebDashboard/dashboard-ui/encodingsettings.html b/MediaBrowser.WebDashboard/dashboard-ui/encodingsettings.html\r\nindex bf66c4f..abcb211 100644\r\n--- a/MediaBrowser.WebDashboard/dashboard-ui/encodingsettings.html\r\n+++ b/MediaBrowser.WebDashboard/dashboard-ui/encodingsettings.html\r\n@@ -12,6 +12,7 @@\r\n                         <option value=\"h264_omx\">OpenMAX OMX (experimental)</option>\r\n                         <option value=\"nvenc\">Nvidia NVENC (experimental)</option>\r\n                         <option value=\"vaapi\">Video Acceleration API (VA API) (experimental)</option>\r\n+\t\t\t<option value=\"h264_v4l2m2m\">Exynos V4L2 MFC Encoder (experimental)</option>\r\n                     </select>\r\n                     <div class=\"fieldDescription\">${LabelHardwareAccelerationTypeHelp}</div>\r\n                 </div>`"}}
{"actor":{"display_login":"crazyquark"}}