AMCDX Video Patcher v0.2.0 officially released.
There were several bugs fixed and added new tab “Edit Metadata” where you can in-place edit MOV metadata as well as ProRes frame metadata.
Metadata Editor Features:
1) ProRes frame metadata edit
2) MOV Timecode edit (edit timecode, edit drop flag)
3) MOV Colr Atom edit/remove/add
4) MOV Fiel Atom edit/remove/add
5) MOV Clap Atom edit/remove/add
Bugs fixed:
1) fixed Audio playback for tracks with more than 2 channels
2) reduced a bit CPU usage during playback
3) fixed support of MOV files with broken CLAP atom
What’s next?
Metadata Editor:
1) Add/Remove Timecode track
2) Tapt and Pasp atom edit/add/remove
3) Audio metadata edit
4) DNx frame metadata edit
ProRes Patcher:
1) File-to-file Insert
OSX Installer
Category Archives: Prores
AMCDX Video Patcher v0.1.0
AMCDX Video Patcher v0.1.0 officially released.
The main update is Performance optimizations… Now decoder is almost x10 faster and encoder x5 faster. which allows decode and encode 4k content realtime even on 4 cores machines
Also added timecode display and Audio playback
Bugs fixed:
1) Crash on open file with alpha (files not supported yet but no crash)
2) Crash on Open file with a width which not aligned to 16
3) Audio bit depth detection
4) Crash when trying to open a file if edit “In Progress”
5) Show error message when attempted to open Mov file without prores content
Features:
1) Performance optimization (multithreaded ProRes decoding and encoding, realtime playback of 4K footage)
2) Audio playback
3) Show current frame / timecode during playback
4) Show name/path of current file
Whats next?
Next will be File to File insert eg:
1) insert one or more frames from one ProRes file to another
2) Insert Rectangle from (eg Picture in Picture)
AMCDX Video Patcher v0.0.7
Release notes:
Features:
1) Added In/Out points support
2) Added Progress
3) Added tooltips
Bugs:
1) Fixed some Interlaced Prores files crash
2) Fixed support of Mov files with empty ‘dref’
3) Fixed mxf Op-Atom duration detection
Note: there are a lot of AVX2 optimizations so the app will crash if your CPU does not support AVX2
AMCDX Video Patcher V0.0.5
I finally found some time to release AMCDX Video Patcher v0.0.5
the video above shows newly added features.
Release notes:
Features:
1) Added “Save to PNG” functionality that allows you to save selected part of ProRes frame to PNG image (16 bit per component)
2) Added “Insert from PNG” functionality that allows you to replace selected rectangle by an image from PNG file
Bugs:
1) Fixed various UI bugs
2) Fixed MOV reader crash
3) Fixed color Matrix detection
Note: there are a lot AVX2 optimizations so app will crash if CPU does not support AVX2
AMCDX Video Patcher v0.0.3
Its almost week left after v0.0.1 was released and as I said before it was more proof of concept.
I got some feedback and bug reports and I`m ready to release version 0.0.3
What`s done?
1) added support of ProRes in MXF files (op1a and op-atom)
2) significantly improved Blur and decoder Performace
3) fixed YUV422 chrominance blur
4) fixed support of MOVs > 4GB
5) fixed various UI bugs
6) Added Windows Installer
7) Notarized Mac OS installer
AMCDX Video Patcher
Today I decided to release the first version of the tool I work on. To be fair its more like a proof of concept but still, id love to have some feedback so decided to share it
So currently It can:
1) open and playback MOV files with ProRes encoded Video
2) decode selected rectangle, blur it, encode and record back (so you can easily blur a face or anything else you don’t like on your final video)
Its still in progress and current implementation just shared to prove couple things:
1) we can easily edit files in-place
2) if we need to edit just exact rectangle we don’t need to decode and later encode back whole frame
3) obviously instead of blur we can add any effect needed or just replace part of the frame with a new one (for example its possible to add logo)
I uploaded OSX installer to GitHub and plan to upload Windows version tomorrow:
https://github.com/da8eat/VideoEditorInstaller/raw/master/AMCDXVideoPatcher.pkg
P.S. It s still in an experimental mode so I would recommend copying a file you try to edit it
I added short Video which demonstrates how it can be used
Prores QUALITY
UPD: ffmpeg builds I shared were added just to show encoder is no a myth, but as FFmpeg (or at least some guys from the community) has something against I had to remove repo…s o all github links below invalid, sorry
In the previous post I forgot to mention the problem I mentioned couple times before – Quality. Its not always easy to detect by eye big difference, but I have some test files where any of ffmpeg prores encoders really fails.
I uploaded one to github if you want to check:
https://github.com/da8eat/ffmpeg_prores_encoder/blob/master/1.bmp
and you can see how badly ffmpeg encodes it if you want Proxy profile:
as you see both looks quite blury (aw looks better but as I said before there is nothing about rate control and aw guarantees nothing except correct bitstream)
Thats how looks same frame encoded with encoder I made:
I uploaded all 3 mov files so you can compare results by yourself:
https://github.com/da8eat/ffmpeg_prores_encoder/blob/master/aw.mov
https://github.com/da8eat/ffmpeg_prores_encoder/blob/master/ks.mov
https://github.com/da8eat/ffmpeg_prores_encoder/blob/master/amcdx.mov
I also do believe you have your own test footage which you want to try encoder with, so I built ffmpeg master branch and added one more Prores Encoder, so you can test and check results . Usage:
https://github.com/da8eat/ffmpeg_prores_encoder/blob/master/build/ffmpeg_win_MSVS2015.7z
https://github.com/da8eat/ffmpeg_prores_encoder/blob/master/build/ffmpeg_osx_clang.7z
ffmpeg.exe -i 1.bmp -c:v prores_amcdx -profile:v 5 -pix_fmt yuv444p12le xq.mov
profiles same as others ffmpeg Prores encoders: 0 – Proxy, 1 – LT, 2 – Standard, 3 – HQ, 4 – 4444, 5 – XQ
supported pixel formats: uyvy422, yuv422p10le, yuv422p12le, yuv444p12le
I do believe my encoder still have some bugs, so If you face any do not hesitate to message me
Prores progress updates
As I got some questions about progress I decided to post some updates and clarifications:
- I succeeded to improve performance so now encoder a bit faster of Apple implementation with identical output (and I still see room for improvements)
- I fixed some minor issues and fully implemented XQ profile
- About 12 bit support: there was a thread in ffmpeg dev list where some core developers were claiming 12-bit Prores is a myth so you know Apple encoder encode all data as 12 bit even if you pass 8-bit uyvy it first converted to 12 bits and encoded after that
- Based on statement (3) I can expose big mistake I made in Cinedeck Prores Insert-Edit. Basically Cinedeck checks some stream parameters to make the decision if input stream should be re-encoded or not before insert. One of them is src pixel format and if input and output has different src pixel formats video gets re-encoded before insert which now i can say is wrong behavior as basically on encoder side its always 12 bit and not src pixel format but chroma subsampling had to be checked
- There is one more util I work on. Its Prores smart transcoder:
Lets say we need to transcode Prores HQ to Prores Proxy, thats how any transcoding app will do it:
1) Decode frame (vlc decode -> dequantize -> inverse dct -> assemble slices to frame buffer
2) Encode (disassemble frame to slices, -> forward dct -> rate control -> quantize -> vlc encode)
From first point of view it looks ok, but from my point of view it should be:
1) vlc decode -> dequantize -> rate control -> quantize -> vlc encode
so basically I got rid of some heavy but useless steps which make transcode almost x2 faster comparing to the classical way
Obviously, it works only if you transcode from Prores to Prores
I`m still quite far to show demo (except some command line applications), but here is priority list:
- Make user friendly UI so it easy to show and use
- Finish MOV parser/muxer (as im not a fan to use FFMPEG for demo)
Reversing ProRes: Part1 (Bitrate)
One of the main problem I met with 3rd parties Prores encoders is bitrate. Approx bitrate could be found in Prores white papers.
But I talk about logic of calculation max possible size. Why max? Because Apple doesnt really care about lower bound, so with black frame as source you will never be even close to bitrate mentioned in white papers.
Basically Apple has simple algorithm and they calc size of frame that encoder never exceed and second seems ideal size to fulfill declared bitrate.
so max/avg size depends on couple input conditions:
- resolution
- quality
- alpha
Alpha case is quite simple and weird same time, if you say to Prores encoder that you going to encode alpha it automatically increase max size by 3* width * height
Main logic is resolution based:
- if resolution less or equal of SD_NTSC its 288 * 1024
- if res less or equal of SD_PAL its 336 * 1024
- so on
that actually was second weird thing I found: the code how its implemented:
int size = width * height; int rate = 0; if (size <= 720 * 486) { rate = 288 * 1024; } else if (size <= 720 * 576) { rate = 336 * 1024; } else if (size <= 960 * 720) { rate = 432 * 1024; } // so on
my first question was “have they ever heard about binary search?” 🙂
Nevertheless when base value found they tune it with respect to quality:
if (qual == proxy) { rate = 13 * rate / 63; } else if (qual == lt) { rate = 13 * rate / 28 } //so on
thats basically it for max frame size. second value which I named avg value calculated even easier we just multiply previously found rate by 8 and divide by 9
https://github.com/da8eat/prores_encoder
P.S. there are also some color space tricks for example when we encode 422 frame to 4444 quality, but I wont cover it as its a bit artificial situation
Reversing Prores – Part0
yes I know ProRes encoder was reversed long time ago, for example there 3 different encoders in ffmpeg, but :
- a) there are several needs which any of ffmpeg version doesnt meet
- b) seems I`m that kind of person who prefer to invent bicycle
so I started to reverse ProRes encoder on my own. there are min and max goals I will try to achieve:
minimum goal is:
- create ProRes encoder that produce correct bitstream (by correct I mean decodeable by most popular ProRes decoders),
- encoded frame size more or less equal to size produced by native Apple encoder
- encoder performs better of ffmpeg/apple versions
maximum goal is:
- encoded frame binary identical to Apple native encoder produce
- encoder performs better of Apple native encoder
so basically maximum goal is to create better version of Apple Prores encoder without source codes 🙂
here in blog I am going to post my progress and thoughts and I think will share code on GitHub