Hello,



Hey sorry. I got it. I forgot to set codec_id in AVCodecContext. Thanks for the 
reply. 

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. 


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 ?


Thanks.



Regards,

Ravi Kiran B S




---- On Fri, 16 Feb 2018 20:32:36 +0530 ravikiran.bs 
<[email protected]> wrote ----








Hello, 





Thanks for reply. You mean, codec_id in 
AVFormatContext->oformat->audio_codec ?? I am setting it.  



Regards, 

Ravi Kiran B S 




---- On Fri, 16 Feb 2018 20:14:08 +0530  Carl Eugen Hoyos 
<[email protected]> wrote ---- 












_______________________________________________ 

Libav-user mailing list 

[email protected] 

http://ffmpeg.org/mailman/listinfo/libav-user 


2018-02-15 15:47 GMT+01:00 ravikiran.bs < [email protected]>: 



> I am trying to mux a opus audio stream to a webm file. (I know audio only 

> can be muxed into a ogg container. I tried that. But, FFMpeg is not 

> detecting the file format when I write the file headers using 

> avformat_write_header() of libavformat). I have configured the FFMpeg 
build 

> with --enable-libopus and --enable-libvorbis. Now, after writing the audio 

> data when I call av_write_trailer() to close the file, it is throwing the 

> following error : 

> 

> "Only VP8 or VP9 video and Vorbis or Opus audio and WebVTT subtitles are 

> supported for WebM." 



It appears you did not set codec_id to AV_CODEC_ID_OPUS. 



Carl Eugen 

_______________________________________________ 

Libav-user mailing list 

[email protected] 

http://ffmpeg.org/mailman/listinfo/libav-user 






_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to