From 3312848ada5e29d2ff3277fa56ae74fea93366f5 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 11 Oct 2016 11:21:07 +0200 Subject: [PATCH] Fixed DASH bit rate reporting --- src/output/output_dash_mp4.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/output/output_dash_mp4.cpp b/src/output/output_dash_mp4.cpp index b9ef67b7..5784edff 100644 --- a/src/output/output_dash_mp4.cpp +++ b/src/output/output_dash_mp4.cpp @@ -426,14 +426,16 @@ namespace Mist { r << " first << "\" "; r << "codecs=\"avc1." << h264init(it->second.init) << "\" "; - r << "bandwidth=\"" << it->second.bps << "\" "; + //bandwidth is in bits per seconds, we have bytes, so times 8 + r << "bandwidth=\"" << (it->second.bps*8) << "\" "; r << "/>" << std::endl; } if (it->second.codec == "HEVC"){ r << " first << "\" "; r << "codecs=\"hev1." << h265init(it->second.init) << "\" "; - r << "bandwidth=\"" << it->second.bps << "\" "; + //bandwidth is in bits per seconds, we have bytes, so times 8 + r << "bandwidth=\"" << (it->second.bps*8) << "\" "; r << "/>" << std::endl; } } @@ -470,7 +472,8 @@ namespace Mist { r << "codecs=\"ec-3\" "; } r << "audioSamplingRate=\"" << it->second.rate << "\" "; - r << "bandwidth=\"" << it->second.bps << "\">" << std::endl; + //bandwidth is in bits per seconds, we have bytes, so times 8 + r << "bandwidth=\"" << (it->second.bps*8) << "\">" << std::endl; r << " second.channels << "\" />" << std::endl; r << " " << std::endl; }