Skip to content

Commit

Permalink
remove optimize if writing mp4
Browse files Browse the repository at this point in the history
  • Loading branch information
landmanbester committed Apr 11, 2024
1 parent 5f8670a commit 62c3455
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions pfb/workers/smoovie.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,25 +278,33 @@ def plot_frame(frame):
# 4 - frame fraction
# 5 - band id

# TODO - submit streams in parallel
# TODO - progressbar
idfy = f'fps{opts.fps}_tbin{opts.time_bin}_fbin{opts.freq_bin}'
if opts.out_format.lower() == 'gif':
uri = f'{opts.outname}_band{b}_{idfy}.gif'
outim = stream(
results,
renderer=plot_frame,
intro_title=f"{opts.outname}-Band{b:04d}",
optimize=True,
threads_per_worker=1,
fps=opts.fps,
uri=f'{opts.outname}_band{b}_{idfy}.gif'
)
elif opts.out_format.lower() == 'mp4':
uri = f'{opts.outname}_band{b}_{idfy}.mp4'
outim = stream(
results,
renderer=plot_frame,
intro_title=f"{opts.outname}-Band{b:04d}",
# optimize=True,
threads_per_worker=1,
fps=opts.fps,
uri=f'{opts.outname}_band{b}_{idfy}.mp4'
)
else:
raise ValueError(f"Unsupported format {opts.out_format}")

# TODO - progressbar
outim = stream(
results,
renderer=plot_frame,
intro_title=f"{opts.outname}-Band{b:04d}",
optimize=True,
threads_per_worker=1,
fps=opts.fps,
uri=uri
)



# outim.fps = opts.fps
# outim.write(f'{opts.outname}_band{b}_fps{opts.fps}_tbin'
Expand Down

0 comments on commit 62c3455

Please sign in to comment.