Log in

View Full Version : reconciling x264 for adobe encore acceptance?


BabaG
29th September 2013, 20:44
trying to get adobe encore to accept x264 generated .264 files and having a lot of trouble, though, making progress.

at first all i got was green frazz in encore. now i can get a running image but it always says it needs to be transcoded. i made an export from premiere which was accepted by encore without transcoding but it looks terrible. i figured i could use it to compare and try to reconcile the files.

first, this is the code i ran in x264:x264 --bluray-compat --bitrate 22000 --preset veryslow --weightp 0 /
--bframes 3 --nal-hrd vbr --vbv-maxrate 40000 --vbv-bufsize 30000 /
--level 4.1 --fps 24000/1001 --keyint 24 --b-pyramid strict --slices 4 /
--fake-interlaced --aud --colorprim "bt709" --transfer "bt709" /
--colormatrix "bt709" --sar 1:1 --ref 4 --qpmin 4 --pass 1 -o output.264 /
input.mov /
&& /
x264 --bluray-compat --bitrate 22000 --preset veryslow --weightp 0 /
--bframes 3 --nal-hrd vbr --vbv-maxrate 40000 --vbv-bufsize 30000 /
--level 4.1 --fps 24000/1001 --keyint 24 --b-pyramid strict --slices 4 /
--fake-interlaced --aud --colorprim "bt709" --transfer "bt709" /
--colormatrix "bt709" --sar 1:1 --ref 4 --qpmin 4 --pass 2 -o output.264 input.mov
i tried wrapping the .264 into an mp4 but that also needs transcoding according to encore.

i notice that premiere exported an m4v rather than an mp4. i used mp4boxGUI to create the mp4. i didn't see an option to make an m4v. not sure if that woould affect the import to encore, though. would still be good to know how to get that, though, instead of the mp4, just in case.

the next thing i have is a comparison of the two files from mediainfo. this is the m4v from premiere:General
Complete name : Sequence 01.m4v
Format : AVC
Format/Info : Advanced Video Codec
File size : 2.12 GiB
Overall bit rate mode : Variable

Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Format settings, GOP : M=3, N=18
Bit rate mode : Variable
Maximum bit rate : 22.5 Mbps
Width : 1 440 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive

and this is the info from the .264:General
Complete name : x264_Test-11_08bit.264
Format : AVC
Format/Info : Advanced Video Codec
File size : 3.55 GiB
Overall bit rate mode : Variable

Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Bit rate mode : Variable
Bit rate : 22.0 Mbps
Maximum bit rate : 40.0 Mbps
Width : 1 440 pixels
Height : 1 080 pixels
Display aspect ratio : 4:3
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.590
Writing library : x264 core 133 r2334 a3ac64b
Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh /
subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 /
8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 /
lookahead_threads=1 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=fake /
bluray_compat=1 / constrained_intra=0 / bframes=3 / b_pyramid=1 / b_adapt=2 / b_bias=0 /
direct=3 / weightb=1 / open_gop=0 / weightp=0 / keyint=24 / keyint_min=1 / scenecut=40 /
intra_refresh=0 / rc_lookahead=24 / rc=2pass / mbtree=1 / bitrate=22000 / ratetol=1.0 / qcomp=0.60 /
qpmin=4 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=40000 /
vbv_bufsize=30000 / nal_hrd=vbr / ip_ratio=1.40 / aq=1:1.00
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709


the things i notice here are:

format settings, gop
max bitrate
dar
bitrate
standard

these all differ between the two analyses. how can i bring the .264 into line with the m4v? what are the settings that would accomplish this?

and, lastly, the following lines are in the .264 analysis but not in the m4v:Bits/(Pixel*Frame) : 0.590
Writing library : x264 core 133 r2334 a3ac64b
Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh /
subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 /
8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 /
lookahead_threads=1 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=fake /
bluray_compat=1 / constrained_intra=0 / bframes=3 / b_pyramid=1 / b_adapt=2 / b_bias=0 /
direct=3 / weightb=1 / open_gop=0 / weightp=0 / keyint=24 / keyint_min=1 / scenecut=40 /
intra_refresh=0 / rc_lookahead=24 / rc=2pass / mbtree=1 / bitrate=22000 / ratetol=1.0 / qcomp=0.60 /
qpmin=4 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=40000 /
vbv_bufsize=30000 / nal_hrd=vbr / ip_ratio=1.40 / aq=1:1.00
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

not sure what to do in that regard, if anything.

thanks for any help on this, i'm kind of getting out of my depth, here,
BabaG

Sharc
29th September 2013, 22:53
I am not familiar with Premiere and Encore, but firstly make sure to produce a blu-ray compliant encode with x264.
- 1440x1080 at sar 1:1 is non-compliant.
=> Make it 1920x1080 for 16:9 e.g. by adding borders if your source is 4:3
- --fake-interlaced at framerate 23.976 is non-compliant
=> remove --fake-interlaced

A comprehensive overwiew of legal blu-ray settings are found here (http://forum.doom9.org/showthread.php?p=1399419#post1399419)with examples here (http://www.x264bluray.com/home/1080i-p).
Do not use anything beyond, or any editing or authoring tool may complain.

P.S.
Is your source interlaced? Mind uploading a short sample?

BabaG
1st October 2013, 07:13
thanks for the tips Sharc. sorry to have been slow. router died
and am working to get up again. also car troubles so things have
been a bit crazy. on the other hand, i put your suggestions into
my script and have decided to get very methodical about it all.

i generated a couple of test clips, about 30sec each, one 16x9
with pillars, the other native 4x3 without pillars. i've been making
small changes to the script and running x264 so i can see which
changes get me closer and which don't.

in looking for clues i noticed that the file exported from premiere
by the adobe suite seems to be squeezed with pillars added. it
looks like it is taking the native 4x3 ratio and cramming the
content into that. it must be adding info to display it stretched
to 16x9. mediainfo does say the display is listed as 16x9.
obviously, it would be better to take control of that process to
eliminate the squeezing and stretching.

to your question about interlacing: no, this is all progressive
material. the files are pretty big. how would i upload a sample
and how much would you want? the 25-30sec tests are running
near 500MB.

i read in a thread on the adobe site where someone had a
problem where they would test a short sample and would get it
to work but, when the full piece was run, it would revert to all
of the poster's original problems.

thanks again,
BabaG

Sharc
1st October 2013, 19:12
in looking for clues i noticed that the file exported from premiere by the adobe suite seems to be squeezed with pillars added.

What is your playback device? Did you force the playback to 4:3 with the pillars added? Apparently MediaInfo reported the DAR 16:9 which is correct and as expected. So I suspect something is wrong with your playback settings.

A 1 ... 2 seconds sample is sufficient. You can upload e.g. to FileDropper (http://www.filedropper.com/).

As I said I can't help with Adobe. If you suspect problems there you may want to skip Adobe and create an .m2ts or Blu-Ray structure with tsMuxeR and check the result.

BabaG
1st October 2013, 19:34
thanks so much for your help in this Sharc.

i actually was able to get a couple of files to be accepted by
encore this morning, thanks largely to your suggestions. i do
need to use encore as it makes a lot of things easier. i'm
working on video for installation art and things like setting a
video to loop endlessly for gallery display are dead easy in
encore. it's an unusual enough request, though, that i
wouldn't even now where to begin asking how to do it with
something like tsMuxeR or others i've looked at.

i think there were probably two things that mainly made it
work: pillarboxing the original before transcoding and getting
rid of the fake-interlaced option. i also added --tune film. it
worked with or without that.

here are the two scripts that worked:x264 --bluray-compat --bitrate 22000 --preset veryslow --weightp 0 /
--bframes 3 --nal-hrd vbr --vbv-maxrate 40000 /
--vbv-bufsize 30000 --level 4.1 --fps 24000/1001 /
--keyint 24 --b-pyramid strict --slices 4 --aud /
--colorprim "bt709" --transfer "bt709" --colormatrix "bt709" /
--sar 1:1 --ref 4 --qpmin 4 --pass 1 -o output_file.264 /
input_16x9_ProResHQ.mov /
&& /
x264 --bluray-compat --bitrate 22000 --preset veryslow /
--weightp 0 --bframes 3 --nal-hrd vbr --vbv-maxrate 40000 /
--vbv-bufsize 30000 --level 4.1 --fps 24000/1001 /
--keyint 24 --b-pyramid strict --slices 4 --aud /
--colorprim "bt709" --transfer "bt709" --colormatrix "bt709" /
--sar 1:1 --ref 4 --qpmin 4 --pass 2 -o output_file.264 /
input_16x9_ProResHQ.mov

and with --tune film:x264 --bluray-compat --bitrate 22000 --preset veryslow --tune film --weightp 0 /
--bframes 3 --nal-hrd vbr --vbv-maxrate 40000 /
--vbv-bufsize 30000 --level 4.1 --fps 24000/1001 /
--keyint 24 --b-pyramid strict --slices 4 --aud /
--colorprim "bt709" --transfer "bt709" --colormatrix "bt709" /
--sar 1:1 --ref 4 --qpmin 4 --pass 1 -o output_file.264 /input_16x9_ProResHQ.mov /
&& /
x264 --bluray-compat --bitrate 22000 --preset veryslow /
--tune film --weightp 0 --bframes 3 --nal-hrd vbr /
--vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 /
--fps 24000/1001 --keyint 24 --b-pyramid strict --slices 4 /
--aud --colorprim "bt709" --transfer "bt709" /
--colormatrix "bt709" --sar 1:1 --ref 4 --qpmin 4 --pass 2 /
-o output_file.264 input_16x9_ProResHQ.mov

thanks again, so much. next step is trying it on the full piece,
then getting the transcode to work under linux.

BabaG

Sharc
1st October 2013, 22:16
Nice to see you succeed.
Any good reason why you set --qpmin 4? I would remove this (which leaves it with the default --qpmin 0).

BabaG
1st October 2013, 23:51
thanks, Sharc. i think that option is residue from someplace that had info on quicktime compatibility. since things are working {trying a full length transcode tonight) i think i'll leave it and deal with any issues later.

thanks again. much appreciated.
BabaG