View Full Version : x264 lossless (or nearly lossless) settings for Adobe software
vampiredom
4th December 2011, 02:51
I like the idea of using x264 for lossless or nearly lossless encoding of sources processed in AviSynth for later use in Premiere and After Effects. However, I have yet to find a setting that yields a such a file that can be imported successfully. Does anyone know of settings that would be appropriate for this?
Motenai Yoda
4th December 2011, 03:56
i notice, for Adobe sw, that rgb encodings importing are faster than yv12 ones, so imho lagarith (rgb 24/32bit) do this work right.
vampiredom
4th December 2011, 08:13
Thanks for the reply, and you are correct for the most part. Lagarith and Ut do work quite well; especially in After Effects, which is an RGB program through-and-through. They edit nicely in Premiere also. Since CS5, Premiere is also much native YUV functionality (in fact, it seems to handle LAGS YV12 very nicely). It also has a lot of H.264 support (because of AVCHD camcorders, etc.) so I am wondering if there is a way to make some kind of AVC Intra lossless/virtually lossless that Premiere can parse. Using x264 --qp 0 is no good, as Premiere cannot understand files that have been generated this way. Perhaps there are other setting which could conform compatibility, which was the reason for my question. I am hoping to benefit from the more efficient H.264 compression, as compared to the much larger lossless AVIs.
Asmodian
4th December 2011, 13:06
I think the H.264 support that Premiere has does not include lossless mode, my understanding is that this is normal - no camcorder is going to use lossless mode after all. ;)
Just use a very low crf (will it import --crf 1 ?) but it will be lossy compaired to UT or lagarith.
vampiredom
4th December 2011, 21:10
Just use a very low crf (will it import --crf 1 ?) but it will be lossy compaired to UT or lagarith.
Nope. I am wondering if it is not crf value itself that is the issue rather than some other parameter. I have tried a few --level settings (3.1, 4, 4.1) with no luck either.
Sometimes the video will cause a failure on import (like, "The file is damaged or unsupported") while other times it imports but all the frames appear 100% green in Premiere.
LoRd_MuldeR
4th December 2011, 21:22
Well, true "lossless" mode, as implemented by x264, requires the "High 4:4:4" Profile. Adobe's H.264 decoder probably doesn't support that profile.
Also when using something like "--crf 1" you are likely to get a very high bitrate. So the resulting stream may easily come out at some Level that isn't supported by the decoder.
However, as far as I know, the Level's usually are not a problem with pure software decoders. But you never know. Their decoder may be picky...
vampiredom
4th December 2011, 22:08
Their decoder may be picky...
I would expect no less from Adobe. They tend to support what they support, if you know what I mean.
It's kind of a shame: Even the --crf 0 and --crf 1 options tend to produce significantly smaller files than Lagarith. And, since the world is essentially going H.264 across the board, it would be kind of nice to leave AVI files behind.
LoRd_MuldeR
4th December 2011, 22:19
You might try something like "--crf 12", which still should be (extremely close to) "visually lossless" quality, but come out at a much lower bitrate.
Or you might use Premiere with Avisynth input. I don't use Premier, but I know that an Avisynth plugins exists:
* http://neuron2.net/www.math.berkeley.edu/benrg/avisynth-premiere.html
* http://urchin.earth.li/~tomford/avisynth/
This way you should be able to decode the input with FFmpegSource2, which uses the libavcodec H.264 decoder and thus supports almost everything :)
A very simplistic AVS script should be sufficient:
FFVideoSource("C:\Path to your input\source.mkv")
vampiredom
5th December 2011, 21:12
Or you might use Premiere with Avisynth input. I don't use Premier, but I know that an Avisynth plugins exists:
I used to use that with some success (and some crashes and slowness once in a while, too). I actually used it more to import to After Effects than Premiere: It was really handy for doing KeyLight chroma keying on denoised/deinterlaced AviSynth output -> AE -> Lagarith -> Premiere. I do not like losing real-time editing performance in Premiere with the .avs scripts, so I prefer a "flattened" AVI-or-whatever solution anyway.
However, with CS5, everything is 64-bit so those plugins do not work anymore. (and the neuron2 plugin there has not worked for a long time, I believe, as it was written for older versions of both AviSynth and Premiere).
You might try something like "--crf 12", which still should be (extremely close to) "visually lossless" quality, but come out at a much lower bitrate.
Thanks for your suggestion. It has inspired a "eureka" moment for me ... No, it did not work :) But, yes, (since it damn well should have worked) it caused me to rethink the problem: It is not so much the compression settings as the container. I did get this to work by muxing it into an .mp4 file! I now need to retest and determine exactly which --crf and --qp options ARE readable by Premiere. This could be good stuff.
One issue/question (and I know this has been discussed on here but I never really found an answer to my satisfaction): When I mux the file with mp4box, the framerate defaults to 25 fps. I understand that I can use, for example, mp4box -fps 29.97, but I wonder:
… if there is a way for x264 to write the header in a different way so that mp4box can correctly determine the framerate.
… if there is some (easy) automated way to pre-determine the correct framerate and pass this programmatically to mp4box, so that I can use the same process for files with different framerates without having to manually specify fps
… if there is an alternate muxer that, unlike mp4box, correctly interprets the fps of x264 raw streams in cases like this.
** EDIT ** OK, duh … answered my own question x264 --force-cfr
Overdrive80
12th December 2011, 23:40
Visit http://forum.doom9.org/showthread.php?t=133313&highlight=pismo, you can load avs file in premiere cs5.5 or above.
Bye
Zarxrax
16th December 2011, 01:37
I did some testing in the past about x264 loading into premiere. I believe you need to set it to use only keyframes (--keyint 1, i think), and also it does not support lossless, but you can use qp 1.
I also find that premiere usually interprets the fps of the file incorrectly, so its necessary to manually set it through "interpret footage"
duartix
9th January 2012, 16:43
I've made a quick and dirty test and I've managed to get crf 1.1 to load in both After Effects and Premiere CS 5.5. I didn't check the audio or any deep scrubbing but I think I remember the first few frames as being black (yup, I used b-frame compression)
CRF 1.1 was the same size as CRF 2 at ~30MB, ultrafast was twice the size at ~60MB, and LAGS was about 90MB. I can't remember the original size of the MTS
Another strange thing that happened is that both AE and Premiere loaded MTS files from my Panasonic GH2 before and now both are refusing to do it (same files). I guess the fact that I have a unstable CS 5.5 install might have a lot to do with this... :(
Zarxrax
10th January 2012, 22:15
You've gotta use all keyframes, or premiere will screw it all up when you start making edits.
smok3
10th January 2012, 22:28
in premiere cs 5.5 (on osx) was possible to edit 1920x1080 avc stuff directly from canon 7D (not exactly smooth, but bearable), so maybe that could be a starting point for a cool preset.
/Volumes/raid0/mvi_2330.mov
General
Complete name : /Volumes/raid0/mvi_2330.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt
File size : 75.8 MiB
Duration : 15s 600ms
Overall bit rate : 40.8 Mbps
Encoded date : UTC 2010-10-09 16:18:54
Tagged date : UTC 2010-10-09 16:18:54
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L5.0
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Format settings, GOP : M=1, N=12
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 15s 600ms
Bit rate : 39.2 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Original height : 1 088 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.757
Stream size : 72.9 MiB (96%)
Language : English
Encoded date : UTC 2010-10-09 16:18:54
Tagged date : UTC 2010-10-09 16:18:54
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Audio
ID : 2
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : sowt
Duration : 15s 600ms
Bit rate mode : Constant
Bit rate : 1 536 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Stream size : 2.86 MiB (4%)
Language : English
Encoded date : UTC 2010-10-09 16:18:54
Tagged date : UTC 2010-10-09 16:18:54
----------------------------------
droped files:
/Volumes/raid0/mvi_2330.mov
----------------------------------
MediaInfo Command line,
MediaInfoLib - v0.7.51
so it looks pretty basic, but that wasnt really fast, so...
kolak
4th February 2012, 22:22
I like the idea of using x264 for lossless or nearly lossless encoding of sources processed in AviSynth for later use in Premiere and After Effects. However, I have yet to find a setting that yields a such a file that can be imported successfully. Does anyone know of settings that would be appropriate for this?
Use UtVideo codec- lossless and fastest codec on earth. This is best choice specially for editing software or AE.
PCU
27th January 2022, 11:14
I like the idea of using x264 for lossless or nearly lossless encoding of sources processed in AviSynth for later use in Premiere and After Effects. However, I have yet to find a setting that yields a such a file that can be imported successfully. Does anyone know of settings that would be appropriate for this?
Download this plugin (Voukoder) for Adobe Premiere Pro:
Voukoder
Use the best encoders available in your favorite NLE.
What is the Voukoder?
Voukoder is system wide video- and audio encoding service for Windows that improves your media encoding experience. It supports various encoders (both CPU and GPU based) and also provides a set of post processing filters. Currently supported are:
• DaVinci Resolve 17
• Adobe Premiere (CS6 and later)
• Adobe Media Encoder (CS6 and later)
• Adobe After Effects (CC 2015 and later)
• VEGAS Pro 12-19
• VirtualDub2
Voukoder is incredibly fast! If you have a video card with hardware encoding capabilities you could get an encoding speed of 4-8 times faster than in real time (depending on your project).
Download & Install
You will find all required installation packages in the download menu at the top.
1. the First download and install the main "Voukoder" application
2. Next download and install the "Connector plugin" for your favorite video editing application
Main plugin:
https://github.com/Vouk/voukoder/releases/download/10.2/voukoder-10.2.msi
Connector:
PP/AME:
https://github.com/Vouk/voukoder-connectors/blob/master/premiere/premiere-connector-1.10.0.msi?raw=true
AE:
https://github.com/Vouk/voukoder-connectors/blob/master/aftereffects/aftereffects-connector-0.10.0.msi?raw=true
g0ren
16th February 2022, 02:04
There are some new plug-ins for Premiere that are worth a look. After Codecs adds a x264/x265 encoder for export. Influx adds import support for FFV1 and other codecs. I bring these plug-ins up because Voukoder is Windows only, while the Autokroma plug-ins are cross platform for Windows and Mac.
https://www.autokroma.com
huhn
23rd February 2022, 02:21
the thread is over 10 years old.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.