3

I am using the pyav library to read and process video data and as I am reading through the videos I am getting lots (and lots) of the following output.

I am creating the videos by segmenting either a much larger source file or RTSP/HTTP IP camera.

I would love to understand what this output actually means, and what I can do to prevent its output

ffmpeg creating videos:

ffmpeg -y -i https://manifest.googlevideo.com/api/... -pix_fmt yuvj422p -c:v libx264 -an -vf scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease -r 12 -vsync cfr -x264opts keyint=12:min-keyint=12 -f segment -segment_format matroska -segment_time 5 -initial_offset 1656497474.686672 -strftime 1 /tmp/tmp87cc1n2o/%Y-%m-%dT%H%M%S.mkv -loglevel error

python:

container = av.open(io.BytesIO(...))
for frame in container.decode(video=0):
   ...
2022-06-30 14:45:00,964 DEBUG:****:Creating <***.core.generators.av.AVGenerator object at 0x7f13340abd50> with target path: <_io.BytesIO object at 0x7f13341c93b0>
2022-06-30 14:45:00,966 DEBUG:libav.h264:Reinit context to 1280x720, pix_fmt: yuv420p
2022-06-30 14:45:00,966 DEBUG:libav.h264:Reinit context to 1280x720, pix_fmt: yuvj422p
2022-06-30 14:45:00,984 DEBUG:libav.h264:Reinit context to 1280x720, pix_fmt: yuv420p
2022-06-30 14:45:01,045 DEBUG:libav.h264:Reinit context to 1280x720, pix_fmt: yuv420p
2022-06-30 14:45:01,046 DEBUG:libav.h264:Reinit context to 1280x720, pix_fmt: yuvj422p
deprecated pixel format used, make sure you did set range correctly
deprecated pixel format used, make sure you did set range correctly
 (repeated 9 more times)
2022-06-30 14:45:01,194 DEBUG:libav.h264:Reinit context to 1280x720, pix_fmt: yuv420p
deprecated pixel format used, make sure you did set range correctly
deprecated pixel format used, make sure you did set range correctly
2022-06-30 14:45:01,215 DEBUG:libav.h264:Reinit context to 1280x720, pix_fmt: yuv420p
deprecated pixel format used, make sure you did set range correctly
deprecated pixel format used, make sure you did set range correctly
 (repeated 17 more times)
2022-06-30 14:45:01,384 DEBUG:libav.h264:Reinit context to 1280x720, pix_fmt: yuv420p
deprecated pixel format used, make sure you did set range correctly
deprecated pixel format used, make sure you did set range correctly
 (repeated 3 more times)
2022-06-30 14:45:01,398 DEBUG:libav.h264:Reinit context to 1280x720, pix_fmt: yuv420p
deprecated pixel format used, make sure you did set range correctly
deprecated pixel format used, make sure you did set range correctly
 (repeated 22 more times)
2022-06-30 14:45:01,550 DEBUG:libav.h264:Reinit context to 1280x720, pix_fmt: yuv420p
deprecated pixel format used, make sure you did set range correctly
deprecated pixel format used, make sure you did set range correctly
 (repeated 2 more times)
2022-06-30 14:45:01,592 DEBUG:libav.h264:Reinit context to 1280x720, pix_fmt: yuv420p
Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
hi im Bacon
  • 374
  • 1
  • 12
  • 1
    Try replacing `-pix_fmt yuvj422p` with `-pix_fmt yuv420p`. Since you are offering a bounty I would like to try answering. I don't know how do you expect someone to answer the question when all you are posting is the warning messages and `...` in place of the code. Please replace `https://manifest.googlevideo.com/api/...` with something we can use. Please replace the `...` in the Python code with the actual code. Please post a code sample we can execute - before `av.open(io.BytesIO(...))` there should be a code part that fills `BytesIO(...)`... – Rotem May 23 '23 at 19:22
  • question is a year old, bounty is by @user1209675 not by OP, and IDK if that person is following the question at all – Christoph Rackwitz May 26 '23 at 11:43
  • Hey! @Rotem I agree that the question is lacking, I was only looking to understand more at a high level if this was an issue. I will look to expand the question with a runnable example today. – hi im Bacon May 29 '23 at 11:01
  • @hiimBacon That would be great because the bounty expires tomorrow. I don't know why user1209675 decided to place a bounty instead of asking a new question. According to the answer of user1209675, it look's like they are having a problem that is probably unrelated to your question. In case it's too much work, and you no longer care about the issue, you may just leave the question as is. – Rotem May 29 '23 at 11:10

0 Answers0