-
Notifications
You must be signed in to change notification settings - Fork 50
VideoProperties: fix decoding of first frames #246
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
Closed
cchampet
wants to merge
27
commits into
avTranscoder:develop
from
cchampet:fix_videoPropertiersDecodingFirstFrames
Closed
VideoProperties: fix decoding of first frames #246
cchampet
wants to merge
27
commits into
avTranscoder:develop
from
cchampet:fix_videoPropertiersDecodingFirstFrames
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Use Frame class instead (allocation/free is managed by the class).
Use VideoProperties::getProfile() method.
Use Frame::getEncodedSize() method.
* Use VideoProperties::getGopSize() instead. * Add doc to this method.
* To get the level of analysis asked inside member methods. * Will be used in the next commit.
* AVCodecContext->gop_size is unused when decode according to the ffmpeg documentation: https://ffmpeg.org/doxygen/2.8/structAVCodecContext.html#a9b6b3f1fcbdcc2ad9f4dbb4370496e38 * So compute this info when analyseGopStructure, and store it inside the VideoProperties class. * Because the gop size could be used inside getBitRate() method, throw a runtime exception before using it.
* Before: picture type, is key frame * After: picture type, encoded frame size in bytes * Note: "is key frame" info can be found using the picture type (I frame).
Throw a runtime_error if the duration is unknown.
…rties * These instructions make analysis impossible for some AVC Intra media. * WARNING: need to check if this commit induces some side effects.
The C++ structure was updated in commit: 81bc92e
@@ -48,7 +48,7 @@ std::string VideoProperties::getProfileName() const | |||
throw std::runtime_error("unknown codec profile"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use getProfile() as well just up here !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better here: 4df7cc4
This check is already done by av_get_profile_name method.
To improve readability.
All properties have the same value if not found.
…t gop All properties have the same value if not found.
Like other getter to properties.
Avoid RuntimeError: basic_string::_S_construct null not valid.
Need to analyse first GOP to compute bitrate and get gop size of output.
valnoel
added a commit
to valnoel/avTranscoder
that referenced
this pull request
Jul 22, 2016
…SwAvResample_2 CMake: fix double dependencies of av/sw resample
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.