openh264 icon indicating copy to clipboard operation
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.

Open wmlgl opened this issue 3 years ago • 2 comments

  1. I'm add some code to enable multi spatial layer before InitializeExt(s->encoder, &param) 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

  1. this is encode command and output:
>  ./build/ffplay ../test/out.mp4 -vcodec libopenh264  -loglevel 564

output log link

  1. this is ffplay command and output:
>  ./build/ffplay ../test/out.mp4 -vcodec libopenh264  -loglevel 564

output log link

wmlgl avatar Sep 16 '22 11:09 wmlgl

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.

huili2 avatar Nov 28 '22 02:11 huili2

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?

shitizenlism avatar Nov 12 '23 06:11 shitizenlism