Skip to content

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#31
artifactz wants to merge 3 commits intoRobotWebTools:developfrom
artifactz:ffmpeg2.8.8-develop

Conversation

@artifactz
Copy link
Copy Markdown
Contributor

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_buffer to 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.)

…64 and VP9 streamer, moved codec options into codec classes, added container format options, bugfixes
@artifactz
Copy link
Copy Markdown
Contributor Author

Oh wow, this fails badly. Are you sure to build for Ubuntu 12.04?
Well, maybe you can use my work somehow. I am unsure of whether I will be able to provide FFmpeg 1.0 support throughout the code and having it working on Ubuntu 16.04 at the same time...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant