{"id":292815,"date":"2019-07-31T15:00:15","date_gmt":"2019-07-31T15:00:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=292815"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=292815","title":{"rendered":"FFmpeg \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f DXVA2"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u041f\u0440\u0438\u0432\u0435\u0442! \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/habr.com\/ru\/post\/449198\/\">\u043c\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 FFmpeg \u043d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b Visual Studio.<\/a> \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u043c\u0443 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e RTSP-\u043f\u043e\u0442\u043e\u043a\u0430 FULL HD. \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043b\u0435\u0433\u043a\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0434\u0430\u0436\u0435 Intel ATOM Z8350.<\/p>\n<p>  <b>\u0417\u0430\u0434\u0430\u0447\u0430:<\/b> \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u043e 4-\u0445 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (\u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u044f\u0434\u0440\u0430\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430) \u0441 IP-\u043a\u0430\u043c\u0435\u0440\u044b RTSP h.264. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0434\u0440\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 WinAPI. \u041a\u0430\u043a \u0438\u0442\u043e\u0433 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 RTSP-\u043f\u043e\u0442\u043e\u043a\u0430 \u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u0414\u0430\u043b\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b <b>\u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f<\/b> \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0430\u0434\u0440\u043e\u0432 <b>Real Time<\/b>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wd\/bc\/j2\/wdbcj2te4ze6ezmd1_ap8lhxtv4.png\" alt=\"image\"><\/div>\n<p>  <\/p>\n<h4>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435? \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043b\u0430\u0431\u044b\u043c \u0438 \u0434\u0435\u0448\u0435\u0432\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0440\u0435\u0430\u043b-\u0442\u0430\u0439\u043c \u0438\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u0440\u0430 \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  <b>DirectX Video Acceleration<\/b> (DXVA) \u2014 \u044d\u0442\u043e API \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0438\u0434\u0435\u043e \u0441\u0438\u043b\u0430\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 (GPU). DXVA 2.0 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430 GPU \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0437\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0438\u0434\u0435\u043e. <br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u043d\u0435 \u0431\u044b\u043b\u043e \u0437\u0430\u0434\u0430\u043d\u043e \u043d\u0435 \u043c\u0430\u043b\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432: \u00ab\u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0438\u043c\u0435\u043d\u043d\u043e FFmpeg?\u00bb \u041d\u0430\u0447\u043d\u0443 \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u043a\u0438. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0437\u0430\u043f\u0438\u0441\u0438 \u0440\u0430\u0441\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430 \u0432 \u041e\u0417\u0423. \u0414\u043b\u044f Full HD \u044d\u0442\u043e 1920 \u0445 1080 \u0445 3 = 6 220 800 \u0431\u0430\u0439\u0442. \u0414\u0430\u0436\u0435 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u043a\u0430\u0434\u0440 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 NV12 \u2013 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u043d\u0435\u043c\u0430\u043b\u043e 1920 x 1080 x 1.5 = 3 110 400 \u0431\u0430\u0439\u0442. \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c 75 \u041c\u0431\u0430\u0439\u0442 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 Intel \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b SSE 4, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0435\u0437 \u0443\u0447\u0430\u0441\u0442\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e. \u041c\u043d\u043e\u0439 \u0431\u044b\u043b\u0438 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<ol>\n<li>FFmpeg<\/li>\n<li>VLC<\/li>\n<li>OpenCV<\/li>\n<\/ol>\n<p>  <b>VLC<\/b> \u2013 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 IP-\u043a\u0430\u043c\u0435\u0440\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u043e\u0447\u0435\u043d\u044c \u043d\u0438\u0437\u043a\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430), \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u0442\u043e\u043a\u0430 RTSP \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0432 10 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430, \u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  <b>OpenCV<\/b> \u2013 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0442\u043e\u043a\u043e\u043c RTSP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 FFmpeg, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0435\u0437 \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a\u043e\u0432, \u0442.\u0435. \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 FFmpeg. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 FFmpeg, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0432 OpenCV \u0441\u043e\u0431\u0440\u0430\u043d \u0431\u0435\u0437 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <b>FFmpeg<\/b> \u2013 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u0445\u043e\u0440\u043e\u0448\u0438\u0435, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 WEB-\u043a\u0430\u043c\u0435\u0440\u0430\u043c\u0438 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 X86 (X64 \u0432\u0440\u043e\u0434\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c) \u0432 Windows.<\/p>\n<h2>\u0410\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e<\/h2>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 FFmpeg \u2014 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435, \u043a\u0430\u043a \u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0431\u043b\u043e\u043a-\u0441\u0445\u0435\u043c\u0430 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. <\/p>\n<p>  \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 FFmpeg \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e<\/p>\n<pre><code class=\"cpp\">fprintf(stderr, \" %s\", av_hwdevice_get_type_name(type));<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c FFmpeg \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0430\u043a\u043e\u0433\u043e \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 Windows10 + Intel Atom Z8350 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e DXVA2:<\/p>\n<pre><code class=\"cpp\">type = av_hwdevice_find_type_by_name(\"dxva2\");<\/code><\/pre>\n<p>  \u0412\u044b \u0436\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c CUDA, D3D11VA, QSV \u0438\u043b\u0438 VAAPI (\u0442\u043e\u043b\u044c\u043a\u043e Linux). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0435 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 FFmpeg \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u043d \u0441 \u0435\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439.<br \/>  <cut><\/cut><br \/>  \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a:<\/p>\n<pre><code class=\"cpp\">avformat_open_input(&amp;input_ctx, filename, NULL, NULL;<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a\u0435:<\/p>\n<pre><code class=\"cpp\">av_find_best_stream(input_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, &amp;decoder, 0);<\/code><\/pre>\n<p>  \u0412\u044b\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u044c:<\/p>\n<pre><code class=\"cpp\"> frame = av_frame_alloc(); \/\/ \u0437\u0434\u0435\u0441\u044c \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432\u043d\u0435 \u041e\u0417\u0423 sw_frame = av_frame_alloc(); \/\/ \u0421\u044e\u0434\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u041e\u0417\u0423<\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u041e\u0417\u0423:<\/p>\n<pre><code class=\"cpp\">av_hwframe_transfer_data(sw_frame, frame, 0);<\/code><\/pre>\n<p>  <\/p>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0435 NV12<\/h3>\n<p>  \u0418\u0442\u0430\u043a, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043a\u0430\u0434\u0440 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 sw_frame. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u0434\u0440 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 NV12. \u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0431\u044b\u043b \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d Microsoft. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0438\u043a\u0441\u0435\u043b\u0435 \u0432 12 \u0431\u0438\u0442. \u0413\u0434\u0435 8 \u0431\u0438\u0442 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u0430 4 \u0431\u0438\u0442\u0430\u043c\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0446\u0432\u0435\u0442\u043d\u043e\u0441\u0442\u044c (\u0432\u0435\u0440\u043d\u0435\u0435 \u0446\u0432\u0435\u0442\u043d\u043e\u0441\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f 4-\u0445 \u0440\u044f\u0434\u043e\u043c \u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 2\u04452). \u041f\u0440\u0438\u0447\u0435\u043c, sw_frame.data[0] \u2013 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u0430 \u0432 sw_frame.data[1] \u2013 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0446\u0432\u0435\u0442\u043d\u043e\u0441\u0442\u044c. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0438\u0437 NV-12 \u0432 RGB \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439:<br \/>  <cut><\/cut>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">C++ \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0438\u0437 NV12 \u0432 RGB<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">void SaveFrame(uint8_t * f1, uint8_t * f2, int iFrame) { \tFILE *pFile; \tchar szFilename[32]; \tint  x, i, j; \/\/\tchar buff[1920 * 1080 * 3]; \tuint8_t *buff = new uint8_t(1920*3*2); \tint u=0, v=0, y=0;  \t\t\/\/ Open file  \tsprintf(szFilename, \"frame%d.ppm\", iFrame); \tpFile = fopen(szFilename, \"wb\"); \tif (pFile == NULL) \t\treturn;  \t\/\/ \u0417\u0430\u043f\u0438\u0441\u0443\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0444\u0430\u0439\u043b\u0430 \tfprintf(pFile, \"P6\\n%d %d\\n255\\n\", 1920, 1080);  \tfor (j = 0; j &lt; 1080 \/ 2; j++) { \t\tfor (i = 0; i &lt; 1920; i +=2) { \t\t\t \t\t\t\/\/ 1 \u0442\u043e\u0447\u043a\u0430 rgb \t\t\ty = *(f1 + j * 1920 * 2 + i); \t\t\tv = *(f2 + j * 1920 + i) - 128; \t\t\tu = *(f2 + j * 1920 + i + 1) - 128;  \t\t\tx = round(y + 1.370705 * v); \t\t\tif (x &lt; 0) x = 0; \t\t\tif (x &gt; 255) x = 255; \/\/\t\t\tif (j &gt; 34) printf(\"%i, \",(j * 1920 * 2 + i) * 3); \t\t\tbuff[i * 3 + 2] = x; \t\t\tx = round(y - 0.698001 * v - 0.337633 * u); \t\t\tif (x &lt; 0) x = 0; \t\t\tif (x &gt; 255) x = 255; \t\t\tbuff[i * 3 + 1] = x; \t\t\tx = round(y + 1.732446 * u); \t\t\tif (x &lt; 0) x = 0; \t\t\tif (x &gt; 255) x = 255; \t\t\tbuff[i * 3] = x;  \t\t\t\/\/ 2 \u0442\u043e\u0447\u043a\u0430 rgb \t\t\ty = *(f1 + j * 1920 * 2 + i + 1); \t\t\tx = y + 1.370705 * v; \t\t\tif (x &lt; 0) x = 0; \t\t\tif (x &gt; 255) x = 255; \t\t\tbuff[i * 3 + 5] = x; \t\t\tx = y - 0.698001 * v - 0.337633 * u; \t\t\tif (x &lt; 0) x = 0; \t\t\tif (x &gt; 255) x = 255; \t\t\tbuff[i * 3 + 4] = x; \t\t\tx = y + 1.732446 * u; \t\t\tif (x &lt; 0) x = 0; \t\t\tif (x &gt; 255) x = 255; \t\t\tbuff[i * 3 + 3] = x; \t\t\t \t\t\t\/\/ 3 \u0442\u043e\u0447\u043a\u0430 rgb \t\t\ty = *(f1 + j * 1920 * 2 + 1920 + i); \t\t\tx = y + 1.370705 * v; \t\t\tif (x &lt; 0) x = 0; \t\t\tif (x &gt; 255) x = 255; \t\t\tbuff[(1920 + i) * 3 + 2] = x; \t\t\tx = y - 0.698001 * v - 0.337633 * u; \t\t\tif (x &lt; 0) x = 0; \t\t\tif (x &gt; 255) x = 255; \t\t\tbuff[(1920 + i) * 3 + 1] = x; \t\t\tx = y + 1.732446 * u; \t\t\tif (x &lt; 0) x = 0; \t\t\tif (x &gt; 255) x = 255; \t\t\tbuff[(1920 + i) * 3 + 0] = x; \t\t\t\/\/ 4 \u0442\u043e\u0447\u043a\u0430 rgb \t\t\ty = *(f1 + j * 1920 * 2 + 1920 + i + 1); \t\t\tx = y + 1.370705 * v; \t\t\tif (x &lt; 0) x = 0; \t\t\tif (x &gt; 255) x = 255; \t\t\tbuff[(1920 + i) * 3 + 5] = x; \t\t\tx = y - 0.698001 * v - 0.337633 * u; \t\t\tif (x &lt; 0) x = 0; \t\t\tif (x &gt; 255) x = 255; \t\t\tbuff[(1920 + i) * 3 + 4] = x; \t\t\tx = y + 1.732446 * u; \t\t\tif (x &lt; 0) x = 0; \t\t\tif (x &gt; 255) x = 255; \t\t\tbuff[(1920 + i) * 3 + 3] = x; \/\/\t\t\tprintf(\"%i, \", i); \t\t\t \t\t} \/\/ for i \t\tfwrite(buff, 1, 1920 * 3 * 2, pFile); \t\tprintf(\"\\n   %i\\n\", j); \t} \/\/ for j \/\/\tprintf(\"Save4\\n\"); \t\/\/ Write pixel data \/\/\tfwrite(buff, 1, 1920*1080*3, pFile); \t\/\/ Close file \tprintf(\"close\\n\"); \tfclose(pFile); \tprintf(\"exit\\n\"); \/\/\tdelete buff; \/\/\treturn; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0425\u043e\u0442\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 NV12 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440, \u043a\u0430\u043a \u0440\u0430\u0437\u043c\u044b\u0432\u043a\u0430, Retinex \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u043e\u0442\u0442\u0435\u043d\u043a\u0430\u0445 \u0441\u0435\u0440\u043e\u0433\u043e (\u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0432 \u0446\u0432\u0435\u0442\u043d\u043e\u0441\u0442\u044c). \u0412 \u043c\u043e\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u044f \u043d\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0436\u0443 \u0444\u043e\u0440\u043c\u0430\u0442 NV12 \u0432 RGB, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  \u0418 \u0442\u0430\u043a \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u044b \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0445 \u0432 \u043e\u043a\u043d\u043e. \u041f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c NV12 \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 RGB. <\/p>\n<h3>Dll \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>  \u041a\u0430\u0434\u0440\u044b FFmpeg \u0432\u044b\u0434\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 40 \u043c\u0441 (\u043f\u0440\u0438 25 \u043a\u0430\u0434\u0440\u0430\u0445 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443). \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u0430\u0434\u0440\u0430 Full HD \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u0434\u043b\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u0441\u0435\u0445 4-\u0445 \u044f\u0434\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u042f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e 6 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u0445 \u043d\u0435 \u0441\u043d\u0438\u043c\u0430\u044e, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043d\u0430 \u0440\u0438\u0441. 1<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zy\/pd\/27\/zypd27dsdmasmsc6g2yeyy3u8iu.png\" alt=\"image\"><br \/>  <i>\u0440\u0438\u0441.1 \u0421\u0445\u0435\u043c\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441 FFmpeg<\/i><\/p>\n<p>  \u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 \u0432 \u0432\u0438\u0434\u0435 <b>*.dll<\/b> (FFmpegD.DLL) \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u0434-\u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0447\u0442\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u043b\u044e\u0431\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u0410\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 (\u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e:) ). \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0435 \u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044c RTSP-\u043f\u043e\u0442\u043e\u043a\u0430 \u0441 IP-\u043a\u0430\u043c\u0435\u0440\u044b. <\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 DLL \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043c\u0430\u0441\u0441\u0438\u0432 int[13], HANDLE \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430, HANDLE \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u043c\u0430\u0441\u0441\u0438\u0432 char \u0430\u0434\u0440\u0435\u0441 \u043a\u0430\u043c\u0435\u0440\u044b.<\/p>\n<p>  \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0434\u0430\u043d\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 1.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ds\/g7\/mq\/dsg7mqh4ioarsp5mi9uio98k-yi.png\" alt=\"image\"><\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u0443\u043b\u0438\u0442\u044c \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0434\u0440\u043e\u0432 1-4.<\/p>\n<p>  DLL \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 FFmpeg \u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0438 \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0434\u0440\u043e\u0432. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u00ab\u041f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430\u00bb. \u041d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0435 \u043a\u0430\u0434\u0440\u044b \u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0434\u0440\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c 0 (\u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u043a\u0430\u0434\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f). <\/p>\n<p>  \u041d\u0438\u0436\u0435 \u0412\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u0437\u044f\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 ShowDib3 Charles Petzold.<\/p>\n<p>  \u2192 <a href=\"http:\/\/pbx.inf.ua\/Consol.rar\">\u0410\u0440\u0445\u0438\u0432 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c<\/a><br \/>  \u2192 <a href=\"http:\/\/pbx.inf.ua\/DLL.rar\">\u0410\u0440\u0445\u0438\u0432 FFmpegD.dll<\/a><\/p>\n<p>  <b>\u0418\u0422\u041e\u0413:<\/b> \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f FFmpeg \u0434\u0430\u0436\u0435 \u043d\u0430 Intel Atom Z8350 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 h264 Full HD \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0434\u043e 20% \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440\u043e\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f.<\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/2I1hL9g8LqY?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <i>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Intel ATOM Z8350. \u041f\u0435\u0440\u0432\u044b\u0435 30 \u0441\u0435\u043a \u0438\u0434\u0435\u0442 \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u0444\u043e\u043d\u0430. \u041f\u043e\u0441\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043c\u0435\u0442\u043e\u0434\u0443 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f \u0444\u043e\u043d\u0430.<\/i><\/p>\n<p>  <b>P.S.<\/b> \u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u044b (\u0441\u0436\u0430\u0442\u044b\u0435 h.264)!!!<\/p>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0438:<\/p>\n<ol>\n<li><a href=\"https:\/\/trac.ffmpeg.org\/wiki\">\u0420\u0430\u0437\u043d\u0430\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e FFmpeg<\/a><\/li>\n<li><a href=\"https:\/\/ffmpeg.org\/doxygen\/4.1\/index.html\">\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 FFmpeg<\/a><\/li>\n<li><a href=\"https:\/\/ru.wikipedia.org\/wiki\/YUV\">\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445 \u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u0432 RGB<\/a><\/li>\n<\/ol>\n<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/461735\/\"> https:\/\/habr.com\/ru\/post\/461735\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u041f\u0440\u0438\u0432\u0435\u0442! \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/habr.com\/ru\/post\/449198\/\">\u043c\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 FFmpeg \u043d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b Visual Studio.<\/a> \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u043c\u0443 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e RTSP-\u043f\u043e\u0442\u043e\u043a\u0430 FULL HD. \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043b\u0435\u0433\u043a\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0434\u0430\u0436\u0435 Intel ATOM Z8350.<\/p>\n<p>  <b>\u0417\u0430\u0434\u0430\u0447\u0430:<\/b> \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u043e 4-\u0445 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (\u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u044f\u0434\u0440\u0430\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430) \u0441 IP-\u043a\u0430\u043c\u0435\u0440\u044b RTSP h.264. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0434\u0440\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 WinAPI. \u041a\u0430\u043a \u0438\u0442\u043e\u0433 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 RTSP-\u043f\u043e\u0442\u043e\u043a\u0430 \u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u0414\u0430\u043b\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b <b>\u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f<\/b> \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0430\u0434\u0440\u043e\u0432 <b>Real Time<\/b>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wd\/bc\/j2\/wdbcj2te4ze6ezmd1_ap8lhxtv4.png\" alt=\"image\"><\/div>\n<p>  <\/p>\n<h4>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435? \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043b\u0430\u0431\u044b\u043c \u0438 \u0434\u0435\u0448\u0435\u0432\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0440\u0435\u0430\u043b-\u0442\u0430\u0439\u043c \u0438\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u0440\u0430 \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  <b>DirectX Video Acceleration<\/b> (DXVA) \u2014 \u044d\u0442\u043e API \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0438\u0434\u0435\u043e \u0441\u0438\u043b\u0430\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 (GPU). DXVA 2.0 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430 GPU \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0437\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0438\u0434\u0435\u043e.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-292815","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=292815"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292815\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=292815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=292815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=292815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}