Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add passthrough options to the adaptive bitrates #246

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions src/app/app.page/app.page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -1165,19 +1165,19 @@ <h4 class="card-title text-left" i18n="@@newLiveStreamCardTitle">
<div *ngIf="encoderSettings != null && encoderSettings.length!=0">
<div class="col-xs-4 col-sm-4 text-left">
<span class="help-block"
i18n="@@ResolutionHeight">Resolution</span>
i18n="@@ResolutionHeight">Video Resolution</span>
</div>
<div class="col-xs-4 col-sm-3 text-left">
<div class="col-xs-3 col-sm-3 text-left">
<span class="help-block"
i18n="@@ResolutionHeight">Video Bitrate
(Kbps)</span>
</div>
<div class="col-xs-4 col-sm-3 text-left">
<div class="col-xs-3 col-sm-3 text-left">
<span class="help-block"
i18n="@@ResolutionHeight">Audio Bitrate
(Kbps)</span>
</div>

<br/>

<ng-container>
<div *ngFor="let encoderSetting of encoderSettings; let i = index">
Expand All @@ -1189,8 +1189,9 @@ <h4 class="card-title text-left" i18n="@@newLiveStreamCardTitle">
[(ngModel)]="encoderSetting.height"
class="dropdown-toggle form-control"
required>
<option value="0" selected disabled>
Choose One</option>

<option value="0" selected >Passthrough</option>

<option value="2880">2880p</option>
<option value="2160">2160p</option>
<option value="1080">1080p</option>
Expand All @@ -1208,7 +1209,7 @@ <h4 class="card-title text-left" i18n="@@newLiveStreamCardTitle">
</small>

</div>
<div class="col-xs-4 col-sm-3 text-left" style="margin-bottom:10px">
<div class="col-xs-3 col-sm-3 text-left" style="margin-bottom:10px" *ngIf="encoderSetting.height != 0">
<input #videobitrate="ngModel" type="number"
[min]="10" min="10"
[name]="'videobitrate'+i"
Expand All @@ -1221,8 +1222,27 @@ <h4 class="card-title text-left" i18n="@@newLiveStreamCardTitle">
Video Bitrate is required.
</small>
</div>
<div class="col-xs-3 col-sm-3 text-left" style="margin-bottom:10px" *ngIf="encoderSetting.height == 0">
<span class="help-block">Passthrough</span>
</div>

<div class="col-xs-4 col-sm-3 text-left" style="margin-bottom:10px">
<div class="col-xs-4 col-sm-4 text-left" style="margin-bottom:10px">
<select type="number" #audiobitrate="ngModel"
[name]="'audiobitrate'+i"
[(ngModel)]="encoderSetting.audioBitrate"
class="dropdown-toggle form-control"
required>

<option value="0" selected>Passthrough</option>
<option value="320">320</option>
<option value="256">256</option>
<option value="128">128</option>
<option value="96">96</option>
<option value="64">64</option>
<option value="32">32</option>
</select>

<!--
<input #audiobitrate="ngModel" type="number"
[min]="10" min="10"
[name]="'audiobitrate'+i"
Expand All @@ -1234,6 +1254,7 @@ <h4 class="card-title text-left" i18n="@@newLiveStreamCardTitle">
class="text-danger">
Audio Bitrate is required.
</small>
-->

</div>

Expand Down
22 changes: 13 additions & 9 deletions src/app/app.page/app.page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1254,41 +1254,45 @@ export class AppPageComponent implements OnInit, OnDestroy, AfterViewInit {

dropDownChanged(event: any, i: number) {

if (event == 0) {
this.encoderSettings[i].videoBitrate = 0;
this.encoderSettings[i].audioBitrate = 0;
}
if (event == 2880) {
this.encoderSettings[i].videoBitrate = 8000;
this.encoderSettings[i].audioBitrate = 320;
this.encoderSettings[i].audioBitrate = 0;
}
if (event == 2160) {
this.encoderSettings[i].videoBitrate = 6000;
this.encoderSettings[i].audioBitrate = 256;
this.encoderSettings[i].audioBitrate = 0;
}
if (event == 1080) {
this.encoderSettings[i].videoBitrate = 2500;
this.encoderSettings[i].audioBitrate = 256;
this.encoderSettings[i].audioBitrate = 0;
}
if (event == 720) {
this.encoderSettings[i].videoBitrate = 2000;
this.encoderSettings[i].audioBitrate = 128;
this.encoderSettings[i].audioBitrate = 0;
}
if (event == 640) {
this.encoderSettings[i].videoBitrate = 1800;
this.encoderSettings[i].audioBitrate = 96;
this.encoderSettings[i].audioBitrate = 0;
}
if (event == 540) {
this.encoderSettings[i].videoBitrate = 1500;
this.encoderSettings[i].audioBitrate = 96;
this.encoderSettings[i].audioBitrate = 0;
}
if (event == 480) {
this.encoderSettings[i].videoBitrate = 1000;
this.encoderSettings[i].audioBitrate = 96;
this.encoderSettings[i].audioBitrate = 0;
}
if (event == 360) {
this.encoderSettings[i].videoBitrate = 800;
this.encoderSettings[i].audioBitrate = 64;
this.encoderSettings[i].audioBitrate = 0;
}
if (event == 240) {
this.encoderSettings[i].videoBitrate = 500;
this.encoderSettings[i].audioBitrate = 32;
this.encoderSettings[i].audioBitrate = 0;
}


Expand Down