Skip to content

Commit

Permalink
set default grid loop to 1 (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaker committed May 18, 2023
1 parent 5e62122 commit 07f99a0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/cutselectionController.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def jumpClips(self,offset):
self.randomlyPlayedFiles.add(nextFile)
except ValueError as e:
logging.error('Exception jumpClips',exc_info=e)
clipsleft = len(set(self.files).difference(self.randomlyPlayedFiles))

self.updateProgressStatistics()

def playVideoFile(self,filename,startTimestamp):
Expand Down
6 changes: 4 additions & 2 deletions src/ffmpegService.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ def encodeGrid(tempPathname,outputPathName,runNumber,requestId,mode,seqClips,opt
if 'Loop shorter' in gridLoopMergeOption:
minLength = maxLength

print('### minLength #######', minLength, '######')

totalExpectedEncodedSeconds = cutLengths+(minLength*(1/speedAdjustment))
totalEncodedSeconds = 0

Expand Down Expand Up @@ -649,13 +651,13 @@ def encodeGrid(tempPathname,outputPathName,runNumber,requestId,mode,seqClips,opt
vi,(vrid,vclipfilename,vs,ve,vfilterexp,vfilteraudioexp,vfilterexpEnc) = brickClips[k]

vetime = ve-vs
loopCount=0
loopCount=1
if 'Loop shorter' in gridLoopMergeOption:
print('loop',vclipfilename,maxLength,vetime,maxLength/vetime,math.ceil(maxLength/vetime))
loopCount = math.ceil(maxLength/vetime)


inputsList.extend(['-stream_loop', str(loopCount),'-i',brickTofileLookup[k]])

inputScales.append('[{k}:v]setpts=PTS-STARTPTS+{st},trim=duration={maxlen},scale={w}:{h}:flags=bicubic[vid{k}]'.format(k=snum,w=int(w),h=int(h),st=0,maxlen=maxLength))

srcLayer='[tmp{k}]'.format(k=snum)
Expand Down
1 change: 0 additions & 1 deletion src/webmGeneratorController.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def __init__(self,initialFiles):
"perClipSpeedAdjustment":False,
"defaultPSNRWidthReductionFactor":0.05,


"loadRelativeCopyOnFileNotExists":False,
"clampSeeksToFPS":False,

Expand Down
11 changes: 5 additions & 6 deletions src/webmGeneratorUi.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,6 @@ def __init__(self,controller,master=None):
self.commandmenu.add_command(label="Show audio slice planner",command=self.showSlicePlanner,state='disabled')

self.commandmenu.add_separator()
self.autoconvertVar=StringVar(self.master,False)
self.commandmenu.add_checkbutton(label="Auto encode on video switch", command=self.toggleAutoconvert, variable=self.autoconvertVar)
self.commandmenu.add_checkbutton(label="Toggled completed frame", command=self.toggleCompletedFrame)


Expand All @@ -374,8 +372,6 @@ def checkFreeSpaceWorker():
self.master.config(menu=self.menubar)

self.notebook = ttk.Notebook(self.master)

"""BLERG"""

self.frameConverted = ttk.Frame(self.master)
self.frameConverted.config(height="200", width="0" )
Expand All @@ -392,7 +388,10 @@ def checkFreeSpaceWorker():
self.completedLabel = ttk.Label(self.scrolledConvertedInner,text='Completed Encodes')
self.completedLabel.pack(expand="false", fill='x', side="top")

"""BLERG"""
self.autoconvertVar=StringVar(self.master,False)

self.autoConvertCheck = ttk.Checkbutton(self.scrolledConvertedInner,text='Auto convert',command=self.toggleAutoconvert, variable=self.autoconvertVar)
self.autoConvertCheck.pack(expand="false", fill='x', side="top")

self.statusFrame = ttk.Frame(self.master,height='20')

Expand Down Expand Up @@ -495,7 +494,7 @@ def registerComplete(self,label,filename,img=None):
try:
print(label,filename)
completed = ttk.Label(self.scrolledConvertedInner,text=label, relief='groove', width=25, cursor="fleur", compound="top")
completed.pack(expand="false", fill='x', side="top", padx=25)
completed.pack(expand="false", fill='x', side="top", padx=10)

try:
if img is not None:
Expand Down

0 comments on commit 07f99a0

Please sign in to comment.