summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-11-17 13:10:59 +0000
committerCarl Hetherington <cth@carlh.net>2015-11-17 13:10:59 +0000
commit8d29ca001ae8297204d1a9ccfcee5fae485041ff (patch)
treea2d1963a8a4540db264ae11ec10b2b005992a013
parent745aa6f40feebf0d4090937c22fc26b5d5ee3ef0 (diff)
Try to add FFmpeg to make_dummy_files.
-rwxr-xr-xhacks/make_dummy_files5
1 files changed, 5 insertions, 0 deletions
diff --git a/hacks/make_dummy_files b/hacks/make_dummy_files
index f5272278b..6428348a4 100755
--- a/hacks/make_dummy_files
+++ b/hacks/make_dummy_files
@@ -72,5 +72,10 @@ for c in tree.getroot().find('Playlist').findall('Content'):
path = os.path.join(sys.argv[1], 'dummy', ntpath.basename(c.find('Path').text))
audio_length = int(c.find('AudioLength').text)
os.system('sox -n -r %d -c %d %s trim 0.0 %f' % (audio_frame_rate, channels, path, float(audio_length) / audio_frame_rate))
+ elif type == 'FFmpeg':
+ video_frame_rate = int(c.find('VideoFrameRate').text)
+ video_length = int(c.find('VideoLength').text)
+ path = os.path.join(sys.argv[1], 'dummy', ntpath.basename(c.find('Path').text))
+ os.system('ffmpeg -t %d -s qcif -f rawvideo -pix_fmt rgb24 -r %d -i /dev/zero %s' % (float(video_length) / video_frame_rate, video_frame_rate, path))
else:
print 'Skipped %s' % type