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 > Video Encoding > MPEG-4 AVC / H.264
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th January 2011, 03:00   #1  |  Link
radius
Guest
 
Posts: n/a
x264 and 2nd pass artifacts

Hi,

I'm facing a new problem when encoding blu-ray compatible x264 stuff, I can get the stream to mux on scenarist now but there are artifacts at different places on the video like this (resized for convenience):



This screenshot is from the beginning of the video (it starts at frame 102) so I could see it easily, I tried various decoders to confirm the problem is on the encoded video,
Then I tried :
- encoding the whole video (170975 frames) multiple times and changing some settings in 2 passes but I always get the artifacts approximately at the same place,
- encoding the first 500 frames (tried 10000 too) in 2 passes and there's no problem this time
- encoding the first 500 frames (the second pass only) using the whole video 1st pass stats file and I get the artifacts again

So it seems there's something bad on the stats file when I encode the whole thing :/

Here is the last test command line I used :
x264 --bitrate 20000 --preset fast --tune film --weightp 1 --bframes 3 --nal-hrd vbr --vbv-maxrate 35000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --b-pyramid strict --slices 4 --aud --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 1 --fps 24000/1001 --force-cfr --stats filmc.stats --output out.264 video.avs

As for the qpfile, the 1st chapter only starts at frame 9521

Here are some of the files :
blocky video (cut from the whole file) : http://r4di.us/temp/outblocky.264
corresponding stats file (maybe from another of the bad encodes) : http://r4di.us/temp/filmblocky.stats

stats file from a 10000 frames encode without problem : http://r4di.us/temp/filmok.stats

Could someone help with this ?
  Reply With Quote
Old 14th January 2011, 03:35   #2  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Looks like a source problem. Not related to x264.
Dark Shikari is offline   Reply With Quote
Old 14th January 2011, 04:38   #3  |  Link
radius
Guest
 
Posts: n/a
Yep i thought about that too but when I play the avs there's no problem and if I encode only a small part of it there's no problem too,
could you think about a way to check if the source / avs is the problem ?
  Reply With Quote
Old 14th January 2011, 05:44   #4  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
Quote:
encoding the first 500 frames (the second pass only) using the whole video 1st pass stats file and I get the artifacts again
If I'm reading this correctly, we should be able to reproduce this issue with your stats file and the 500 frame sample, correct?

Derek
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 14th January 2011, 15:56   #5  |  Link
7ekno
Guest
 
Posts: n/a
Content of the AVS script?

7ek
  Reply With Quote
Old 14th January 2011, 16:24   #6  |  Link
radius
Guest
 
Posts: n/a
Quote:
Originally Posted by Blue_MiSfit View Post
If I'm reading this correctly, we should be able to reproduce this issue with your stats file and the 500 frame sample, correct?

Derek
Yep, if you want to give it a try, here's a zip containing :
- a .m2ts cut from the 10 first seconds of the original source
- the stats files (the mbtree was 2GB so i cut 40MB from the start, it seems it still works)
- the .avs file loading the .m2ts
- the .bat file with the 2nd pass command line
- the x264 binary (win32)

URL : http://r4di.us/temp/x264stuff.zip (66MB)

With those files I could not reproduce the same blocky thing like in the snapshot above but looks like some frames are skipped at the place,
I'll try with other stats file if needed,
Btw when I check the output file from the 1st pass I can't see the problem happen (at the beginning of the video at least) only the 2nd pass has it

Last edited by radius; 14th January 2011 at 18:41.
  Reply With Quote
Old 14th January 2011, 16:25   #7  |  Link
radius
Guest
 
Posts: n/a
Quote:
Originally Posted by 7ekno View Post
Content of the AVS script?

7ek
this :
DirectShowSource("original.m2ts", fps=23.976, audio=false)
  Reply With Quote
Old 15th January 2011, 00:01   #8  |  Link
radius
Guest
 
Posts: n/a
I've been encoding cuts of the video like this :

- 50000 first frames -> no artifacts
- 100000 first frames -> no artifacts
- 150000 first frames -> no artifacts
- 170900 first frames -> this one as artifacts

the movie is 170975 so the last encode only misses only a couple of seconds, i guess it's not really related with x264 but I don't get why the full and near full encodes could make the rest of the video corrupted :/ ...
  Reply With Quote
Old 15th January 2011, 03:27   #9  |  Link
7ekno
Guest
 
Posts: n/a
Quote:
Originally Posted by radius View Post
this :
DirectShowSource("original.m2ts", fps=23.976, audio=false)
There's ya problem

Use FFMS2, DGSource (after indexing) or DSS2 and problem will vanish

Tek
  Reply With Quote
Old 15th January 2011, 08:03   #10  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
Indeed. The problem may very well lie in the decoding.
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 15th January 2011, 17:19   #11  |  Link
radius
Guest
 
Posts: n/a
Quote:
Originally Posted by 7ekno View Post
There's ya problem

Use FFMS2, DGSource (after indexing) or DSS2 and problem will vanish

Tek
Hi,

just tested using dds2 this way :

LoadPlugin("C:\Program Files (x86)\Haali\MatroskaSplitter\avss.dll")
DSS2("U:\Bad Boys 1995 Bluray 1080p AVC DTS-HD MA5.1-CHDBits\BDMV\STREAM\00011.m2ts", fps=23.976)

I'm still getting the problem at the same place :/
should I test the other methods ?
  Reply With Quote
Old 15th January 2011, 21:04   #12  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by radius View Post
I'm still getting the problem at the same place :/
should I test the other methods ?
DSS2 is still using the same decoder as DSS. Try FFmpegSource.
nm is offline   Reply With Quote
Old 16th January 2011, 08:16   #13  |  Link
7ekno
Guest
 
Posts: n/a
Quote:
Originally Posted by radius View Post
-CHDBits
Am guessing that's enough to get the thread closed ...

But in follow-up, DSS2 will indeed use the same decoder as DSS, so should limit resolution attempts to FFMS2 / DGSource as source filters ...

Am guessing it's Windows 7 without the Media Foundation Bypass Tool being deployed ...

7ek
  Reply With Quote
Old 16th January 2011, 13:46   #14  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by radius View Post
LoadPlugin("C:\Program Files (x86)\Haali\MatroskaSplitter\avss.dll")
DSS2("U:\Bad Boys 1995 Bluray 1080p AVC DTS-HD MA5.1-CHDBits\BDMV\STREAM\00011.m2ts", fps=23.976)
Where do you have that file from ???
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 17th January 2011, 13:59   #15  |  Link
radius
Guest
 
Posts: n/a
My bad, it's just a copy / paste found when searching for usage of DSS2 with avisynth
Btw I did not disable Media Foundation as said 7ekno.

I just encoded using x264 (from http://x264.nl/) with the internal ffms decoder using directly my .m2ts file as input,
It encoded without the artifact error, could you tell if it's OK to encode using the embedded decoder or should I always use avisynth ?
  Reply With Quote
Old 17th January 2011, 14:24   #16  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by radius View Post
could you tell if it's OK to encode using the embedded decoder or should I always use avisynth ?
AviSynth is only needed for advanced filtering and editing. If you have a nice progressive source and don't want to denoise, x264's internal decoders and filtering system are fine.

Last edited by nm; 17th January 2011 at 14:26.
nm is offline   Reply With Quote
Old 18th January 2011, 17:21   #17  |  Link
radius
Guest
 
Posts: n/a
Thanks,
I can't understand why the artefacts only appear on the 2nd pass when using ddshow but I can live with it
As x264 internal decoders is OK I'll just not use avisynth (with ddshow) anymore.
Thanks you guys for your help
  Reply With Quote
Old 18th January 2011, 21:53   #18  |  Link
HowlerX
My iPod was a gift!
 
Join Date: Aug 2006
Posts: 57
I've seen similar corrupted video frames recently and I don't even encode such large files. I just encoded some TV shows to my iPod with the latest MeGUI which contains the latest x264 and started seeing this recently. When going back to the older version of x264 (r1649) everything looks and plays back perfectly.
HowlerX is offline   Reply With Quote
Old 18th January 2011, 22:03   #19  |  Link
TheRyuu
warpsharpened
 
Join Date: Feb 2007
Posts: 787
Try using one of the dgdecode avisynth plugins with BD stuff. dss2, ffms2, lavf (through x264) can all cause corruption like that with that kind of source.
TheRyuu is offline   Reply With Quote
Old 18th January 2011, 22:25   #20  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by TheRyuu View Post
dss2, ffms2, lavf (through x264) can all cause corruption like that with that kind of source.
At least lavf can also be fixed if you provide a clip for reproducing the issue.
nm is offline   Reply With Quote
Reply


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 07:55.


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