Hi,

So, here we go again, this time with H.264 and H.265 encoders - hardware-only 
transcode now works :)


An example command line form for hardware transcode is:

./avconv -vaapi_device /dev/dri/renderD128 -hwaccel vaapi 
-hwaccel_output_format vaapi_vld -i in.mp4 -an -vf 
hwupload,scale_vaapi=w=1280:h=720:format=nv12 -c:v vaapi_h264 -g 75 -bf 3 -q 24 
out.mp4

* -vaapi_device sets up the global hardware device to be VAAPI, and once it's 
there -hwaccel_device is not needed.

* The hwupload as the first filter is required because of the reinitialisation 
problem (hwupload is modified to accept and pass through hardware surfaces).

* -g, -bf and -q are the only implemented options on the encoders currently, 
but do work mostly as you'd hope.


Things to do:

* The encoders aren't very clean - memory use suggests they leak somewhat.  I 
haven't really looked at this at all.

* Only fixed-quantisation is supported at the moment, and it uses the same QP 
everywhere.  Bitrate targetting and a more sensible CRF setup would both be 
good.

* H.265 encoder B-frame support isn't quite there - if you have more than one B 
frame in sequence the references are wrong, and the playback I've tried doesn't 
get them in the right order either.

* Frame referencing setup is incomplete - the generic parts allow arbitrary 
referencing but only set up a simple GOP, while the codec-specific parts only 
support the simplest GOP structure.

* avconv setup with hardware devices is unclear.  The context propagation works 
here, but we end still have the single global hardware device reference.

* More codecs should hopefully be addable without too much effort (MJPEG, 
MPEG2, VP8, VP9?).


Thanks,

- Mark
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to