0

I need to find a way or code that can combine multiple slices (NAL units) into a single slice per video frame

I have some clips. Most of their frames are encoded with multiple slices per frame using H.264 but it triggers some problems on our decoders, which we can't change or modify but the decoder works fine if it's a single slice per frame. I tried FFmpeg to combine multiple slices into one but I hadn't found any way to do that.

Can anybody suggest something to do that? It would be best if there are some code that can do that, like open sources.

Thanks

LuLuGaGa
  • 13,089
  • 6
  • 49
  • 57
Ben
  • 1
  • 1

1 Answers1

1

You can't do this without reencoding so you will need another decoder which doesn't have problems with multiple slices per frame.

nobody555
  • 2,239
  • 18
  • 18
  • In theory, is it possible to glue slices into one without reencoding? That is, just remove start code, headers, etc and then put encoded contents together to form a big one slice? If not possible, what's the main obstacle? I'm not very familiar with bitstream syntax parsing – Ben Aug 23 '19 at 22:42
  • 1
    No, it is mostly impossible due cabac context state, different qp_delta state and deblocking at slice edges. – nobody555 Aug 24 '19 at 05:44