hls changes

This commit is contained in:
Luke Pulverenti 2013-09-01 09:13:11 -04:00
parent 0bb8f8e4b8
commit b828af0a0a
6 changed files with 13 additions and 18 deletions

View File

@ -141,7 +141,7 @@ namespace MediaBrowser.Api.Playback.Hls
builder.AppendLine("#EXTM3U");
// Main stream
builder.AppendLine("#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=" + bitrate.ToString(UsCulture));
builder.AppendLine("#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=" + bitrate.ToString(UsCulture));
var playlistUrl = "hls/" + Path.GetFileName(firstPlaylist).Replace(".m3u8", "/stream.m3u8");
builder.AppendLine(playlistUrl);

View File

@ -180,7 +180,7 @@ namespace MediaBrowser.Api.Playback.Hls
return IsH264(state.VideoStream) ? "-codec:v:0 copy -bsf h264_mp4toannexb" : "-codec:v:0 copy";
}
const string keyFrameArg = " -force_key_frames expr:if(isnan(prev_forced_t),gte(t,0),gte(t,prev_forced_t+5))";
const string keyFrameArg = " -force_key_frames expr:if(isnan(prev_forced_t),gte(t,1),gte(t,prev_forced_t+5))";
var args = "-codec:v:0 " + codec + " -preset superfast" + keyFrameArg;

View File

@ -1,5 +1,4 @@
using MediaBrowser.Common.IO;
using MediaBrowser.Common.MediaInfo;
using MediaBrowser.Common.MediaInfo;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Persistence;

View File

@ -1,8 +1,4 @@
using System.Net;
using System.Net.Cache;
using System.Net.Http;
using MediaBrowser.Api.Images;
using MediaBrowser.Common.IO;
using MediaBrowser.Api.Images;
using MediaBrowser.Common.MediaInfo;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller;
@ -12,11 +8,12 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using MediaBrowser.Model.IO;
namespace MediaBrowser.Api.Playback.Progressive
{

View File

@ -1,5 +1,4 @@
using MediaBrowser.Common.IO;
using MediaBrowser.Common.MediaInfo;
using MediaBrowser.Common.MediaInfo;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
@ -145,7 +144,7 @@ namespace MediaBrowser.Api.Playback.Progressive
return state.VideoStream != null && IsH264(state.VideoStream) ? args + " -bsf h264_mp4toannexb" : args;
}
const string keyFrameArg = " -force_key_frames expr:if(isnan(prev_forced_t),gte(t,0),gte(t,prev_forced_t+2))";
const string keyFrameArg = " -force_key_frames expr:if(isnan(prev_forced_t),gte(t,1),gte(t,prev_forced_t+5))";
args += keyFrameArg;
@ -218,11 +217,6 @@ namespace MediaBrowser.Api.Playback.Progressive
var args = "-acodec " + codec;
if (string.Equals(codec, "aac", StringComparison.OrdinalIgnoreCase))
{
args += " -strict experimental";
}
// Add the number of audio channels
var channels = GetNumAudioChannelsParam(request, state.AudioStream);

View File

@ -92,4 +92,9 @@ namespace MediaBrowser.Controller.Entities.Audio
return RecursiveChildren.OfType<Audio>().Any(i => i.HasArtist(artist));
}
}
public class MusicAlbumDisc : Folder
{
}
}