Replies: 12 comments 13 replies
-
That's awesome! Thanks for posting this! |
Beta Was this translation helpful? Give feedback.
-
Thanks for posting such a detailed guide! |
Beta Was this translation helpful? Give feedback.
-
This is surprisingly easy (not tried yet) |
Beta Was this translation helpful? Give feedback.
-
This is great - but I really wish we could pipe the processed results into ffmpeg |
Beta Was this translation helpful? Give feedback.
-
With ffmpeg it is impossible, better use OpenCV with a small buffer so as not to saturate the memory that progressively writes the video in 4k and later adds the sound. |
Beta Was this translation helpful? Give feedback.
-
Did this work with gif? |
Beta Was this translation helpful? Give feedback.
-
I put together a quick and dirty bash script that essentially just does what's in the above guide. It tries to figure out the framerate and it puts all the frames into You can use it with To set it up:
UPSCAYL=~/upscayl-bin-20240601-103425-linux/upscayl-bin
MODEL=RealESRGAN_General_WDN_x4_v3
# can use any model from upscayl-bin-20240601-103425-linux/models
INPUT=$1
BASE=$(basename $INPUT | cut -d. -f1)
FR=$(ffprobe $INPUT 2>&1 | grep -i "stream.*video" | awk -F'fps' '{print $1}' | awk '{print $NF}')
TD=$(mktemp -d /tmp/XXX)
mkdir $TD/frames
mkdir $TD/upscaled
ffmpeg -i $INPUT -r $FR $TD/frames/%08d.png
$UPSCAYL -i $TD/frames -o $TD/upscaled -n $MODEL
ffmpeg -framerate $FR -i $TD/upscaled/%08d.png -r $FR -vf format=yuv420p ${BASE}_upscaled.mkv |
Beta Was this translation helpful? Give feedback.
-
@ivabus Can you send this tutorial to the repository README? |
Beta Was this translation helpful? Give feedback.
-
we want sub folder batch upscale for clip frames but will give this a try.... |
Beta Was this translation helpful? Give feedback.
-
Upscayl 2.11.5 has a memory leak. This means that the process will crash after 1000 to 5000 images depending upon how much RAM is in your system. 5000 images may seem like a lot, but I used ffmpeg to decompose a movie into 210,000+ PNG images. Since manually running individual batches of 5K images is time consuming, I wrote this bash script.
To use this code, you will need to...
To create my own command line arguments for 'upscayl-bin', I played with the Upscayle GUI and with images from the movie until I found results that I liked. Then I upsized a batch of 100 images through Upscayl (GUI). While the batch was processing, I opened a terminal and ran this command:
The arguments were displayed on screen and I copied them into the script. NOTE: I have very little experience writing bash scripts. However, I have decades of experience with PowerShell, T-SQL, and writing technical documentation, so please be kind in your criticisms.
|
Beta Was this translation helpful? Give feedback.
-
Thank you! As i have done exactly this with batch upscaling images for just this, but joining it back together to a functional movie/episode, i could not find the ffmpeg commands for! :D |
Beta Was this translation helpful? Give feedback.
-
Does upscayl supports GPU multi threading similar to RealScaler ? |
Beta Was this translation helpful? Give feedback.
-
Just finished upscaling a video with Upscayl and here is a result (YouTube (up to 4K), file (big), file (smol)).
Model used: "Digital art" - "realesrgan-x4plus-anime"
Formats
Video: 1280x720 -> 5120x2880 (5K)
Framerate: 30
Length: 3:20 or 6015 frames
Steps
Split video into frames
Extract audio from file (optional)
Batch Upscayl
Just use Upscayl in the "Batch" mode
Running in parallel on the MacBook Air M2 and MacBook Air M1, it was done in 10 hours. (2.8.6)
Join frames into video
Without audio
With audio
Beta Was this translation helpful? Give feedback.
All reactions