[FFmpeg-devel] Concatenate NAL units in av_write_frame call

Andriy Gelman andriy.gelman at gmail.com
Thu Apr 11 06:00:55 EEST 2019


Hello, 

I've been working with HEVC + mpegts at low bitrates 10-20kbps. 

At these bitrates, mpegts can create a substantial overhead due
to the 188 byte frame size (i.e. a NAL unit of 200 bytes will get
rounded up to 376 bytes).  

I've tried to get around this by concatenating multiple NAL units into a single
call to av_write_frame.  

This seems to work; the parser in av_read_frame outputs separate NAL
units. The only issue is that only the first NAL unit of the super packet has
the correct time stamp. The subsequent timestamps are AV_NOPTS_VALUE. 

Would it be of interest to community for me to: 
1. Fix the AV_NOPTS_VALUE issue
2. Add option to concatenate multiple NAL units in single call to av_write_frame

Andriy


More information about the ffmpeg-devel mailing list