walksnail-osd-tool
walksnail-osd-tool copied to clipboard
[Fix] Encoding result video with the same time scale as original
Problem
Encoded videos with osd has different time scale values, this results problem when you trying to concatenate 2 mp4 video without re-enconding with ffmpeg. See refence on stackoverflow
Before
ffprobe -hide_banner AvatarG0000.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'AvatarG0000.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 2000-03-16T04:00:29.000000Z
encoder : Lavf58.76.100
Duration: 00:01:03.27, start: 0.000000, bitrate: 30815 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m, progressive), 1280x720, 30813 kb/s, 60 fps, 60 tbr, 90k tbn (default)
Metadata:
creation_time : 2000-03-16T04:00:29.000000Z
handler_name : VideoHandler
vendor_id : [0][0][0][0]
ffprobe -hide_banner AvatarG0000_with_osd.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'AvatarG0000_with_osd.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf61.2.100
Duration: 00:01:03.27, start: 0.000000, bitrate: 41639 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, 41633 kb/s, 60 fps, 60 tbr, 15360 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : Lavc61.4.100 libx264
Original tbn: 90k With OSD tbn: 15360
After
>ffprobe -hide_banner AvatarG0000_with_osd.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'AvatarG0000_with_osd.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf61.2.100
Duration: 00:01:03.27, start: 0.000000, bitrate: 41639 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, 41633 kb/s, 60 fps, 60 tbr, 90k tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : Lavc61.4.100 libx264
With OSD tbn: 90k
Reviewer
@avsaase