summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2014-02-16 22:44:26 +0000
committerComment <tim@gray.(none)>2014-02-16 22:44:26 +0000
commitae5e8541f6e06e64c28719467cdf366ac57aff31 (patch)
tree33c9212e3846ec8f2ca468ea6b1516b210ed43ac
parentad86bb9b35c8f2e96982b99356909e604b1058e2 (diff)
video proxy issue
-rwxr-xr-xrotord/make_proxies21
-rw-r--r--rotord/src/rotor.h8
2 files changed, 19 insertions, 10 deletions
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;i<path.depth();i++){
pathto=pathto+path[i]+"/";
@@ -920,9 +920,9 @@ namespace Rotor {
media_path=find_setting(settings,"media_path","");
//for (auto a:attributes) cerr<<"Video loader: "<<a.first<<" set to "<<a.second->value<<endl;
//in order to implement prescaled clips, need to know size when loading-> 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(){};