leandromoreira / ffmpeg-libav-tutorial

FFmpeg libav tutorial - learn how media works from basic to transmuxing, transcoding and more. Translations: πŸ‡ΊπŸ‡Έ πŸ‡¨πŸ‡³ πŸ‡°πŸ‡· πŸ‡ͺπŸ‡Έ πŸ‡»πŸ‡³ πŸ‡§πŸ‡·
https://github.com/leandromoreira/ffmpeg-libav-tutorial
BSD 3-Clause "New" or "Revised" License
9.78k stars 937 forks source link

When avformat_write_header() it's called the time base of the video stream changes #100

Closed LentilStew closed 2 years ago

LentilStew commented 2 years ago

Hi!. I'm making my own transcoder, when I transcode a video the output file framerate is lower, I took the transcoder in here as example, after debugging, I found that after avformat_write_header() the time base of the video stream in the encoder changes from 1/60 to 1/15360 but in my transcoder it changes from 1/60 to 1/44100, what does the avformat_write_header() function take to change the time base. The audio sample rate is the correct one.