From ae5e8541f6e06e64c28719467cdf366ac57aff31 Mon Sep 17 00:00:00 2001 From: Comment Date: Sun, 16 Feb 2014 22:44:26 +0000 Subject: video proxy issue --- rotord/make_proxies | 21 +++++++++++++++------ rotord/src/rotor.h | 8 ++++---- 2 files changed, 19 insertions(+), 10 deletions(-) (limited to 'rotord') diff --git a/rotord/make_proxies b/rotord/make_proxies index bd78ecc..9bf433d 100755 --- a/rotord/make_proxies +++ b/rotord/make_proxies @@ -4,10 +4,19 @@ for source in $*; do path=${source%/*} file=${source##*/} - suffix=${file##*.} - stub=${file%.*} - mkdir "$path/$stub.proxies"; - ffmpeg -i "$source" -s 1280x720 "$path/$stub.proxies/720.$suffix"; - ffmpeg -i "$path/$stub.proxies/720.$suffix" -s 640x360 "$path/$stub.proxies/360.$suffix"; - ffmpeg -i "$path/$stub.proxies/360.$suffix" -s 320x180 "$path/$stub.proxies/180.$suffix"; + stub=${file%.[^.]*} + suffix=${file:${#stub}} + if [[-z "$stub" && -n "$suffix"]]; then + stub=".$suffix" + suffix="" + fi + suffix=".mp4" + mkdir "$path/$stub.proxies" + #echo "source: $source" + #echo "path: $path" + #echo "suffix: $suffix" + #echo "stub: $stub" + ffmpeg -i "$source" -s 1280x720 "$path/$stub.proxies/720$suffix" + ffmpeg -i "$path/$stub.proxies/720$suffix" -s 640x360 "$path/$stub.proxies/360$suffix"; + ffmpeg -i "$path/$stub.proxies/360$suffix" -s 320x180 "$path/$stub.proxies/180$suffix"; done \ No newline at end of file diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 8499408..0053146 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -796,7 +796,7 @@ namespace Rotor { if (h>0&&h<721){ Poco::Path path(filename); std::string stub(path.getBaseName()+".proxies/"); - std::string suffix(path.getExtension()); + std::string suffix="mp4"; //(path.getExtension()); std::string pathto="/"; for (int i=0;ivalue< defer - if (attributes["filename"]->value!="") { - isLoaded=load(media_path+attributes["filename"]->value,720); - } + //if (attributes["filename"]->value!="") { + // isLoaded=load(media_path+attributes["filename"]->value,720); + //} }; ~Video_loader(){}; -- cgit v1.2.3