summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2015-04-15 17:39:34 +0200
committeranbr <vdr07@deltab.de>2015-04-15 17:39:34 +0200
commit27436744df70f9ecd42a9ecdbef448cc65271706 (patch)
tree4d1f11aff73463e94e009acdf006d0bc5ac85fed
parent8594d975a7d62a684cf7663bc405a341b9cb9a6e (diff)
downloadxxv-27436744df70f9ecd42a9ecdbef448cc65271706.tar.gz
xxv-27436744df70f9ecd42a9ecdbef448cc65271706.tar.bz2
vdr2jpeg: respect aspect ratio
-rw-r--r--contrib/vdr2jpeg/ffm.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/vdr2jpeg/ffm.cpp b/contrib/vdr2jpeg/ffm.cpp
index 24c1e16..a393699 100644
--- a/contrib/vdr2jpeg/ffm.cpp
+++ b/contrib/vdr2jpeg/ffm.cpp
@@ -36,21 +36,21 @@ bool decode (const char* szMPVfile,
#ifdef DEBUG
ss << "verbose -report";
#else
- ss << "quiet";
+ ss << "error";
#endif
ss << " -an -i '" << szMPVfile << "'";
if(width > 0 && height > 0) {
- ss << " -vf scale=" << width << ":" << height;
+ ss << " -vf 'scale=" << width << ":ih*" << height << "/iw'";
} else if(height > 0) { // Nur Höhe wurde definiert
- ss << " -vf scale=-1:" << height;
+ ss << " -vf 'scale=iw*trunc(oh*a/2)*2/ih:" << height << "'";
} else if(width > 0) { // Nur Weite wurde definiert
- ss << " -vf scale=" << width << ":-1";
+ ss << " -vf 'scale=" << width << ":ih*trunc(ow/a/2)*2/iw'";
}
ss << " '" << szTmpMask << "'";
#ifdef DEBUG
- std::cerr << ss.str();
+ std::cerr << ss.str() << std::endl;
#endif
return (0 == system(ss.str().c_str()));