<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body 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<br>
    <br>
    <div class="moz-cite-prefix">13.07.2015, 13:28, Austin Einter
      kirjoitti:<br>
    </div>
    <blockquote
cite="mid:CANXt1k9XErQGxRSm9=2ccdtKKQ0iehwHpq2DOgVGuEgSbXmc=A@mail.gmail.com"
      type="cite">
      <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 class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Libav-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a>
<a class="moz-txt-link-freetext" href="http://ffmpeg.org/mailman/listinfo/libav-user">http://ffmpeg.org/mailman/listinfo/libav-user</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>