[vlc-devel] [RFC PATCH 2/2] chromecast: use vt encoder from avcodec
Thomas Guillem
thomas at gllm.fr
Tue Mar 27 16:53:26 CEST 2018
WIP: chromecast devices don't seem to like video encoded by videotoolbox:
decoding is very slow but the bitrate/fps/res are more than correct for
streaming. Still investigating on it.
---
modules/stream_out/chromecast/cast.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 92d286c7d7..1d93e5f795 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -969,12 +969,23 @@ static std::string GetVencX264Option( sout_stream_t * /* p_stream */,
return ssout.str();
}
+#ifdef __APPLE__
+static std::string GetVencAvcodecVTOption( sout_stream_t * /* p_stream */,
+ const video_format_t * /* p_vid */,
+ int /* i_quality */ )
+{
+ return "venc=avcodec{codec=h264_videotoolbox,codec-strict,options{realtime=1,coder=cabac,profile=high}}";
+}
+#endif
static struct
{
vlc_fourcc_t fcc;
std::string (*get_opt)( sout_stream_t *, const video_format_t *, int);
} venc_opt_list[] = {
+#ifdef __APPLE__
+ { .fcc = VLC_CODEC_H264, .get_opt = GetVencAvcodecVTOption },
+#endif
{ .fcc = VLC_CODEC_H264, .get_opt = GetVencX264Option },
{ .fcc = VLC_CODEC_VP8, .get_opt = GetVencVPXOption },
{ .fcc = VLC_CODEC_H264, .get_opt = NULL },
--
2.11.0
More information about the vlc-devel
mailing list