<div dir="ltr"><div><div><br>Hi Tukka<br>Yes, I am not encoding on the fly.<br><br></div>Why I am using FFMpeg is - <br></div><br>1.  On remote side, there may be a simulator developed by me or there may be a IP phone developed by any standard company.<br><div class="gmail_extra"><br></div><div class="gmail_extra">2. If in remote side, it is my simulator, then no issue, I can just send data over socket , receive and store<br><br></div><div class="gmail_extra">3. If in remote side, it is a standard IP phone (that supports opus), then the standard phone should be able to receive the data and should be able to play it.   <br></div><div class="gmail_extra"><br></div><div class="gmail_extra">If I simplify the requirement on paper it looks using FFMpeg I should be able to manage it.<br></div><div class="gmail_extra">But finding it difficult to accomplish as I have very little knowledge on FFmpeg.<br></div><div class="gmail_extra"><br><br></div><div class="gmail_extra">Anyhow I have started to put test code, will come up with specific problems.<br></div><div class="gmail_extra"><br><br></div><div class="gmail_extra">Best Regards<br></div><div class="gmail_extra">Austin<br><br></div><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 13, 2015 at 4:53 PM, Tuukka Pasanen <span dir="ltr"><<a href="mailto:pasanen.tuukka@gmail.com" target="_blank">pasanen.tuukka@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    Just wondering why are using FFmpeg for this kind of stuff? Why not
    just send it to socket as reader ask? If I understand correctly you
    are not encoding on fly this WEBM.<br>
    <br>
    Tuukka<div><div class="h5"><br>
    <br>
    <div>13.07.2015, 13:28, Austin Einter
      kirjoitti:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">I am trying to use ffmpeg libav, and have been
        doing a lot of experiment last 1 month. 
        I have not been able to get through. Is it really difficult to
        use FFmpeg?<br>
        <br>
        My requirement is simple as below.<br>
        Can you please guide me if ffmpeg is suitable one or I have
        implement<br>
        on my own (using codec libs available).<br>
        <br>
        1. I have a webm file (having VP8 and OPUS frames)<br>
        2. I will read the encoded data and send it to remote guy<br>
        3. The remote guy will read the encoded data from socket<br>
        4. The remote guy will write it to a file (can we avoid
        decoding).<br>
        5. Then remote guy should be able to pay the file using ffplay
        or any player.<br>
        <br>
        <br>
        <br>
        Now I will take a specific example.<br>
        1. Say I have a file small.webm, containing VP8  and OPUS
        frames.<br>
        <br>
        2. I am reading only audio frames (OPUS) using av_read_frame api
        (Then<br>
        checks stream index and filters audio frames only)<br>
        <br>
        3. So now I have data buffer (encoded) as packet.data and
        encoded data<br>
        buffer size as packet.size (Please correct me if wrong)<br>
        <br>
        4. Here is my first doubt, everytime audio packet size is not
        same,<br>
        why the difference. Sometimes packet size is as low as 54 bytes
        and<br>
        sometimes it is 420 bytes. For OPUS will frame size vary from
        time to<br>
        time?<br>
        <br>
        5. Next say somehow extract a single frame (really do not know
        how to<br>
        extract a single frame) from packet and send it to remote guy.<br>
        <br>
        6. Now remote guy need to write the buffer to a file. To write
        the<br>
        file we can use av_interleaved_write_frame or av_write_frame
        api. Both<br>
        of them takes AVPacket as argument. Now I can have a AVPacket,
        set its<br>
        data and size member. Then I can call av_write_frame api. But
        that<br>
        does not work. Reason may be one should set other members in
        packet<br>
        like ts, dts, pts etc. But I do not have such informations to
        set.<br>
        <br>
        <br>
        Can somebody help me to learn if FFmpeg is the right choice, or
        should<br>
        I write a custom logic like parse a opus file and get frame by
        frame.</div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
Libav-user mailing list
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br></div></div>