Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > NLE - Non Linear Editing

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th December 2011, 02:51   #1  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
x264 lossless (or nearly lossless) settings for Adobe software

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?
vampiredom is offline   Reply With Quote
Old 4th December 2011, 03:56   #2  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
i notice, for Adobe sw, that rgb encodings importing are faster than yv12 ones, so imho lagarith (rgb 24/32bit) do this work right.
__________________
powered by Google Translator

Last edited by Motenai Yoda; 4th December 2011 at 21:29.
Motenai Yoda is offline   Reply With Quote
Old 4th December 2011, 08:13   #3  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
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.
vampiredom is offline   Reply With Quote
Old 4th December 2011, 13:06   #4  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,414
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.
Asmodian is offline   Reply With Quote
Old 4th December 2011, 21:10   #5  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
Quote:
Originally Posted by Asmodian View Post
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.
vampiredom is offline   Reply With Quote
Old 4th December 2011, 21:22   #6  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,249
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...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 4th December 2011 at 21:32.
LoRd_MuldeR is offline   Reply With Quote
Old 4th December 2011, 22:08   #7  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
Quote:
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.
vampiredom is offline   Reply With Quote
Old 4th December 2011, 22:19   #8  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,249
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...-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:
Code:
FFVideoSource("C:\Path to your input\source.mkv")
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 4th December 2011 at 22:21.
LoRd_MuldeR is offline   Reply With Quote
Old 5th December 2011, 21:12   #9  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
Quote:
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).

Quote:
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:
  1. … if there is a way for x264 to write the header in a different way so that mp4box can correctly determine the framerate.
  2. … 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
  3. … 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

Last edited by vampiredom; 5th December 2011 at 21:37.
vampiredom is offline   Reply With Quote
Old 12th December 2011, 23:40   #10  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
Visit http://forum.doom9.org/showthread.ph...ighlight=pismo, you can load avs file in premiere cs5.5 or above.

Bye
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite
Overdrive80 is offline   Reply With Quote
Old 16th December 2011, 01:37   #11  |  Link
Zarxrax
Registered User
 
Join Date: Dec 2001
Posts: 1,223
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"
Zarxrax is offline   Reply With Quote
Old 9th January 2012, 16:43   #12  |  Link
duartix
Registered User
 
Join Date: Oct 2001
Location: Outside the Bush INSanatory - Lisbon
Posts: 330
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...
duartix is offline   Reply With Quote
Old 10th January 2012, 22:15   #13  |  Link
Zarxrax
Registered User
 
Join Date: Dec 2001
Posts: 1,223
You've gotta use all keyframes, or premiere will screw it all up when you start making edits.
Zarxrax is offline   Reply With Quote
Old 10th January 2012, 22:28   #14  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
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.

Code:
/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...
__________________
certain other member
smok3 is offline   Reply With Quote
Old 4th February 2012, 22:22   #15  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,844
Quote:
Originally Posted by vampiredom View Post
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.
kolak is offline   Reply With Quote
Old 27th January 2022, 11:14   #16  |  Link
PCU
Registered User
 
Join Date: Oct 2017
Posts: 327
Quote:
Originally Posted by vampiredom View Post
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/rel...koder-10.2.msi

Connector:

PP/AME:
https://github.com/Vouk/voukoder-con...0.msi?raw=true

AE:
https://github.com/Vouk/voukoder-con...0.msi?raw=true
PCU is offline   Reply With Quote
Old 16th February 2022, 02:04   #17  |  Link
g0ren
Registered User
 
Join Date: Jul 2018
Posts: 5
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
g0ren is offline   Reply With Quote
Old 23rd February 2022, 02:21   #18  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,993
the thread is over 10 years old.
huhn is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.