Update for Ubuntu 16.04 and FFmpeg 2.8.8#31
Closed
artifactz wants to merge 3 commits intoRobotWebTools:developfrom
artifactz:ffmpeg2.8.8-develop
Closed
Update for Ubuntu 16.04 and FFmpeg 2.8.8#31artifactz wants to merge 3 commits intoRobotWebTools:developfrom artifactz:ffmpeg2.8.8-develop
artifactz wants to merge 3 commits intoRobotWebTools:developfrom
artifactz:ffmpeg2.8.8-develop
Conversation
…64 and VP9 streamer, moved codec options into codec classes, added container format options, bugfixes
Contributor
Author
|
Oh wow, this fails badly. Are you sure to build for Ubuntu 12.04? |
Closed
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
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.
Running web_video_server in Ubuntu 16.04 did not work out of the box.
The main difference is that in 16.04 FFmpeg 2.8.8 replaces libav in the official packet repository.
While the main effort of these edits is to simply get it back to work, I fixed and updated a whole bunch of things throughout the code, mainly focusing on FFmpeg deprecation warnings.
I also added H.264 streaming and an experimental VP9 streamer. (VP9 encoding is quite new and libvpx-vp9 still has performance issues.)
I moved codec settings like quality values into the respective codec class (mainly vp8_streamer.cpp), because different codecs work differently and have different options, which behave differently and thus should not be generalized or mixed up. (E.g. newer, better codecs should default to a smaller bitrate.)
Maybe it is even going to favor further additions of codecs because of the smaller interface.
I also try to change as few codec values from default as possible, to maintain functionality across multiple FFmpeg/codec/OS versions. Also, it seems a good idea to trust codec developers in terms of presets/defaults.
The two most critical changes are:
I added a proper IO callback function instead of libav's
dyn_bufferto get webm working again. (See: http://stackoverflow.com/questions/40284055/c-ffmpeg-starting-new-cluster-error/)I changed
codec_context_->codec_id = output_format_->video_codec;to
codec_context_->codec_id = codec_->id;because you do not always use the default codec suggested by the output format.
(E.g. default for webm is now vp9 and you probably want to use vp8 instead, which would raise a codec id mismatch error.)