![]() ![]() for exampleįfmpeg -i in.mp4 -f mpegts -muxrate 4000K -y out.mp4Īlso for checking it you can use MediaInfo ![]() You should change your video format to "mpegts" and set "-muxrate" parameter to bitrate that you want. Roughly, your CBR value should be near the peak bitrate of the source video to maintain source quality (not accounting for the inevitable degradation due to lossy recompression).Īlso, -preset veryfast makes x264 not as optimal in achieving the best quality for a given bitrate, so increase the bitrate even more, or drop the preset.įinally, command syntax is ffmpeg -i in -c:v libx264 -x264-params "nal-hrd=cbr" -b:v -bufsize out.mp4 ![]() By forcing a constant bitrate of the same value as the average bitrate of the source, the encoder will wastefully use bits for the simpler scenes, but more importantly, apply greater compression to the complex scenes to keep to the CBR ceiling. In the source file, even though the average bitrate is the same, there will be more bits allocated to complex scenes and fewer to simpler ones. nal-hrd also requires setting vbv-bufsize. ( ISO/IEC 14496-15 - Carriage of network abstraction layer (NAL) unit structured video in the ISO base media file format)Īs you can see in my example the output is MPEG-TS which uses Annex B. Present in the file format stored stream. Filler Data NAL units and Filler Data SEI messages shall not be Video data is naturally represented as variable bit rate in the file format and should beįilled for transmission if needed. You should not use nal-hrd cbr with mp4 because the avcc format used in MP4 doesn't support filler data. I'm the author of the blog post you linked. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |