Log in

View Full Version : Why different videosource produces different encoded .264 file?


cagali
16th November 2014, 15:23
Here are 2 avs files, one using ffms2, one using lsmash.
I added imagewriter to the end of both files to write the first 50 frames. The md5 of the same frame from both avs are the same.

Then I use this 2 avs files to encode with x264-10bit.
The 2 encoded .264 files have almost the same size and same "encoding setting" in mediainfo.
But when I check the screens from them again, they are different.

Why is this so? Maybe because the actual output colorspace, fps, etc from 2 avs files are different?
Please suggest some improvement to the avs file, or which videosource is better for avc input clips?
Thank you.

avs file 1:
LoadPlugin("E:\testbed\bench\10bit\LSMASH\AviSynth\LSMASHSource.dll")
LWLibavVideoSource("00006.track_4113 cut mkv.mkv",format="YUV420P8")

avs file2:
LoadPlugin("D:\Program Files\MeGUI_2106_x86\tools\ffms\ffms2.dll")
FFVideoSource("E:\testbed\bench\10bit\00006.track_4113 cut mkv.mkv", threads=1)

Here are the versions:
L-SMASH-Works-r729-20141025-32bit
FFMS2 2.19 20130917

TheFluff
16th November 2014, 15:43
The FFMS2 avisynth plugin truncates 10-bit input to 8-bit because Avisynth doesn't support 10-bit. If you want the stacked hack you've got to use a patched version.

cagali
16th November 2014, 15:49
The FFMS2 avisynth plugin truncates 10-bit input to 8-bit because Avisynth doesn't support 10-bit. If you want the stacked hack you've got to use a patched version.

Thanks for reply.
The clip that I use for both avs is actually a small section from a BD m2ts, should be yuv420 8-bit bt.709.

TheFluff
16th November 2014, 16:06
I misunderstood your post then. The stacked=true parameter for lwlibavvideosource is somewhat confusing.

Reel.Deel
16th November 2014, 16:13
@cagali

Try using LWLibavVideoSource("00006.track_4113 cut mkv.mkv"), since the source is already 8-bit YV12 there's no need for format="YUV420P8" and stacked=true. I don't know if it solves your problem but it's worth a shot.

cagali
16th November 2014, 16:13
I misunderstood your post then. The stacked=true parameter for lwlibavvideosource is somewhat confusing.

Yea. Sorry for that. :)

StainlessS
16th November 2014, 16:14
is somewhat confusing.

as is this

FFVideoSource("E:\testbed\bench\10bit\00006.track_4113 cut mkv.mkv", threads=1)

cagali
16th November 2014, 16:32
@cagali

Try using LWLibavVideoSource("00006.track_4113 cut mkv.mkv"), since the source is already 8-bit YV12 there's no need for format="YUV420P8" and stacked=true. I don't know if it solves your problem but it's worth a shot.

Thanks. I just tried again with your suggestion.
The new encoded .264 files has the same md5 as the old one, using lsmash. :P

Reel.Deel
16th November 2014, 17:01
Here are the versions:
L-SMASH-Works-r729-20141025-32bit
FFMS2 2.19 20130917

Have you tried using FFMS2 v2.20 (https://github.com/FFMS/ffms2/releases)?

cagali
16th November 2014, 18:22
Have you tried using FFMS2 v2.20 (https://github.com/FFMS/ffms2/releases)?

Yea. Just tried after your reply.

There are some changes in 2.20.
https://github.com/FFMS/ffms2/releases

I downloaded ffms2-2.20-msvc.
The encoded file is the same as the one with 2.19.