<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div><br></div><div><br></div><div><div>Hello,<br></div><div><br></div><div>Hey sorry. I got it. I forgot to set codec_id in AVCodecContext. Thanks for the reply. <br><br>I had one more doubt, the output file after this change, plays in vlc but can't hear any sound. When I checked the meta info on the file, the bits per sample (bit depth) is 32. Is that correct for libopus ? If not where can I set the bit depth in FFMpeg so that it considers correct no of bits per sample ? I guess the problem is in that. </div><div><br></div><div>And, one more thing is AVCodecContext.time_base I am setting it as { 1, 48000} . Actually, it is not mentioned in example docs to set time base for audio codec. But I read somewhere we have to set it, thats why I am setting it. Is it correct ?</div><div><br></div><div>Thanks.<br></div><div><br></div><div>Regards,<br></div><div>Ravi Kiran B S<br></div></div><div class="zmail_extra"><div><div><br></div><div>---- On Fri, 16 Feb 2018 20:32:36 +0530 <b>ravikiran.bs <ravikiran.bs@zohocorp.com></b> wrote ----<br></div></div><div><br></div><blockquote style="border-left: 1px solid #cccccc; padding-left: 6px; margin:0 0 0 5px"><div><div style="font-size: 10pt; font-family: Verdana, Arial, Helvetica, sans-serif"><div><br></div><div><br></div><div><div>Hello, <br></div><div><br></div><div><br></div><div>Thanks for reply. You mean, codec_id in AVFormatContext->oformat->audio_codec ?? I am setting it.  <br></div><div><br></div><div>Regards, <br></div><div>Ravi Kiran B S <br></div></div><div class="zmail_extra"><div><div><br></div><div>---- On Fri, 16 Feb 2018 20:14:08 +0530  <b>Carl Eugen Hoyos <<a href="mailto:ceffmpeg@gmail.com">ceffmpeg@gmail.com</a>></b> wrote ---- <br></div></div><div><br></div><div><br></div></div><div><br></div></div><div><br></div><div>_______________________________________________ <br></div><div>Libav-user mailing list <br></div><div><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a> <br></div><div><a href="http://ffmpeg.org/mailman/listinfo/libav-user">http://ffmpeg.org/mailman/listinfo/libav-user</a> <br></div></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); padding-left: 6px; margin: 0 0 0 5px"><div><div>2018-02-15 15:47 GMT+01:00 ravikiran.bs < <a href="mailto:ravikiran.bs@zohocorp.com">ravikiran.bs@zohocorp.com</a>>: <br></div><div><br></div><div>> I am trying to mux a opus audio stream to a webm file. (I know audio only <br></div><div>> can be muxed into a ogg container. I tried that. But, FFMpeg is not <br></div><div>> detecting the file format when I write the file headers using <br></div><div>> avformat_write_header() of libavformat). I have configured the FFMpeg build <br></div><div>> with --enable-libopus and --enable-libvorbis. Now, after writing the audio <br></div><div>> data when I call av_write_trailer() to close the file, it is throwing the <br></div><div>> following error : <br></div><div>> <br></div><div>> "Only VP8 or VP9 video and Vorbis or Opus audio and WebVTT subtitles are <br></div><div>> supported for WebM." <br></div><div><br></div><div>It appears you did not set codec_id to AV_CODEC_ID_OPUS. <br></div><div><br></div><div>Carl Eugen <br></div><div>_______________________________________________ <br></div><div>Libav-user mailing list <br></div><div><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a> <br></div><div><a href="http://ffmpeg.org/mailman/listinfo/libav-user">http://ffmpeg.org/mailman/listinfo/libav-user</a> <br></div></div></blockquote></blockquote></div><div><br></div></div><br></body></html>