how to make webrtc support H265 codec?

3,718 views
Skip to first unread message

yangvi...@gmail.com

unread,
Feb 24, 2018, 2:34:55 AM2/24/18
to discuss-webrtc
I want to create an android application using webrtc library. The application is a client which will send media stream to the other side.
Is webrtc supporting h.265 codec now?  if no, how to make webrtc support h.265 codec?  
BTW, the hardware can support h.265 codec.
I am investigating on the issue for some days, could any one give some advice to me?  Thanks a lot.

Alexandre GOUAILLARD

unread,
Feb 24, 2018, 6:01:54 AM2/24/18
to discuss...@googlegroups.com
On Sat, Feb 24, 2018 at 8:51 AM, <yangvi...@gmail.com> wrote:
I want to create an android application using webrtc library. The application is a client which will send media stream to the other side.
Is webrtc supporting h.265 codec now?  if no, how to make webrtc support h.265 codec?  

webrtc, as a technology, can support any codec the implementors want to add. Interoperability between implementation is only possible if both implementations use the same codec, hence the choice for two mandatory to implement codecs (H.264 and VP8) which ensure basic interoperability in the absence of any other common codecs.

Most open source webrtc implementations do not support H.265, weven though originally, openWebRTC was.
 
BTW, the hardware can support h.265 codec.

Hardware might, then you would need the driver to support it as well, then the OS frameworks, and your webrtc implementation to support it, before you can use it in your app.

I am investigating on the issue for some days, could any one give some advice to me?  Thanks a lot.

You can try to add your own H.265 support through an existing library (FFMPEG? x265?) into libwebrtc (webrtc.org). It's though. 

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/6937deb1-9adf-49df-998a-ce1fca0df2ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alex. Gouaillard, PhD, PhD, MBA
------------------------------------------------------------------------------------
President - CoSMo Software Consulting, Singapore
------------------------------------------------------------------------------------

Message has been deleted

yangvi...@gmail.com

unread,
Mar 6, 2018, 9:59:50 AM3/6/18
to discuss-webrtc
Thanks a lot.

Now I am trying to add X265 library into webrtc. 
First, I build X265 source code and get X265(executable file), libx265.a, libx265.146.so(shared library) as results.
Second, I add some configuration in video_coding/BUILD.gn to add x265 library, as follow:

rtc_static_library("webrtc_h265"){
sources = [
"codecs/h265/h265.cc",
"codecs/h265/include/h265.h",
]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}

defines = []
deps = [
":video_coding_utility",
"../../rtc_base:rtc_base_approved",
"../../media:rtc_media_base",
"../../system_wrappers",
]

if (rtc_use_h265) {
defines += [ "WEBRTC_USE_H265" ]
if (rtc_initialize_ffmpeg) {
defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
}
sources += [
"codecs/h265/h265_encoder_impl.cc",
"codecs/h265/h265_encoder_impl.h",
]
deps += [
"../../common_video",
"../../media:rtc_media_base",
"//third_party/ffmpeg:ffmpeg",
]
libs = ["/home/yangyang/webrtc-build-scripts-master/android/webrtc/src/libx265.146.so"]
ldflags = ["-L /home/yangyang/webrtc-build-scripts-master/android/webrtc/src"]
}
}

there is a build error like this:
ninja: error: '../../libx265.146.so', needed by 'obj/webrtc/sdk/android/libjingle_peerconnection_jni.a', missing and no known rule to make it.

Question is how to add library into webrtc, how to modify BUILD.gn file?

It is hard to add X265 source code into webrtc, because there are many predefine values and rules to make x265 library, so in my opinion, It is better to add x265 library directly.



在 2018年2月24日星期六 UTC+8下午7:01:54,Alexandre GOUAILLARD写道:


On Sat, Feb 24, 2018 at 8:51 AM, <yangvi...@gmail.com> wrote:
I want to create an android application using webrtc library. The application is a client which will send media stream to the other side.
Is webrtc supporting h.265 codec now?  if no, how to make webrtc support h.265 codec?  

webrtc, as a technology, can support any codec the implementors want to add. Interoperability between implementation is only possible if both implementations use the same codec, hence the choice for two mandatory to implement codecs (H.264 and VP8) which ensure basic interoperability in the absence of any other common codecs.

Most open source webrtc implementations do not support H.265, weven though originally, openWebRTC was.
 
BTW, the hardware can support h.265 codec.

Hardware might, then you would need the driver to support it as well, then the OS frameworks, and your webrtc implementation to support it, before you can use it in your app.

I am investigating on the issue for some days, could any one give some advice to me?  Thanks a lot.

You can try to add your own H.265 support through an existing library (FFMPEG? x265?) into libwebrtc (webrtc.org). It's though. 

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.

free lee

unread,
Oct 16, 2018, 3:45:00 AM10/16/18
to discuss-webrtc
Does it work?
Reply all
Reply to author
Forward
0 new messages