[FFmpeg-devel] H.264 "shallow" recoding

Vladislav Gelfer vgelfer at gmail.com
Fri May 19 20:32:19 EEST 2017


Hi All.

I'm working on a (sort of a) VOIP application for mobile with video
support. Most of modern smartphones are equipped with hardware H.264
encoder/decoder. However most of those support only a limited number of
encoding profiles. In particular I'm interested in SVC, which is not
supported usually. The simplest solution would be to use a software
encoder. But, obviously, it has its drawback.

Recently an idea came to me to create a hybrid hardware+software encoder.
Which consists of a hardware encoder, and a "shallow software recoder".

I know (in very general terms) that H.264 works in term of a macroblocks.
The encoded stream contains instructions for macroblocks: either full
retransmit (in a form of jpeg-like data), its motion parameters, or just
nothing.

A full software recoding would process such an encoded stream,
parse/realize it, and execute on its image data, then encode the resulting
image, which includes processing each macroblock, decision on strategy,
building motion vectors, and, finally, encoding all the instructions.

The idea is to do a "shallow" recoding. I though about parsing an incoming
encoded stream, but instead of executing its instructions - just use them
as a source for encoder, i.e. encode them within H.264 sophisticated
encoding scheme, with the needed precision (i.e. bitrate) and etc, without
actually analyzing the image, finding motion vectors and etc.

In essense, it's using decoder+encoder, but with a shortcut, so that the
actual image is not created by the decoder, and not analyzed by the encoder.

Does this sounds feasible? Was there an attempt to do something similar?

Thanks in advance.


More information about the ffmpeg-devel mailing list