It is a fast put up, largely for my very own reference.
I’ve averted LUTs and ‘Log’ video footage for years, largely due to the additional tiny little bit of workflow concerned. Like RAW pictures, ‘Log’ footage retains the video sensor’s full dynamic vary, so you’ll be able to pull extra coloration and luminance data out of the footage later.
However in contrast to pictures, the place RAW has been a factor for many years, and plenty of workflows ‘simply work’ with out me having to ‘grade’ each particular person picture, in video valuable few client apps deal with Log footage gracefully. You typically find yourself with a muddy gray mess.
I do not wish to launch DaVinci Resolve or Closing Reduce Professional to course of each video I shoot. Particularly if I’m recording in Log for a selected purpose, however neglect to change again to ‘regular’ mode and shoot extra clips later.

The distinction is stark, as illustrated by this clip (above) I used to be capturing with my children round the home with my DJI Osmo Pocket 4. I simply picked it up and was testing it, and I spotted I nonetheless had it in ’10-bit D-Log’ mode after I imported the footage to my pc.
I did not wish to undergo launching Closing Reduce Professional simply to grade a half-dozen clips to place them into our household video library, so I turned to ffmpeg, after seeing this point out of the built-in lut3d filter.
ffmpeg for LUTs
The complete ffmpeg command I am utilizing is:
–i /Customers/jgeerling/Downloads/DJI_20000219193052_0005_D.MP4
–vf “lut3d=osmo-vivid.dice”
–c:v hevc_videotoolbox
–profile:v main10
–b:v 30M
–pix_fmt p010le
–tag:v hvc1
–c:a duplicate
DJI_0005_D_converted.mp4
A few of these flags will solely work on a Mac, the place Apple’s {hardware} H.265 video encoder is current. The principle factor is -vf “lut3d=osmo-vivid.dice”, which is the trail to a .dice file to your particular digicam/footage.
On this case, I am utilizing the DJI Osmo Pocket 4 ‘vivid’ LUT.
If you would like to switch the ffmpeg flags to focus on your individual {hardware}’s H.264 or H.265 acceleration, simply seize the command above and run it by your favourite LLM. After a pair a long time utilizing ffmpeg, it nonetheless looks like AP Calculus 2 attempting to recollect all the varied flags and abbreviations 😀
I might love there to be an ordinary for ‘LUT sidecars’. Apple, BlackMagic, Sony, and others do embed LUT information in video information… however there is no customary, so that you want DaVinci Resolve for Blackmagic digicam clips, QuickTime for iPhone clips… and in the long run, most non-pro apps will simply present a muddy video file if you happen to do not course of it like I am doing with ffmpeg. Sigh.
Given a selected .dice file, this is how one can apply the LUT to all of the MP4 information in a given folder:
CUBE=“osmo-vivid.dice”
DIR=“video_files”
information=(“$DIR“/*.MP4)
complete=${#information[@]}
depend=0
for enter in “${information[@]}“; do
[ -e “$input“ ] || proceed
((depend++))
echo “Processing file $depend of $complete: $(basename “$enter“)“
ffmpeg -i “$enter“ -vf “lut3d=$CUBE“ -c:v hevc_videotoolbox -profile:v main10 -b:v 30M -pix_fmt p010le -tag:v hvc1 -c:a duplicate “${enter%.MP4}_converted.mp4″
completed
Put the trail to your .dice file in CUBE, and the trail to a listing with a bunch of ungraded .MP4 information in DIR. Save the script, make it executable, and run it!
![[2410.13077] Tuning Language Fashions by Combination-of-Depths Ensemble [2410.13077] Tuning Language Fashions by Combination-of-Depths Ensemble](http://arxiv.org/static/browse/0.3.4/images/arxiv-logo-fb.png)