[vlc-commits] chromecast: limit to 24fps when re-encoding
Thomas Guillem
git at videolan.org
Thu Jan 18 17:37:38 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan 18 14:39:27 2018 +0100| [05838a1cf20eb4d86d26d334c4fea8e7b34e184f] | committer: Thomas Guillem
chromecast: limit to 24fps when re-encoding
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=05838a1cf20eb4d86d26d334c4fea8e7b34e184f
---
modules/stream_out/chromecast/cast.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index b415ec9bef..24b950b4f7 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -472,6 +472,15 @@ bool sout_stream_sys_t::UpdateOutput( sout_stream_t *p_stream )
const bool b_hdres = p_vid == NULL || p_vid->i_height == 0 || p_vid->i_height >= 800;
unsigned i_video_x264_crf = b_hdres ? i_video_x264_crf_hd : i_video_x264_crf_720p;
+ if( p_vid == NULL
+ || p_vid->i_frame_rate == 0 || p_vid->i_frame_rate_base == 0
+ || ( p_vid->i_frame_rate / p_vid->i_frame_rate_base ) > 30 )
+ {
+ /* Even force 24fps if the frame rate is unknown */
+ msg_Warn( p_stream, "lowering frame rate to 24fps" );
+ ssout << "fps=24,";
+ }
+
if( i_codec_video == VLC_CODEC_H264 )
{
if ( module_exists("x264") )
More information about the vlc-commits
mailing list