-
Notifications
You must be signed in to change notification settings - Fork 80
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
opusenc: add 4x opusenc options #64
base: master
Are you sure you want to change the base?
Conversation
I also have a patch to force the mode (silk, hybrid, celt, auto), but the |
I managed to do this (dirty way, just hard-coding the FORCE_MODE values), but it required changes in opus-tools and libopusenc. A clean approach will also require moving the FORCE_MODE values in the opus repo from src/opus_private.h to include/opus.h |
Thanks. I'm not sure that these options make sense for opusenc. For example FEC is for handling packet loss, which cannot happen in an Ogg container since it is stream based; packets are not sent individually. Similarly DTX allows for not transmitting some packets, which is also not possible in Ogg. Options that don't make sense for opusenc just confuse users and make the program more difficult to use. Can you explain the use case for adding these to opusenc? As for choosing the encoding mode, the --music and --speech options are much better ways to do that, because they will consider the other settings and which settings are supported by each mode. For example only CELT mode supports frame sizes smaller than 10 ms, so when smaller frames are required it will automatically use CELT mode. The internal force mode setting is used internally by code that has already considered the other settings and chosen a mode that is valid for those settings. |
Hi, mark4o, thanks for the review.
I'm running some experiments to measure the effect of Opus settings on bitrate. I saw the disparity in settings available to opusenc and opus_demo, and I tried to make them the same. As you mention, some of the settings (FEC, DTX) make no sense once you encapsulate the opus output in ogg. The encoding mode patch is probably too hairy right now. Does it make sense to add the other 2x settings to opusenc (application and bandwidth)? Also, I added signal control to opus_demo (see xiph/opus#233). |
Sorry, it's a novice question: will forced bandwidth in all packets lead to decoding in that sample rate? |
@vadimkantorov The encoder bandwidth does not affect the decoding sample rate. Using the opusdec program you can decode at any sample rate using the option --rate n. |
I guess the reasonable feature request is then to ask for an option that would take the decoding sample rate from the informational OpusHead packet in one go (and if it doesn’t exist yet, I’ll check first :) - for a function in API to very fast read only this packet). This sort of functioning is useful because the file doesn’t have any meaningful frequency content besides the raw input sample rate (and then applying the input bandwidth with the option from this PR). I’ll create a new issue for this. Thank you! |
The original sample rate in the header is already the default decoding sample rate in opusdec. |
Some way for forcing SILK/CELT is useful when evaluating opus, be it Along the same lines, some option for debug/verbose print-out with information which codec is being chosen and maybe some other details would be useful too. |
@mark4o For DTX, is not transferring silence frames possible with some other containers like WebM or MKV? #49 Is there any other container that you can recommend for saving space on skipping long silence? Do I understand you correctly that the standard |
No description provided.