Updated ProRes to allow transparent output when set to Profile 4. As
part of this change, pix_fmt is no longer explicitly set for ProRes, but
the expected format is automatically applied from for each profile.
Added rgba as an output pix_fmt for the nvenc formats. These have not
been tested and may not function.
Fix incorrect escape in Advanced Preview code.
On Load Video, Size scaling had a major rewrite to support different
downscale ratios, but logic was flawed. This has been fixed
Image Sequence previews were broken by adding a framerate arg since the
input is a sequence file and not the images themself. This could be
added later by adding the speed information to the sequence file, but
has been removed for now since there isn't any infrastructure to set the
frame rate on the Load Images node itself
Added an 8bit-png output format. Lots of people seem to prefer
outputting image sequences. When the extra quality isn't required,
having a separate 8bit format allows for a significant speedup and less
disk space used.
There were still intermittent errors and console spam from a transcoded
advanced preview being interrupted before it could finish.Connection
errors are also caught now.
ffmpeg does not appear to handle transparency as expected for gif
creation. Transparent areas will show the previous frame, or a portion
of it. A deep dive into trying to find configuration options to fix this
did not result in solutions that functioned on my machine, but did
introduce me to the ffmpeg split filter.
Split allows for a single ffmpeg execution to generate a palette and
utilize the palette for creating the output gif without requiring a temp
file. However, the video data must be buffered in memory by ffmpeg.
Quick testing seems to show that ffmpeg uses 4 bytes per pixel
of buffered frame data.
The ramifications for memory usage are nuanced, but wind up preferable.
The increased memory per pixel of ffmpeg's buffering only results in
(approximated) 3% memory increase over the whole workflow, but remove
the need for a tempfile, a second subprocess call, and allow for
imperfect Meta Batch support which can only extend the total frame count
by 5-6x. It's a reduction in moving parts for underwhelming memory
characteristics in both the best and worst case. Additionally, it likely
actually addresses the issue the original requester saw in #160
The actual code for allowing pre-passes is left in for now and will
likely be re-evaluated for other uses or pruned at a later time.
Actually bump version.
While I have no repro on the reported issue for this branch, I feel
merging it is the best path forward for getting information and ensuring
the added functionality of the branch doesn't stagnate forever
Minor tweaks are made to wrangle input.
Gifski added support for input from pipes about a month ago, but I only
learned of this today.
The implementation was due for a rework, and brings numerous advantages:
- Gifski no longer needs to be compiled with ffmpeg support
- Gifski output now supports Meta Batches
- A temp file is no longer required
- The simplified intermediary format should increase performance/quality
This will require a recently updated version of gifski and there is not
currently code in place to notify the user of this.
Adds supoort for an ffmpeg gif output.
Resolves#160
Adds support for a pre_pass field in video formats which can be used for
other advanced encoding formats
Adds support for string templates in format widgets
Known issues:
Gif output requires a complex filtergraph. This makes it incompatible
with the loop count setting. The error message for this is not the
clearest currently and will need further investigation.
Adds support for a gifski_pass in video_formats and a gifski format
which utilizes it. Resolves#79
Much consideration was put into how best to implement this. Gifski does
not support piped input, and implementing such functionality is
infeasible as the ffmpeg library used by Gifski requires inputs be
physical files. Consequentially, an intermediate file of some sort is
required. While an implementation that would not require a prior ffmpeg
pass was investigated, the only viable intermediary format
between Pillow and Gifski's ffmpeg decoder is an animated png and gifski
will never pass this png to it's ffmpeg decoder as it sees the png
header and instead interprets the file as a single frame image.
Add a 16bit-png video_format which supports output transparency. Other
formats could be updated for similar capabilities, but are likely to
have issues with device support and unlikely to see widespread adoption.
Modifies the preview server code to properly parse and check for the
existence of sequence filenames.
In Video Combine, libx264 may crash with 1000+ input images.
To avoid the crash, add hardware encoding supported by NVIDIA GPUs.
Add bitrate option which precludes crf.
Add megabit option, which so the user may specify bitrate in Mb or Kb.
Add hvc1 video tag, for better support on with Apple quicktime - to hevc_nvenc and libx265 video formats.
This allows previews to show up in Safari too.
Add *.swp to .gitignore.
The toggle for saving metadata has been changed back to a boolean
instead of a combo. While I wished to provide for future compatibility,
the change broke existing workflows and there was no accommodating
implementation to load metadata saved under a different tag.
The log level for ffmpeg preview processes has been raised to fatal.
There's a good chance this will make debugging harder for users when
errors arise, but aborted requests were too common for the error
messages produced by them to be acceptable.
Format widgets for ints are now properly rounded.
Add "-b:v" flag to webm format, resolves#78
Fixes Video Combine to provide an output usable outside the ui,
a list of files produced, resolves#57
Fix error in file path safety checks across drives on windows
Fixes for preview generation when backing file has audio
Don't scale video previews above their base resolution
Implement select_every_nth for advanced previews
Fix regression with improper callback checking on Load Audio
Reorder Load Audio in node mappings to not be grouped with image nodes
save_metadata is now a format flag
- This allows saving to different tag and hides for image formats
Implement high bit depth support
- Disabled by default, but works for images and has shown in testing to
produce objectively higher quality output than base Save Image
Fix target_size from load video not applying when 2 dimensions are set
When an input video is scaled to a new aspect ratio, it is now cropped
Removed try wrapping of load video nodes. This creates more confusion
now a system of fallbacks isn't used
A fix for parsing format_widgets when applied outside a '_pass'
Fixed missing import of logger in utils
Animated images are now included in the animated preview code
- This improves performance and allows for pausing
Cleaned up injection of code to load metadata
Audio settings are now stored in video_formats
Updated video_formats with reasonable defaults for audio
A Load Audio (Path) node has been added
Audio Loads are cached with load state and only occur once.
While having the optional arguments passed is non-trivial, there's an
easy fix to get retrieve all params sent from the client.
Substantial changes to how formats are stored on the backend to ensure
that the extra data isn't displayed in the dropdown list or upon
clicking the "Refresh" button in the ui.
Update most existing existing formats to expose options as widgets
Allows for ffmpeg output settings to be set from a series of json config
files stored in video_formats. This allows for higher quality
output files with newer codecs (like av1), while still ensuring
compatibility with older ffmpeg versions
In addition to these changes, the logging of ffmpeg is better handled.
Error messages from ffmpeg itself are printed and logging from encoders
that was improperly filtered have been individually addressed.
While h265 has been included, most browsers will be unable to display
the resulting video.