openh264 icon indicating copy to clipboard operation
openh264 copied to clipboard

encoder bug? encoded output become gray after 1-2 hours

Open jim12345 opened this issue 11 years ago • 5 comments

Hi. After 1-2 hours sometimes the h264 output become gray - it is hard to explain how it looks so i attached screenshot. It keeps like that until I stop the encoding. What can cause this issue? Bug in the encoder? Please look in the attached image.

Thanks! image1-1

jim12345 avatar Dec 20 '14 18:12 jim12345

Packets in IDR lost, error concealment for now used the grey pixels for lost area in I frame. In the next release, we will do copy from previous frame for IDR error concealment.

From: jim12345 <[email protected]mailto:[email protected]> Reply-To: cisco/openh264 <[email protected]mailto:[email protected]> Date: Saturday, December 20, 2014 at 10:21 AM To: cisco/openh264 <[email protected]mailto:[email protected]> Subject: [openh264] encoder bug? encoded output become gray after 1-2 hours (#1658)

Hi. After 1-2 hours sometimes the h264 output become gray - it is hard to explain how it looks so i attached screenshot. It keeps like that until I stop the encoding. What can cause this issue? Bug in the encoder? Please look in the attached image.

Thanks! [image1-1]https://cloud.githubusercontent.com/assets/7906839/5515834/b630200a-8885-11e4-9efd-1e71357c2c11.JPG

— Reply to this email directly or view it on GitHubhttps://github.com/cisco/openh264/issues/1658.

rzhangma avatar Dec 20 '14 20:12 rzhangma

Thanks, 2 questions about your answer:

  1. Can i detect in my code that IDR Packets have lost and then to restart the encoder? If yes, how can i detect the IDR packet lose?
  2. In next version, when you fix this, will your fix make the output image (after idr packet lost) as if this IDR packets lost has never happen (so no fix from my code is needed), or your fix will do some semi fix and output will not be as good as it was before the IDR packet lost

jim12345 avatar Dec 20 '14 22:12 jim12345

Hi, Jim, Does your encoder changes resolution during encoding? Which EC method did you set? For 2): You can set EC method to ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE, use: int32_t iErrorConMethod = (int32_t) ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE; pDecoder->SetOption (DECODER_OPTION_ERROR_CON_IDC, &iErrorConMethod);

dongzha avatar Dec 22 '14 02:12 dongzha

Thanks dongzha My encoder does not change resolution during encoding (when resolution change needed, i delete the encoder and re create it).

I looked in openh264 help file and i only see EC method for decoder and not for encoder. (I do not have any control over the decoder - it is 3rd party decoder).

Still my 2 questions remains:

  1. Can i detect in my code that IDR Packets have lost and then to restart the encoder? If yes, how can i detect the IDR packet lose?
  2. In next version, when you fix this, will your fix make the output image (after idr packet lost) as if this IDR packets lost has never happen (so no fix from my code is needed), or your fix will do some semi fix and output will not be as good as it was before the IDR packet lost

jim12345 avatar Dec 22 '14 23:12 jim12345

  1. Someone know if this issue got resolved in new versions?
  2. when new binaries will be created? the one here : https://github.com/cisco/openh264/releases is 1.5 years old...

Benc1900 avatar Dec 21 '21 18:12 Benc1900