<div dir="auto"><div>Hi Garramuno, </div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Thank you very much for reply.</div><div dir="auto"><br></div><div dir="auto">Point comes as int_64 in videostream timebase (always non zero for non zero frameno).</div><div dir="auto"><br></div><div dir="auto">I used Avseek_flag_backwards but it will not seek non keyframes rather seek to backwards perfect keyframe.</div><div dir="auto"><br></div><div dir="auto">With frame->pts and point value I can skip some frames till I go to Point non keyframe.</div><div dir="auto">But incase of any wmv video frame->pts is always 0.</div><div dir="auto">(Frame - frame received after decoding)</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Tue 31 Jul, 2018, 10:28 PM Gonzalo Garramuño, <<a href="mailto:ggarra13@gmail.com">ggarra13@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <br>
    <div class="m_-4883225506683964266moz-cite-prefix">El 31/07/18 a las 04:16, ganesh mundhe
      escribió:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="auto">
        <div class="gmail_quote" dir="auto">
          <div dir="ltr"><br>
          </div>
          <div dir="auto">
            <div class="gmail_quote" dir="auto">
              <div dir="ltr">Hello all,<br>
              </div>
              <div link="#0563C1" vlink="#954F72" lang="EN-US">
                <div class="m_-4883225506683964266m_4754091582746901948m_-556863280348909507WordSection1">
                  <p class="MsoNormal">I have been trying to decode
                    videos where I need to offset start position.</p>
                  <p class="MsoNormal">I have tried to use AV_seek_frame
                    but it works on raw video format (.y4m) but fails on
                    mpeg2 compressed formats.
                  </p>
                  <p class="MsoNormal">Generally videos are in mp4 or
                    wmv and I need to write for those directly instead
                    of converting them into .y4m</p>
                  <p class="MsoNormal">Here how I’m using it </p>
                  <p class="MsoNormal"> </p>
                  <table class="m_-4883225506683964266m_4754091582746901948m_-556863280348909507MsoNormalTable" style="margin-left:2.75pt;border-collapse:collapse" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                      <tr style="height:136.5pt">
                        <td style="width:613.75pt;border:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt;height:136.5pt" valign="top" width="703">
                          <p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:blue">int</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> frmaeno = 100;</span></p>
                          <p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af">int64_t</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> point = (</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af">int64_t</span><span style="font-size:9.5pt;font-family:Consolas;color:black">(frameno) *
                              pavStream->r_frame_rate.den * 
                              pavStream->time_base.den) / (</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af">int64_t</span><span style="font-size:9.5pt;font-family:Consolas;color:black">(pavStream->r_frame_rate.num)
                              *pavStream->time_base.num);</span></p>
                          <p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black"> </span></p>
                          <p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">av_seek_frame(fmt_ctx,
                              VideoStreamIndex, point, 0);</span></p>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                  <br>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Here point is always 0 as you are dividing integers.   Also, as a
    flag, you may want to use AVSEEK_FLAG_BACKWARD.<br>
    <br>
    <pre class="m_-4883225506683964266moz-signature" cols="72">-- 
Gonzalo Garramuño</pre>
  </div>

</blockquote></div></div></div>