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