openh264
openh264 copied to clipboard
I'm using ffmpeg5.1+openh264-2.3.0 to create a SVC video, but ffplay can't play encoded video.
- I'm add some code to enable multi spatial layer before
InitializeExt(s->encoder, ¶m)in libopenh264enc.c , if not add this code , it's can play, but has't multi spatial layer:
param.sSpatialLayers[0].uiProfileIdc = PRO_BASELINE;
param.iSpatialLayerNum++;
param.sSpatialLayers[1] = param.sSpatialLayers[0];
param.sSpatialLayers[1].uiProfileIdc = PRO_SCALABLE_BASELINE;
// param.sSpatialLayers[0].iSpatialBitrate = 50 * 1024 * 8;
// param.sSpatialLayers[0].iVideoWidth /= 2;
// param.sSpatialLayers[0].iVideoHeight /= 2;
// param.sSpatialLayers[0].iSpatialBitrate = 50 * 1024 * 8;
param.iTargetBitrate += param.sSpatialLayers[0].iSpatialBitrate;
ffmpeg original source code: original source
- this is encode command and output:
> ./build/ffplay ../test/out.mp4 -vcodec libopenh264 -loglevel 564
- this is ffplay command and output:
> ./build/ffplay ../test/out.mp4 -vcodec libopenh264 -loglevel 564
Openh264 decoder can support only one-layer decoding rather than multi-layer bitstream from very early start. There needs to be an additional extractor to get one specific layer to make it work.
Openh264 decoder can support only one-layer decoding rather than multi-layer bitstream from very early start. There needs to be an additional extractor to get one specific layer to make it work. Dear, what's the point of openh264/svc encoding if decoder only support one-layer decoding rather than multi-layer bitstream?