-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error -1 writing PCM output #4
Comments
The libav/ffmpeg decoder/parser can handle all but the http://samples.libav.org/A-codecs/DTS/dts/Master%20Audio%205.1%2024bit.dts sample file without error. |
Note that a bunch of those files are just cut rather badly, so the last audio frame erroring out is pretty "normal". |
This is expected. As @Nevcairiel mentioned, these files are cut badly at the end, leaving just one core frame without EXSS part. The number of decoded channels (or bitdepth, or sample rate) changes in the decoder, the WAV file writer notices that and returns -1 (invalid argument) error because it can't handle change of audio parameters once the WAV header is written. Of course a proper output sink would reconfigure itself and try to continue in this case, something the current primitive WAV writer doesn't do. I don't know how exactly FFmpeg handles this, maybe it doesn't decode enough of extensions so that its decoder output configuration never changes, or maybe it handles change of parameters gracefully somehow. |
Add a function to convert libdcadec error code to string and use it in dcadec application. Add an error code describing change of PCM output parameters that WAV file writer doesn't handle. Might help with #4.
Actually, dcadec decodes this one without any error in my case. |
http://samples.libav.org/A-codecs/DTS/dts/Master%20Audio%205.1%2024bit.dts
http://samples.libav.org/A-codecs/DTS/dts/Master%20Audio%202.0%2016bit.dts
./dcadec Master\ Audio\ 7.1.dts out.wav
DTS Core Audio: 5.1 ch, 48000 Hz, 24 bit, ES, 1536 kbps
DTS-HD Master Audio: 8 ch, 48000 Hz, 24 bit
Decoding...
Error -1 writing PCM output
http://samples.libav.org/A-codecs/DTS/dts/Master%20Audio%205.0%2096khz.dts
Same error but it decodes to ca 90% before failing.
The text was updated successfully, but these errors were encountered: