Page 1 of 1

VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 17 Oct 2015 11:48
by thoste
Whenever I start watching AVI videos with embedded H.264 video codec the first scene frames are shown only partially.

My interpretation is that these are delta B-frames.

Have a look at the following snapshot to get an impression:

http://www.picfront.org/d/9lfy

After the first full I-frame everything works fine.

On the other hand other video player like MediaPlayer Classic HomeCinema CAN play them successfully from the first moment on.

So this shows that there is a problem in VLC (and not in the video file).

Can I solve it with a special VLC setting?

Thomas

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 26 Jan 2018 14:09
by McLion
Could you solve this?
I'm seeing the same and like to improve this.

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 28 Jan 2018 10:32
by thoste
No, unfortunately not.

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 28 Jan 2018 16:39
by InTheWings
depends on what you expect.
Since the packetizer is in the loop, the first frame is already iframe. I suspect open GOP

see avcodec settings -> show corrupted frames

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 28 Jan 2018 18:51
by thoste
Where do I find excately this preference:

avcodec settings -> show corrupted frames

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 28 Jan 2018 19:31
by InTheWings
doest not exist in 2.2
use Nightly Build of VLC

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 29 Jan 2018 10:11
by McLion
How stable are these nightly builds?
I did not yet test if this solves my issue. However, I'd need this for a system in production / at a customer ... and on a Raspberry.

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 29 Jan 2018 10:31
by InTheWings
Your mux is invalid and should start on iframe.
You have the option of dropping corrupted frames in 3.0, but that's just hiding the issue like other does.

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 29 Jan 2018 10:48
by McLion
I have these issues in an IPTV project - h.264 video, transport is rtp.
The IPTV sources as well as the network are not under my control. Once the stream is playing, there are no issues.

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 29 Jan 2018 10:50
by McLion
I see VLC 3 is in RC state. Is there any expectation regarding a release?
What is VLC 4?

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 29 Jan 2018 10:55
by InTheWings
If you use RTSP as input, this is expected and happens on time synchronization.
Check RTSP sync message in logs.

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 29 Jan 2018 13:24
by McLion
It is h.264 video and AC3 audio in MP2TS, using multicast RTP.
Look here.
There are no RTSP sync messages.
Debug output (level warning):
avcodec warning: threaded frame decoding is not compatible with DXVA2, disabled
ts warning: first packet for pid=145 cc=0xd
ts warning: first packet for pid=146 cc=0x7
ts warning: first packet for pid=144 cc=0xb
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
packetizer_h264 warning: waiting for SPS/PPS
core warning: buffer too late (-130389 us): dropped
core warning: buffer too late (-106389 us): dropped
core warning: buffer too late (-82389 us): dropped
core warning: buffer too late (-64389 us): dropped
packetizer_h264 warning: waiting for SPS/PPS
core warning: playback too late (101583): up-sampling
direct3d warning: trying surface pixel format: YV12
avcodec warning: plane 0 not aligned
avcodec warning: disabling direct rendering
core warning: playback way too late (301311): flushing buffers
core warning: playback way too early (-1042126): playing silence
core warning: playback too late (62690): up-sampling
core warning: playback too early (-47017): down-sampling
core warning: timing screwed (drift: -94890 us): stopping resampling
core warning: playback too early (-91890): down-sampling
core warning: playback way too early (-135487): playing silence
core warning: playback too early (-43183): down-sampling
core warning: picture is too late to be displayed (missing 38 ms)
core warning: picture is too late to be displayed (missing 1078 ms)
core warning: timing screwed (drift: -90732 us): stopping resampling
core warning: playback too early (-85732): down-sampling
core warning: playback way too early (-129117): playing silence
core warning: playback too early (-43024): down-sampling
core warning: timing screwed (drift: -88810 us): stopping resampling
core warning: playback too early (-89789): down-sampling
core warning: playback way too early (-127536): playing silence
core warning: playback too early (-42611): down-sampling
core warning: timing screwed (drift: -91379 us): stopping resampling
core warning: playback too early (-99379): down-sampling
core warning: playback way too early (-140752): playing silence
core warning: playback too early (-42919): down-sampling
core warning: timing screwed (drift: -91128 us): stopping resampling
core warning: playback too early (-92128): down-sampling
core warning: playback way too early (-139664): playing silence
core warning: can't get output picture
core warning: can't get output picture

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 29 Jan 2018 14:22
by InTheWings
remove filters

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 29 Jan 2018 16:15
by McLion
:? sorry, I'm not aware that I have set any ... may I ask you to be a bit more specific :oops:

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 29 Jan 2018 16:30
by InTheWings
dump your file or check yourself if that's opengop

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 31 Jan 2018 12:59
by McLion
dump your file or check yourself if that's opengop
Here's a short recording

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 31 Jan 2018 13:27
by InTheWings
I see no artifact on this. You really have frame drop on that sample?

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 06 Feb 2018 16:37
by McLion
The issue is only visible upon a new start(join) to a stream. Once its playing, it's ok.
You're right, when I play the sample again I also don't see anything at all that's wrong. The recording was taken on an already playing stream with TSreader pro from an in-house transcoder source.
I may need to get a sample from the customers project fur better analysis - see if its open GOP, number of B an P, ..... though I don't have a tool to analyze this stuff.

In one my own transcoders I can set P frames [0..30] and B frames [1..3], as well as the H.264 profile and some more - The other one has no settings.

I still think that the new feature to suppress corrupt frames will help me once VLC3 is released.
Of course, it will take longer to start/show the program, but it will not start with corrupted pictures and even if I can nail the streams they use at the project as the issue, I'll probably don't have a chance to change anything there.

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 06 Feb 2018 16:58
by InTheWings
There's no feature to remove corrupted frames. You can't just start decoding outside of an iframe.

Re: VLC shows at first delta B-frames when playing AVI - Other players work fine!

Posted: 06 Feb 2018 18:22
by McLion
Then I misunderstood the option available in 3 you mentioned earlier: see avcodec settings -> show corrupted frames
As I understood this allows to suppress corrupted frames upon start of a stream (only). If that's wrong, what is the suggestion to not have VLC showing a picture before the picture is OK (see the sample of the OP)?