Try to add FFmpeg to make_dummy_files.
authorCarl Hetherington <cth@carlh.net>
Tue, 17 Nov 2015 13:10:59 +0000 (13:10 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 17 Nov 2015 13:10:59 +0000 (13:10 +0000)
hacks/make_dummy_files

index f5272278b7490ba083e86446f46d4912eeb858e4..6428348a434f6a45c4aaa1139950212d835d1510 100755 (executable)
@@ -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