<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div class=""><font class="Apple-style-span" face="Arial"><span class="Apple-style-span"><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;"><div style="margin: 0px;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">Hello Libav-Users,</span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">I have been developing a libav based video playback library for use at a computer vision company. We’re developing with ffmpeg 3.2.2 based libav dlls, downloaded pre-built from the </span><a href="http://zerano.com" style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">Zerano.com</a><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""> website. The goal is a library for playback of any media ffplay can play. We primarily work on Windows, but we deploy in both Windows and Linux. For research of libav usage, ffplay is step-wise traced in GDB quite a bit to figure out how things are handled. </span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">I believe there may be a bug in the conversion from YUV to RGBA for some cases of WMV and AVI format videos. </span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">I suspect this issue has been able to persist because the ffmpeg sources use SDL for video display; that code uses SDL's YUV frame buffer, effectively hiding this RGBA conversion issue. </span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">First a test video: </span><a href="https://www.dropbox.com/s/x1etodcsg55o0gc/M001.avi?dl=0" style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">https://www.dropbox.com/s/x1etodcsg55o0gc/M001.avi?dl=0</a><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">The above link is to an AVI video that crashes ffplay on Windows, but plays fine with ffplay on ubuntu. The above linked video plays fine in our libav based video playback library on Windows, traveling down the “incorrect pixel format conversion” catching logic. I have other WMV format videos that display fine in ffplay, but when requesting an RGBA pixel format in our code requires the format conversion correction described below to display correctly. </span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">Here is a link to a C++ source file containing:</span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">1) a C++ class implementing a bare bones AVFilterGraph</span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">2) the logic that uses the C++ class wrapping around the AVFilterGraph, which also catches and corrects for bad format conversions.</span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span class="Apple-tab-span" style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; white-space: pre; widows: auto;"> </span><a href="https://www.dropbox.com/s/yrzgtdxk3bo6s9m/CE_Libav_framefiltering.h?dl=0" style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">https://www.dropbox.com/s/yrzgtdxk3bo6s9m/CE_Libav_framefiltering.h?dl=0</a><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">The incorrect format conversion is generating image rows that are 2 pixels (8 bytes) too long. </span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">Unfortunately, I am unable to post more code. In the source code I describe how the AVFilterGraph is used, and how the AVFrame used comes from avcodec_receive_frame().</span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">If this is not a bug, but known and expected behavior, is my work-around the preferred work-around? </span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">While trying to track down if anyone else has posted about this issue, I located a discontinued project in Spanish with comments describing issues with YUV to RGBA conversion. They tried fixing their conversion issue with use of the “yadif” video filter... but the project appears discontinued, so I don’t know what happened there… </span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">Any information related to this issue is welcome. Please let me know if you’ve encountered this issue and what did you do? My existing work around “works”, but should be unnecessary…</span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">-Blake Senftner </span><br style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class=""><span style="font-family: CourierNewPSMT; font-size: 14px; orphans: auto; widows: auto;" class="">Sr. Software Developer</span></div></span></font></span></font></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></body></html>