ffmpeg how to change audio tbn
I changed my video container with:ffmpeg -hide_banner -y -i in.mkv -c copy -video_track_timescale 1k out.mp4
But video_track_timescale only changes video tbn, not audio tbn.
To check it:ffprobe -hide_banner .\in.mkv -read_intervals %+0.3 -show_entries frame=media_type,key_frame,pts,pts_time,pkt_duration,pkt_size -print_format compact
frame|media_type=video|key_frame=1|pts=0|pts_time=0.000000|pkt_duration=16|pkt_size=203501|side_data|
side_data|
frame|media_type=audio|key_frame=1|pts=0|pts_time=0.000000|pkt_duration=N/A|pkt_size=622
frame|media_type=video|key_frame=0|pts=17|pts_time=0.017000|pkt_duration=16|pkt_size=5333
frame|media_type=audio|key_frame=1|pts=21|pts_time=0.021000|pkt_duration=21|pkt_size=551
frame|media_type=video|key_frame=0|pts=33|pts_time=0.033000|pkt_duration=16|pkt_size=1221
frame|media_type=audio|key_frame=1|pts=43|pts_time=0.043000|pkt_duration=21|pkt_size=538
frame|media_type=video|key_frame=0|pts=50|pts_time=0.050000|pkt_duration=16|pkt_size=12132
frame|media_type=audio|key_frame=1|pts=64|pts_time=0.064000|pkt_duration=21|pkt_size=662
ffprobe -hide_banner .\out.mp4 -read_intervals %+0.3 -show_entries frame=media_type,key_frame,pts,pts_time,pkt_duration,pkt_size -print_format compact
frame|media_type=video|key_frame=1|pts=0|pts_time=0.000000|pkt_duration=16|pkt_size=203501|side_data|
side_data|
frame|media_type=audio|key_frame=1|pts=0|pts_time=0.000000|pkt_duration=1024|pkt_size=622
frame|media_type=video|key_frame=0|pts=17|pts_time=0.017000|pkt_duration=16|pkt_size=5333
frame|media_type=audio|key_frame=1|pts=1024|pts_time=0.021333|pkt_duration=1024|pkt_size=551
frame|media_type=video|key_frame=0|pts=33|pts_time=0.033000|pkt_duration=16|pkt_size=1221
frame|media_type=audio|key_frame=1|pts=2048|pts_time=0.042667|pkt_duration=1024|pkt_size=538
frame|media_type=video|key_frame=0|pts=50|pts_time=0.050000|pkt_duration=16|pkt_size=12132
frame|media_type=audio|key_frame=1|pts=3072|pts_time=0.064000|pkt_duration=1024|pkt_size=662
As we can see, in in.mkv, tbn is same for both audio/video aka 1k. But in out.mp4, tbn is different. Video has 1k tbn because I set it with -video_track_timescale, but where’s the similar option for audio?
Read more here: Source link