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

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd February 2015, 05:46   #1  |  Link
flyvholm
Semper Tiro
 
flyvholm's Avatar
 
Join Date: Jan 2015
Location: Denmark
Posts: 29
H.264 playback nightmare

I have a stubborn H.264 playback problem. A friend and I have spent weeks troubleshooting without finding out what's wrong, so it's time to ask the experts for help.

I've produced a film that I'll be offering as digital download. On all devices I've tested things work as expected: Film looks fine, and higher bitrate gives better visual quality.

My friend is in the US, I'm in Denmark. He has been testing the same video files and is seeing the opposite: Higher bitrate gives heavy artifacts. In particular, the noise becomes so ugly that the film isn't presentable at all. This is consistent across a number of HDTVs (he went to a store to try a bunch), either playing back from a USB stick, portable media players or a laptop.

I've tried using Adobe Media Encoder + MainConcept w. various settings (incl. stock settings) and also VirtualDub + x264 + mp4box w. various settings. The above observations have applied regardless what I've tried. The only way we've been able to make the film look decent on HDTVs on his end is by using heavy compression (i.e. 2.5 mbps for 1080p). Apparently this reduces the problem to an acceptable level by simply smearing out the noise. But that certainly doesn't look better on my end, so it's not a solution I'm happy with.

It's quite perplexing that he cannot find any HDTV setup where the film doesn't look horrible at normal bitrates, while I've also tested various HDTV setups and not seen the problem anywhere, using the same video files. So I would very much like to know what results other people are getting. I've compiled two samples for testing, using x264:
High bitrate sample (8mbps)
Low bitrate sample (2.5mbps)

Test results or comments regarding this issue highly appreciated.
flyvholm is offline   Reply With Quote
Old 2nd February 2015, 09:36   #2  |  Link
Dust Signs
Registered User
 
Join Date: Jun 2004
Location: Salzburg, Austria
Posts: 219
Both samples look o.k. for me. What setup(s) is your friend using?

Dust Signs
__________________
The number you dialed is imaginary. Please turn your phone by 90 and try again
Dust Signs is offline   Reply With Quote
Old 2nd February 2015, 11:11   #3  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,496
I'd have him CRC test his download to be sure it isn't corrupted. The file looks fine, and there's no setting that any player should balk on, especially his laptop.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 3rd February 2015, 05:29   #4  |  Link
flyvholm
Semper Tiro
 
flyvholm's Avatar
 
Join Date: Jan 2015
Location: Denmark
Posts: 29
Thanks a lot for your replies and for checking the files.

My friend has been testing playback from 2 Dell laptops (he mentioned they had small, low-quality panels, so probably cheap), two portable players (Patriot Box Office and Micca Speck G2) and directly from USB stick with capable HDTVs. He has tried two Seiki, a Vizio, a large LG, maybe 7 different Samsung HDTVs of varying size/quality, and finally a 4K TV (didn't remember brand). Not all combinations were tested, but suffice it to say, a lot of testing has been done. In all cases the higher bitrate versions show what he calls "crazy speckled noise", seemingly some interplay between camera noise and TV sharpening. When playing back the trailer for the film from Youtube (i.e. recompressed by Youtube, noise smeared out) it looks great, while the original that was uploaded to Youtube shows the awful noise.

File corruption seems unlikely. He has downloaded/tested many samples, and the results are consistent: Everything high bitrate shows the artifacts while the low bitrate samples are much better. He did send a checksum that matched mine, though it was of a low bitrate file.

It's quite frustrating that I can't see the artifacts myself. He is going to see if it's possible to capture them on video. I'm also uploading a Blu-ray image for him to burn and test, which will be interesting.
flyvholm is offline   Reply With Quote
Old 3rd February 2015, 19:49   #5  |  Link
ChiDragon
Registered User
 
ChiDragon's Avatar
 
Join Date: Sep 2005
Location: Vancouver
Posts: 609
Quote:
Originally Posted by flyvholm View Post
In all cases the higher bitrate versions show what he calls "crazy speckled noise", seemingly some interplay between camera noise and TV sharpening.
So then has he tried a TV with sharpness, motion interpolation, etc. etc. "Torch Mode" turned off?
ChiDragon is offline   Reply With Quote
Old 4th February 2015, 02:49   #6  |  Link
flyvholm
Semper Tiro
 
flyvholm's Avatar
 
Join Date: Jan 2015
Location: Denmark
Posts: 29
Yes. Exaggerated saturation/sharpness/contrast will destroy aurora footage in various ways. But the speckled noise ruins the footage even at neutral settings and is particularly sensitive to the sharpness setting. He says he could get rid of it by reducing sharpness to minimum, but then it's quite soft, defeating the purpose of HD (playback from DVD looked better). However, heavy compression smears the noise sufficiently that reasonable sharpness can be maintained without the noise ruining the footage.

He has now tried playback on a 1080p projector (Mitsubishi HC4000) as well. Here the noise wasn't really objectionable unless he cranked the sharpness considerably up from the default neutral setting. He still preferred the heavily compressed version, but now it's more of a subjective preference.

It's hard to believe that none of the variety of HDTVs he has tested can handle the noise you see in the high bitrate sample. Especially because I have also played back aurora footage on a variety of HDTVs without ever encountering the issue. Something's just wrong about this...
flyvholm is offline   Reply With Quote
Old 4th February 2015, 19:05   #7  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,362
Both playback fine on my laptop. The higher bitrate file looks a little better. I can try them when I get home on my HDTV.

What x264 settings are you using? Both streams have artifacts that I don't typically see in H.264 video. Considering how little movement there is in the clip I would expect a 8Mbit/sec encode to look better than yours does.
Stereodude is offline   Reply With Quote
Old 4th February 2015, 20:29   #8  |  Link
flyvholm
Semper Tiro
 
flyvholm's Avatar
 
Join Date: Jan 2015
Location: Denmark
Posts: 29
Test on HDTV would be great since that's where we really run into trouble. Would be good to know brand/model of HDTV. Here are the x264 + mp4box command lines used to create the videos in VirtualDub:
Code:
x264 --bitrate 8000 --pass 1 --stats "%(hostdir)\x264stats.log" --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o NUL -
x264 --bitrate 8000 --pass 2 --stats "%(hostdir)\x264stats.log" --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -
mp4box -add "%(outputname).264" -add "%(outputname).aac" -fps %(fps) "%(outputname)"
The input file is a 1080p Lagarith (lossless) compressed AVI file, no processing in VirtualDub. What artifacts are you seeing?

Last edited by flyvholm; 4th February 2015 at 20:47.
flyvholm is offline   Reply With Quote
Old 4th February 2015, 21:07   #9  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,362
Why aren't you calling x264 from the command line and feeding the AVI directly?

You're missing a lot of the useful tuning encoder parameters.

Assuming you have a 1920x1080 4:2:0 Lagarith source for blu-ray it would be something like this:
Code:
x264 --bitrate XXXXX --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 1 -o out.264 input.avi
x264 --bitrate XXXXX --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 2 -o out.264 input.avi
For a very high quality digital download I'd do something like this:
Code:
x264 --crf 18 --preset veryslow --tune film --vbv-maxrate 50000 --vbv-bufsize 62500 --level 4.1 --keyint 120 --open-gop --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 -o out.264 input.avi
As for the artifacts, there are some sort of blocking artifacts around the letters when they fade in. The clip is also pretty noisy. Have you considering using an AVIsynth filter like MCTD? It works wonders for removing grain and noise from footage and improving compressibility.
Stereodude is offline   Reply With Quote
Old 5th February 2015, 02:10   #10  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,362
I tried both clips on my Samsung HDTV via a USB stick. I didn't notice any unusual problems with the high bitrate clip. The noise is a little less smoothed over in the high bitrate clip though.
Stereodude is offline   Reply With Quote
Old 5th February 2015, 02:10   #11  |  Link
ChiDragon
Registered User
 
ChiDragon's Avatar
 
Join Date: Sep 2005
Location: Vancouver
Posts: 609
Quote:
Originally Posted by flyvholm View Post
He still preferred the heavily compressed version, but now it's more of a subjective preference.

It's hard to believe that none of the variety of HDTVs he has tested can handle the noise you see in the high bitrate sample. Especially because I have also played back aurora footage on a variety of HDTVs without ever encountering the issue.
Perhaps he just hates noise?
ChiDragon is offline   Reply With Quote
Old 5th February 2015, 04:36   #12  |  Link
flyvholm
Semper Tiro
 
flyvholm's Avatar
 
Join Date: Jan 2015
Location: Denmark
Posts: 29
Quote:
Originally Posted by Stereodude View Post
Why aren't you calling x264 from the command line and feeding the AVI directly?
VirtualDub makes a quite effective GUI for this. IMO tidier and decreases risk of errors, but it's a matter of preference.

Quote:
Originally Posted by Stereodude View Post
You're missing a lot of the useful tuning encoder parameters.
Yes. I do use the exact settings you list for my Blu-ray encodes. I can (and will) use better settings for encoding the digital download as you suggest. However, the big question is what bitrate I should go with for the default digital download, considering that my friend cannot even find an HDTV setup that the high bitrate version looks good on (and most end users will be less tech savvy than him).

Quote:
Originally Posted by Stereodude View Post
As for the artifacts, there are some sort of blocking artifacts around the letters when they fade in.
I do see that too, much worse for the low bitrate version.

Quote:
Originally Posted by Stereodude View Post
The clip is also pretty noisy. Have you considering using an AVIsynth filter like MCTD?
It is noisy. I posted a clip without noise removal in order to make the HDTV artifacts obvious in case they occur. I did do some noise removal with frame blending in After Effects. Works quite well, but blurs motion a bit (problematic for stars). I wasn't aware of MCTD and will do some testing. One problem is that the noise removal really should be performed on all the original image sequences (as I do in After Effects). More than 50 timelapse sequences in the film need noise removal, so that's a lot of work.

Quote:
Originally Posted by Stereodude View Post
I tried both clips on my Samsung HDTV via a USB stick. I didn't notice any unusual problems with the high bitrate clip. The noise is a little less smoothed over in the high bitrate clip though.
Thanks a lot, much appreciated. Same result as I've been getting on the setups I've tested.

Quote:
Originally Posted by ChiDragon View Post
Perhaps he just hates noise?
If he didn't before, he does now! But something is definitely going wrong with the HDTV setups, verified by the fact that the noise was ok to him on a 1080p projector. As I write he's trying to see if it's possible to capture the artifacts on video.
flyvholm is offline   Reply With Quote
Old 5th February 2015, 12:04   #13  |  Link
flyvholm
Semper Tiro
 
flyvholm's Avatar
 
Join Date: Jan 2015
Location: Denmark
Posts: 29
So my friend came up with a way to approximately reproduce the HDTV artifacts: The sharpness setting on the VLC player. Crank that up to the 2nd bar and similar artifacts appear. Not only does the noise become much harsher, it also arranges in patchy blocks that change quite artificially. Below are links to a VLC screenshot and a video showing the artifacts up close on an HDTV.

Screenshot of artifacts simulated with VLC
Video showing artifacts on HDTV

If enlarging the screenshot you can see how that noise becomes really ugly on a large screen as the video shows. Like on VLC, minimizing sharpening on the HDTVs can reduce the noise to an acceptable level. Unfortunately, unlike VLC it will make the image very soft. There's no reasonable compromise.

It just seems beyond bad luck that I (or anybody else I've asked to test) have not encountered the issue while it's present on every one of the 10+ HDTVs he has tested. But given the variety of setups he has tested for playback - laptops, USB stick, portable media players, different cables - I really don't know what to blame.
flyvholm is offline   Reply With Quote
Old 5th February 2015, 13:12   #14  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 649
Tbh, for "High bitrate sample (8mbps)" bitrate is way too low, that's why grain looks so bad. Try crf 16..18, and/or proper denoise...

Sharpening is bad and wrong, producing such terrible artifacts is one of the reasons. Disabling it doesn't make image softer, it was soft to begin with. I highly doubt that TV's apply blurring when you turn sharpness down, so it should stay at zero.
If you, as director, believe that your video is soft and you don't like it, then you should apply mild sharpening (after denoise) to your footage.
vivan is offline   Reply With Quote
Old 5th February 2015, 13:28   #15  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,362
Quote:
Originally Posted by flyvholm View Post
So my friend came up with a way to approximately reproduce the HDTV artifacts: The sharpness setting on the VLC player. Crank that up to the 2nd bar and similar artifacts appear. Not only does the noise become much harsher, it also arranges in patchy blocks that change quite artificially. Below are links to a VLC screenshot and a video showing the artifacts up close on an HDTV.

Screenshot of artifacts simulated with VLC
Video showing artifacts on HDTV

If enlarging the screenshot you can see how that noise becomes really ugly on a large screen as the video shows. Like on VLC, minimizing sharpening on the HDTVs can reduce the noise to an acceptable level. Unfortunately, unlike VLC it will make the image very soft. There's no reasonable compromise.

It just seems beyond bad luck that I (or anybody else I've asked to test) have not encountered the issue while it's present on every one of the 10+ HDTVs he has tested. But given the variety of setups he has tested for playback - laptops, USB stick, portable media players, different cables - I really don't know what to blame.
Your VLC screenshot generates a 403.

If sharpening shows the issue, it's not surprising. TVs in stores in the US aren't going to be set up properly, so whatever settings they default to out of the box are used. Generally, the default sharpness settings are much too high.

I have the sharpness on my TV turned down as it should be. Maybe the TVs you've tried have also been setup better with the sharpness turned down.
Stereodude is offline   Reply With Quote
Old 5th February 2015, 16:45   #16  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,650
Quote:
Originally Posted by Stereodude View Post
TVs in stores in the US aren't going to be set up properly, so whatever settings they default to out of the box are used. Generally, the default sharpness settings are much too high.

I have the sharpness on my TV turned down as it should be. Maybe the TVs you've tried have also been setup better with the sharpness turned down.
The point would be valid if the file was designed for a single person.
But since the file was conceived as a "digital download" and the bilk of the population has anyway "tweaked" TV sets (also in Europe, not only in the US ), the problem remains.

Besides, a good source also suffers from "image improvers".
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 6th February 2015, 00:14   #17  |  Link
flyvholm
Semper Tiro
 
flyvholm's Avatar
 
Join Date: Jan 2015
Location: Denmark
Posts: 29
Quote:
Originally Posted by Stereodude View Post
Your VLC screenshot generates a 403.
Oops, sorry. Should be fixed now.

No doubt it's a common problem that default HDTV settings are too aggressive. It's just hard to believe that all the TVs he has tested are not even capable of showing source footage as-is, without applying destructive levels of either sharpening or softening. And particularly hard to believe that a number of different Samsungs would be that poor while Stereodude's happens to be fine.

@Stereodude: What model is your Samsung TV, and are you in the US? Could be interesting in case my friend gets a chance to try the same model.

Are there any differences in specs between HDTVs in EU and US that could be relevant?
flyvholm is offline   Reply With Quote
Old 6th February 2015, 00:32   #18  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,496
If people see sparkly artifacts because they've got their sharpness maxed out, or some other picture processing, I guarantee that they're seeing the same artifacts across everything else they watch anyway, so they'd be used to it. It's not worth worrying about. Most people will make some attempt to fix the factory settings, even if it's from a friend or hired help if they can't.

It's annoying that not only manufacturers, but even retailers like to boost the sharpening, saturation, and motion interpolation to unrealistic levels when they unbox display models.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 6th February 2015, 01:47   #19  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,362
Quote:
Originally Posted by flyvholm View Post
@Stereodude: What model is your Samsung TV, and are you in the US? Could be interesting in case my friend gets a chance to try the same model.
PN64F8500 & yes.

Quote:
Are there any differences in specs between HDTVs in EU and US that could be relevant?
Not that I'm aware of.

I knew enough to turn the sharpness way down.
Stereodude is offline   Reply With Quote
Old 6th February 2015, 01:48   #20  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,362
Quote:
Originally Posted by flyvholm View Post
It is noisy. I posted a clip without noise removal in order to make the HDTV artifacts obvious in case they occur. I did do some noise removal with frame blending in After Effects. Works quite well, but blurs motion a bit (problematic for stars). I wasn't aware of MCTD and will do some testing. One problem is that the noise removal really should be performed on all the original image sequences (as I do in After Effects). More than 50 timelapse sequences in the film need noise removal, so that's a lot of work.
MCTD doesn't blur motion. You should give it a shot. It's very powerful.
Stereodude is offline   Reply With Quote
Reply

Tags
artifacts, hdtv, noise

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 00:04.


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