Closed josiahbryan closed 4 years ago
Hi, thanks for your interest in beamcoder. Your problem is that the audioEncoder property for sample format is called 'sample_fmt', not 'format'. The codecpar property is correctly 'format'. We have chosen to follow the naming of the underlying FFmpeg properties for AVCodecContext and AVCodecParameters respectively so in this case it does end up being confusing. Thanks for providing the gist - a big help in tracking it down quickly.
That worked perfectly - so sorry to bother you, thanks so much for your help!
On Sun, Jan 26, 2020 at 1:24 PM Simon Rogers notifications@github.com wrote:
Hi, thanks for your interest in beamcoder. Your problem is that the audioEncoder property for sample format is called 'sample_fmt', not 'format'. The codecpar property is correctly 'format'. We have chosen to follow the naming of the underlying FFmpeg properties for AVCodecContext and AVCodecParameters respectively so in this case it does end up being confusing. Thanks for providing the gist - a big help in tracking it down quickly.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Streampunk/beamcoder/issues/32?email_source=notifications&email_token=ABEZELDIVMQIVBBKZ57WBVDQ7XIOTA5CNFSM4KLECZ52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ52NGY#issuecomment-578528923, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEZELF2LKWL5PAWEDHFSYDQ7XIOTANCNFSM4KLECZ5Q .
-- Josiah Bryan 765-215-0511 www.josiahbryan.com https://www.josiahbryan.com/?utm_source=sig josiahbryan@gmail.com
No matter what I try, when I try encoding an audio stream along with a video, I get this:
TL;DR: See the gist at https://gist.github.com/josiahbryan/5c149b97c8f350c7ff10a66a42ff8d2f - just run it and you (should) get those errors above.
I'm using the encoder/muxer params right from beamcoder. For example:
As soon as the code hits the
audioEncoder.encode()
, the console shows:[aac @ 0x102808e00] Specified sample format -1 is invalid or not supported
(the first time) - subsequent frames give theNo codec provided to avcodec_open2()
errors.Self-contained small example that reproduces this problem is https://gist.github.com/josiahbryan/5c149b97c8f350c7ff10a66a42ff8d2f
Any ideas on how to fix this? Please? :)