aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-09-17 21:26:23 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-09-17 21:26:23 -0400
commit3509a401c8e3d91854b4fda4e4d7700b0aacefa5 (patch)
tree7277688345a6795411e62e2c40c4e2a49d9be6d0
parent6130cb2403662596bba0474494372446d9caa3c3 (diff)
add subtitle profiles to dlna profile editor
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs6
-rw-r--r--MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json62
-rw-r--r--MediaBrowser.Server.Implementations/Localization/Server/server.json16
-rw-r--r--MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs41
-rw-r--r--MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs18
-rw-r--r--MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj6
6 files changed, 114 insertions, 35 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index f1b84875d..98b4132f1 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -925,11 +925,6 @@ namespace MediaBrowser.Api.Playback
/// <exception cref="System.InvalidOperationException">ffmpeg was not found at + MediaEncoder.EncoderPath</exception>
protected async Task<TranscodingJob> StartFfMpeg(StreamState state, string outputPath, CancellationTokenSource cancellationTokenSource)
{
- if (!File.Exists(MediaEncoder.EncoderPath))
- {
- throw new InvalidOperationException("ffmpeg was not found at " + MediaEncoder.EncoderPath);
- }
-
Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
await AcquireResources(state, cancellationTokenSource).ConfigureAwait(false);
@@ -955,7 +950,6 @@ namespace MediaBrowser.Api.Playback
RedirectStandardInput = true,
FileName = MediaEncoder.EncoderPath,
- WorkingDirectory = Path.GetDirectoryName(MediaEncoder.EncoderPath),
Arguments = commandLineArgs,
WindowStyle = ProcessWindowStyle.Hidden,
diff --git a/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json b/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json
index 3961ddd4f..0f7ef7ec9 100644
--- a/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json
+++ b/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json
@@ -508,5 +508,65 @@
"ValueStudios": "Studios: {0}",
"ValueSpecialEpisodeName": "Special - {0}",
"LabelLimit": "Limit:",
- "ValueLinks": "Links: {0}"
+ "ValueLinks": "Links: {0}",
+ "HeaderPeople": "People",
+ "HeaderCastAndCrew": "Cast & Crew",
+ "ValueArtist": "Artist: {0}",
+ "ValueArtists": "Artists: {0}",
+ "HeaderTags": "Tags",
+ "MediaInfoCameraMake": "Camera make",
+ "MediaInfoCameraModel": "Camera model",
+ "MediaInfoAltitude": "Altitude",
+ "MediaInfoAperture": "Aperture",
+ "MediaInfoExposureTime": "Exposure time",
+ "MediaInfoFocalLength": "Focal length",
+ "MediaInfoOrientation": "Orientation",
+ "MediaInfoIsoSpeedRating": "Iso speed rating",
+ "MediaInfoLatitude": "Latitude",
+ "MediaInfoLongitude": "Longitude",
+ "MediaInfoShutterSpeed": "Shutter speed",
+ "MediaInfoSoftware": "Software",
+ "HeaderIfYouLikeCheckTheseOut": "If you like {0}, check these out...",
+ "HeaderPlotKeywords": "Plot Keywords",
+ "HeaderMovies": "Movies",
+ "HeaderSeries": "Series",
+ "HeaderAlbums": "Albums",
+ "HeaderGames": "Games",
+ "HeaderBooks": "Books",
+ "HeaderEpisodes": "Episodes",
+ "HeaderSeasons": "Seasons",
+ "HeaderTracks": "Tracks",
+ "HeaderItems": "Items",
+ "HeaderOtherItems": "Other Items",
+ "ButtonFullReview": "Full review",
+ "ValueAsRole": "as {0}",
+ "ValueGuestStar": "Guest star",
+ "MediaInfoSize": "Size",
+ "MediaInfoPath": "Path",
+ "MediaInfoFormat": "Format",
+ "MediaInfoContainer": "Container",
+ "MediaInfoDefault": "Default",
+ "MediaInfoForced": "Forced",
+ "MediaInfoExternal": "External",
+ "MediaInfoTimestamp": "Timestamp",
+ "MediaInfoPixelFormat": "Pixel format",
+ "MediaInfoBitDepth": "Bit Depth",
+ "MediaInfoSampleRate": "Sample rate",
+ "MediaInfoBitrate": "Bitrate",
+ "MediaInfoChannels": "Channels",
+ "MediaInfoLayout": "Layout",
+ "MediaInfoLanguage": "Language",
+ "MediaInfoCodec": "Codec",
+ "MediaInfoProfile": "Profile",
+ "MediaInfoLevel": "Level",
+ "MediaInfoAspectRatio": "Aspect ratio",
+ "MediaInfoResolution": "Resolution",
+ "MediaInfoAnamorphic": "Anamorphic",
+ "MediaInfoInterlaced": "Interlaced",
+ "MediaInfoFramerate": "Framerate",
+ "MediaInfoStreamTypeAudio": "Audio",
+ "MediaInfoStreamTypeData": "Data",
+ "MediaInfoStreamTypeVideo": "Video",
+ "MediaInfoStreamTypeSubtitle": "Subtitle",
+ "MediaInfoStreamTypeEmbeddedImage": "Embedded Image"
}
diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.json
index 28feeef06..da7e41293 100644
--- a/MediaBrowser.Server.Implementations/Localization/Server/server.json
+++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json
@@ -1166,5 +1166,17 @@
"LabelConnectUserNameHelp": "Connect this user to a Media Browser account to enable easy sign-in access from any app without having to know the server ip address.",
"ButtonLearnMoreAboutMediaBrowserConnect": "Learn more about Media Browser Connect",
"LabelExternalPlayers": "External players:",
- "LabelExternalPlayersHelp": "Display buttons to play content in external players. This is only available on devices that support url schemes, generally Android and iOS. With external players there is generally no support for remote control or resuming."
-}
+ "LabelExternalPlayersHelp": "Display buttons to play content in external players. This is only available on devices that support url schemes, generally Android and iOS. With external players there is generally no support for remote control or resuming.",
+ "HeaderSubtitleProfile": "Subtitle Profile",
+ "HeaderSubtitleProfiles": "Subtitle Profiles",
+ "HeaderSubtitleProfilesHelp": "Subtitle profiles describe the subtitle formats supported by the device.",
+ "LabelFormat": "Format:",
+ "LabelMethod": "Method:",
+ "LabelDidlMode": "Didl mode:",
+ "OptionCaptionInfoExSamsung": "CaptionInfoEx (Samsung)",
+ "OptionResElement": "res element",
+ "OptionEmbedSubtitles": "Embed within container",
+ "OptionExternallyDownloaded": "External download",
+ "OptionHlsSegmentedSubtitles": "Hls segmented subtitles",
+ "LabelSubtitleFormatHelp": "Example: srt"
+} \ No newline at end of file
diff --git a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs
index 541251c2b..dc20653d7 100644
--- a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs
+++ b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs
@@ -16,16 +16,14 @@ namespace MediaBrowser.ServerApplication.FFMpeg
// OS X builds: http://ffmpegmac.net/
// OS X x64: http://www.evermeet.cx/ffmpeg/
- public static string Version = ffmpegOsType("Version");
+ public static string Version = getFfmpegValue("Version");
- public static string[] FfMpegUrls = GetDownloadUrls();
+ public static string FFMpegFilename = getFfmpegValue("FFMpegFilename");
+ public static string FFProbeFilename = getFfmpegValue("FFProbeFilename");
- public static string FFMpegFilename = ffmpegOsType("FFMpegFilename");
- public static string FFProbeFilename = ffmpegOsType("FFProbeFilename");
+ public static string ArchiveType = getFfmpegValue("ArchiveType");
- public static string ArchiveType = ffmpegOsType("ArchiveType");
-
- private static string ffmpegOsType(string arg)
+ private static string getFfmpegValue(string arg)
{
OperatingSystem os = Environment.OSVersion;
PlatformID pid = os.Platform;
@@ -61,7 +59,6 @@ namespace MediaBrowser.ServerApplication.FFMpeg
case "ArchiveType":
return "gz";
}
- break;
}
if (PlatformDetection.IsX86)
{
@@ -76,10 +73,9 @@ namespace MediaBrowser.ServerApplication.FFMpeg
case "ArchiveType":
return "gz";
}
- break;
}
}
- if (PlatformDetection.IsLinux)
+ else if (PlatformDetection.IsLinux)
{
if (PlatformDetection.IsX86)
{
@@ -94,8 +90,8 @@ namespace MediaBrowser.ServerApplication.FFMpeg
case "ArchiveType":
return "gz";
}
- break;
}
+
else if (PlatformDetection.IsX86_64)
{
// Linux on x86 or x86_64
@@ -110,16 +106,28 @@ namespace MediaBrowser.ServerApplication.FFMpeg
case "ArchiveType":
return "gz";
}
- break;
}
}
- // Unsupported Unix platform
+
+ break;
+ }
+
+ switch (arg)
+ {
+ case "Version":
+ return "path";
+ case "FFMpegFilename":
+ return "ffmpeg";
+ case "FFProbeFilename":
+ return "ffprobe";
+ case "ArchiveType":
return "";
+ default:
+ return string.Empty;
}
- return "";
}
- private static string[] GetDownloadUrls()
+ public static string[] GetDownloadUrls()
{
var pid = Environment.OSVersion.Platform;
@@ -210,8 +218,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg
var sysName = uname.sysname ?? string.Empty;
IsMac = string.Equals(sysName, "Darwin", StringComparison.OrdinalIgnoreCase);
- IsLinux = string.Equals(sysName, "Linux", StringComparison.OrdinalIgnoreCase) ||
- sysName.EndsWith("BSD", StringComparison.OrdinalIgnoreCase);
+ IsLinux = string.Equals(sysName, "Linux", StringComparison.OrdinalIgnoreCase);
var archX86 = new Regex("(i|I)[3-6]86");
IsX86 = archX86.IsMatch(uname.machine);
diff --git a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs
index a026f9a49..59c2940e6 100644
--- a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs
+++ b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs
@@ -55,14 +55,26 @@ namespace MediaBrowser.ServerApplication.FFMpeg
};
}
+ var version = FFMpegDownloadInfo.Version;
+
+ if (string.Equals(version, "path", StringComparison.OrdinalIgnoreCase))
+ {
+ return new FFMpegInfo
+ {
+ ProbePath = FFMpegDownloadInfo.FFProbeFilename,
+ EncoderPath = FFMpegDownloadInfo.FFMpegFilename,
+ Version = version
+ };
+ }
+
var rootEncoderPath = Path.Combine(_appPaths.ProgramDataPath, "ffmpeg");
- var versionedDirectoryPath = Path.Combine(rootEncoderPath, FFMpegDownloadInfo.Version);
+ var versionedDirectoryPath = Path.Combine(rootEncoderPath, version);
var info = new FFMpegInfo
{
ProbePath = Path.Combine(versionedDirectoryPath, FFMpegDownloadInfo.FFProbeFilename),
EncoderPath = Path.Combine(versionedDirectoryPath, FFMpegDownloadInfo.FFMpegFilename),
- Version = FFMpegDownloadInfo.Version
+ Version = version
};
Directory.CreateDirectory(versionedDirectoryPath);
@@ -166,7 +178,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg
private async Task DownloadFFMpeg(string directory, IProgress<double> progress)
{
- foreach (var url in FFMpegDownloadInfo.FfMpegUrls)
+ foreach (var url in FFMpegDownloadInfo.GetDownloadUrls())
{
progress.Report(0);
diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
index fdbd1d352..e7f5f3572 100644
--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
@@ -2104,12 +2104,6 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
- <None Include="dashboard-ui\css\fonts\mblogo.eot">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
- <None Include="dashboard-ui\css\fonts\mblogo.ttf">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
<None Include="dashboard-ui\css\fonts\mblogo.woff">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>