3 import os
, sys
, subprocess
5 SRC_DIR
= "/home/douglas/sparrow/content/dv/late/"
6 DEST_DIR
= "/home/douglas/sparrow/content/mjpeg/"
8 DF_DEST_DIR
= "/home/douglas/sparrow/content/mjpeg_df/"
19 def do_one(src
, dest
, df
=False):
22 fps_list
= ['-fps', '50', '-ofps', '50']
28 vf
= ("yadif=%d,hqdn3d,scale=%d:%d,crop=%d:%d:%d:%d" %
29 (yadif_mode
, WIDTH
+ CROP_RIGHT
, HEIGHT
+ CROP_TOP
,
30 WIDTH
, HEIGHT
, 0, CROP_TOP
))
32 vf
= ("yadif=%d,hqdn3d,scale=%d:%d" %
33 (yadif_mode
, WIDTH
, HEIGHT
))
42 "-lavcopts", "vcodec=mjpeg",
46 subprocess
.check_call(cmd
)
49 do_one(SRC_DIR
+ "sparrow-1-3-4-12-14145.dv",
50 DEST_DIR
+ "sparrow-1-3-4-12-14145-precrop.avi")
58 for src
in os
.listdir(SRC_DIR
):
59 dest
= destdir
+ src
+ '-late.avi'
69 #hqdn3d=4:3:6 [:6*3/4 == 4]