User Tools

Site Tools


tinypy:tinypybatch2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tinypy:tinypybatch2 [2016/06/20 08:08]
mean
tinypy:tinypybatch2 [2016/06/20 08:19]
mean
Line 1: Line 1:
-== Batch Processing 2 ==+======  ​Batch Processing 2 ====== 
  
 The first step is to process one file manually and save the corresponding tinypy project. The first step is to process one file manually and save the corresponding tinypy project.
Line 37: Line 38:
   "​ratecontrol.lookahead=40"​)   "​ratecontrol.lookahead=40"​)
   adm.addVideoFilter("​swscale",​ "​width=1280",​ "​height=960",​ "​algo=2",​ "​sourceAR=1",​ "​targetAR=1"​)   adm.addVideoFilter("​swscale",​ "​width=1280",​ "​height=960",​ "​algo=2",​ "​sourceAR=1",​ "​targetAR=1"​)
 +  adm.audioCodec(0,​ "​Faac"​);​
   adm.setContainer("​MP4",​ "​muxerType=0",​ "​useAlternateMp3Tag=True"​)   adm.setContainer("​MP4",​ "​muxerType=0",​ "​useAlternateMp3Tag=True"​)
   ​   ​
Line 53: Line 55:
           ui.displayError("​oops","​cannot load "​+filein)           ui.displayError("​oops","​cannot load "​+filein)
           raise           raise
-      # manual file insert+      # ---------- Inserting project start------------
       adm.videoCodec("​x264",​ "​useAdvancedConfiguration=True",​ "​general.params=AQ=20",​\       adm.videoCodec("​x264",​ "​useAdvancedConfiguration=True",​ "​general.params=AQ=20",​\
        "​general.threads=99", ​    "​general.preset=",​ "​general.tuning=",​ "​general.profile=",​\        "​general.threads=99", ​    "​general.preset=",​ "​general.tuning=",​ "​general.profile=",​\
Line 63: Line 65:
        "​ratecontrol.lookahead=40"​)        "​ratecontrol.lookahead=40"​)
       adm.addVideoFilter("​swscale",​ "​width=1280",​ "​height=960",​ "​algo=2",​ "​sourceAR=1",​ "​targetAR=1"​)       adm.addVideoFilter("​swscale",​ "​width=1280",​ "​height=960",​ "​algo=2",​ "​sourceAR=1",​ "​targetAR=1"​)
 +      adm.audioCodec(0,​ "​Faac"​);​
       adm.setContainer("​MP4",​ "​muxerType=0",​ "​useAlternateMp3Tag=True"​)       adm.setContainer("​MP4",​ "​muxerType=0",​ "​useAlternateMp3Tag=True"​)
-      # manual insert ​end +      # ---------- Inserting project ​end------------ 
-      adm.save(filein+"​.converted.mp4"​)+      adm.save(filein+"​.converted.mp4"​) ​# save the file 
       print("​Done"​)       print("​Done"​)
     ​     ​
Line 80: Line 83:
           convert(i)           convert(i)
   print("​Done"​)   print("​Done"​)
 +
 +A couple of pitfalls :
 +  * The script is invalid, the x264 configuration line has been truncated. You must put a complete and valid line.
 +  * Dont forget that a line cannot exceed 200 chars, split it and add "​\"​ at the end of each split line.
  
   ​   ​
tinypy/tinypybatch2.txt · Last modified: 2016/06/20 08:19 by mean