Skip to content

Commit

Permalink
Add additional format options for transparency
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AustinMroz committed Jul 31, 2024
1 parent fc328d8 commit 8f8df32
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions video_formats/ProRes.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"main_pass":
[
"-n", "-c:v", "prores_ks",
"-profile:v","3",
"-pix_fmt", "yuv422p10"
"-profile:v", ["profile",["1","2","3","4"], {"default": "3"}]
],
"audio_pass": ["-c:a", "pcm_s16le"],
"extension": "mov"
Expand Down
2 changes: 1 addition & 1 deletion video_formats/nvenc_h264-mp4.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"main_pass":
[
"-n", "-c:v", "h264_nvenc",
"-pix_fmt", ["pix_fmt", ["yuv420p", "yuv420p10le"]]
"-pix_fmt", ["pix_fmt", ["yuv420p", "yuv420p10le", "rgba"]]
],
"audio_pass": ["-c:a", "aac"],
"bitrate": ["bitrate","INT", {"default": 10, "min": 1, "max": 999, "step": 1 }],
Expand Down
2 changes: 1 addition & 1 deletion video_formats/nvenc_hevc-mp4.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[
"-n", "-c:v", "hevc_nvenc",
"-vtag", "hvc1",
"-pix_fmt", ["pix_fmt", ["yuv420p", "yuv420p10le"]]
"-pix_fmt", ["pix_fmt", ["yuv420p", "yuv420p10le", "rgba"]]
],
"audio_pass": ["-c:a", "aac"],
"bitrate": ["bitrate","INT", {"default": 10, "min": 1, "max": 999, "step": 1 }],
Expand Down
2 changes: 1 addition & 1 deletion videohelpersuite/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async def view_video(request):
try:
res = subprocess.run(['ffmpeg'] + in_args + ['-t', '0', '-f', 'null', '-'],
capture_output=True, check=True)
match = re.search(': Video: (\\w+) .+, (\d+) fps,', res.stderr.decode('utf-8'))
match = re.search(': Video: (\\w+) .+, (\\d+) fps,', res.stderr.decode('utf-8'))
if match:
base_fps = float(match.group(2))
if match.group(1) == 'vp9':
Expand Down

0 comments on commit 8f8df32

Please sign in to comment.