How to set sample_aspect_ratio while muxing a video stream?

265 views Asked by At

I am trying to mux a video stream and an audio stream into an mp4 file, whereas the target file has an inappropriate sar (unlike the source one).

The following methods don't make any sense. 1、Using avcodec_copy_context(). It cannot set the target sar as the source.

2、Setting sar directly of the target stream. The target sar is not the one I've set in the video stream before writeHeader.

The version I used is 2.8.1.

0

There are 0 answers