Skip to content

Could not find codec parameters for stream 0 (Video: h264, none): unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options #1154

@kkangshen

Description

@kkangshen

IMPORTANT: Be sure to replace all template sections {{ like this }} or your issue may be discarded.

Overview

{{ A clear and concise description of your problem. }}

Occurs when using pyav to parse H264 data 。
Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

Expected behavior

{{ A clear and concise description of what you expected to happen. }}

` container = av.open(rawFrames, format='h264', mode='r')
original_codec_ctx = container.streams.video[0].codec_context
codec = av.codec.CodecContext.create(original_codec_ctx.name, 'r')

  pts_offset = None
  got_key_frame = False

  for inf ,packet in enumerate(container.demux()):
      frames = codec.decode(packet)

`

Actual behavior

{{ A clear and concise description of what actually happened. }}

Traceback:

{{ Include complete tracebacks if there are any exceptions. }}

Investigation

{{ What you tried so far to fix your problem. }}

Research

I have done the following:

Additional context

{{ Add any other context about the problem here. }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions