Jump to content
Tuts 4 You

VLC black flash h264 issue


LCF-AT

Recommended Posts

Hi guys,

a while ago I found that the VLC player has a problem to play some h26x encoded video files correctly from the start and does show or flashing  black frames first.So I can see this problem more if I enable the loop mode in VLC.First I thought the video itself is the problem but other players like MPC-HS are playing the same video file correctly without any black flash.On internet I found also some posts about it with the hint to use a other VLC 2.2.0 version what works correctly and dosent show a black flash but I dont wanna use a old VLC version anymore and in the latest version 3.0.8 the problem is still present.So it seems to be a VLC issue or maybe any enabled / disabled VLC setting.My first question in this case would be whether anyone knows how to fix this problem in VLC?

Next I tried to encode small video parts by myself using x264 compression to encode with VirtualDub1 & 2 and I got some diffrent results.

If I am using VD1 to encode with x264 / mpeg-4 I get that black flash in VLC.In VD2 I have a 3 diffrent choices of this x264.All seems to be same only using diffrent driver names / 8 & 10 bit.Now if I encode a video part 3 times using all 3 diffrent x264 and I get one of them working with VLC without to get a black flash and the question is why.I did analyse all 3 video parts with ffmpeg and I got this results out.

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\DM a.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.78.100
  Duration: 00:00:01.06, start: 0.000000, bitrate: 701 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 480x360 [SAR 1:1 DAR 4:3], 450 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 246 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
At least one output file must be specified
-----------------------------------------------------------
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\DM a2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.78.100
  Duration: 00:00:01.06, start: 0.000000, bitrate: 534 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt470bg/unknown/unknown), 480x360 [SAR 1:1 DAR 4:3], 276 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 246 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
At least one output file must be specified
-----------------------------------------------------------
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\DM a3.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.78.100
  Duration: 00:00:01.06, start: 0.000000, bitrate: 536 kb/s
    Stream #0:0(und): Video: h264 (High 10) (avc1 / 0x31637661), yuv420p10le(tv, bt470bg/unknown/unknown), 480x360 [SAR 1:1 DAR 4:3], 279 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 246 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
At least one output file must be specified

The first & second video parts showing that black flash in VLC player and the third video not.So I dont know why VLC does handle them diffrently and I would like to know why and how to fix it in VLC so that all 3 videos gets handled same on playback / loop you know.Maybe anyone does know what the problem is in VLC.Bellow I attached all diffrent 3 video parts (only one second runtime) for testing it etc.Maybe you can check this too in your VLC player to get problem like I get.

DM a.mp4  = shows black flash in VLC not in MPC-HC
DM a2.mp4 = shows black flash in VLC not in MPC-HC
DM a3.mp4 = shows NO black flash in VLC

All 3 video showing also NO black flash in VLC 2.2.0 version (I have test portable version)

Just turn on the loop mode in VLC to see it.

TestVideoSet.rar

greetz

  • Like 1
Link to comment
  • 1 year later...

Hi guys,

just have a new question about a problem when using VLC player (latest version 3.0.12 Vetinari).So I see that I get some crash (VLC just exit) if I try to play some VP9 video files.But somehow it does not happens with all VP9 files just with some and other gets played in VLC.The not playing files getting all played in other players like mpc-be.Seems to be an issue with VLC itsellf.FFmpeg shows this infos about both video streams.

V1_2.png.5bf2c16270dacb374f17dd39de8a0021.png

Input #0, matroska,webm, from 'V1.webm':
  Metadata:
    ENCODER         : Lavf58.38.101
  Duration: 00:00:54.61, start: 0.006000, bitrate: 70 kb/s
    Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv), 936x891, SAR 1:1 DAR 104:99, 5 fps, 5 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ENCODER         : Lavc58.71.100 libvpx-vp9
      DURATION        : 00:00:54.606000000
At least one output file must be specified


Input #0, matroska,webm, from 'V2.webm':
  Metadata:
    ENCODER         : Lavf58.38.101
  Duration: 00:00:28.40, start: 0.000000, bitrate: 159 kb/s
    Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv), 612x424, SAR 1:1 DAR 153:106, 10 fps, 10 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      alpha_mode      : 1
      ENCODER         : Lavc58.71.100 libvpx-vp9
      DURATION        : 00:00:28.400000000
At least one output file must be specified

The first one in the list does crash VLC and the second one runs but both seems to be equal so far.Has anyone a clue why VLC does handle them diffrently?Also Windows player itself does play them correctly and only VLC makes trouble.

greetz

Link to comment

Hi again,

I think I found the reason and its seems to be pretty ridiculous one.

Reason = Used FrameRate of 5. :)

I tried using the same file and changed framerate to 10 using ffmpeg and VLC does play the VP9 file.Then I did re-encode it another time using framerate of 5 and VLC does again just crash.

V2_2021-04-20_003105.png.d8a1ec74d18fca0cf7ce5c4677c7ddb5.png

Both are same files only FrameRate is diffrent.Bellow I did attach the 2 example video files you can maybe check out with your VLC and test whether you get same crash / works results like me. :) Just send feedback and if possible maybe could tell the VLC guys about that bug if you guys get the problem too.

TestVideoUseWithVLC.zip

greetz

Link to comment
10 minutes ago, LCF-AT said:

Just send feedback and if possible maybe could tell the VLC guys about that bug if you guys get the problem too.

VLC2.0.5 - doesn't play either one. I'm guessing no support for webm or VP9.
VLC3.0.8 and 3.0.12 (latest) - crashes on 5fps file, plays 10 fps.

I have absolutely no use for "video" with 5 fps, so I'm not going to bother VLC developers with that.

  • Like 1
Link to comment

Hi,

so bug is bug anyway how you can produce / find it etc.In this case just by using a specific FrameRate with a Specific codec.Other players do work even Windows Player itself and VLC does not play it.So I think the VLC guys would be interested into that bug to find the reason for that issue and to fix it.Of course you don't need to bother or tell them so it was just a suggestion only.Maybe they find it out sooner or later.

PS: Thanks for testing the vids on your side to confirm the bug. :)

greetz

Link to comment
  • 1 month later...
LCF-AT

No. :) I'am too lazy to register first on that page.On sourceforge you don't need to be a member and you can post bugs / requests etc as I did already diffrent times for VD2.

greetz

Link to comment
  • 4 months later...

Hi guys,

I have a new little question about VLC player and diffrent behavior.So can anyone tell me whats the diffrent between playing a 4K video from a local HDD file and playing a same 4K video from somewhere of the internet?I get diffrent playback results in both cases and the strange thing is that I get better results when playing the video from internet and not from local area!=?But why?Normaly I have problems to play 4K videos (specially with 60 FPS) and the video hangs and runs not liquid when I have enabled hardware acceleraor (auo-mode).If I disable it then the videos run fine (liquid) but looking pretty bad quality.Now by random I found out that VLC dosen't make that problem when I play the files from internet.All looks fine and runs liquid.I don't understand why.The settings in VLC are same in both cases.Just wanna ask whether anyone of you who is using VLC does know what the reason could be?Maybe some buffer thing or something?No clue so normaly it should play the file better from local HDD and not from internet (I think).Got anyone the same problem etc?

greetz

Link to comment

I guess it could be that when streaming from the web the decoding is done by a powerful server, which streams the decoded video chunks to you and all your local pc has to do is print them to the screen. while when playing a local file it has to do the heavy 4k  decoding itself.

  • Like 1
Link to comment

Hi deep,

I don't think so because the file comes from just a storage server (raw MP4 file).That makes it so strange you know.I think the problem is VLC itself anyhow.

greetz

Link to comment
3 hours ago, LCF-AT said:

Hi guys,

I have a new little question about VLC player and diffrent behavior.So can anyone tell me whats the diffrent between playing a 4K video from a local HDD file and playing a same 4K video from somewhere of the internet?I get diffrent playback results in both cases and the strange thing is that I get better results when playing the video from internet and not from local area!=?But why?Normaly I have problems to play 4K videos (specially with 60 FPS) and the video hangs and runs not liquid when I have enabled hardware acceleraor (auo-mode).If I disable it then the videos run fine (liquid) but looking pretty bad quality.Now by random I found out that VLC dosen't make that problem when I play the files from internet.All looks fine and runs liquid.I don't understand why.The settings in VLC are same in both cases.Just wanna ask whether anyone of you who is using VLC does know what the reason could be?Maybe some buffer thing or something?No clue so normaly it should play the file better from local HDD and not from internet (I think).Got anyone the same problem etc?

greetz

Hi

Maybe it's because of your hard drive's read speed.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...