Skip to content

[Fix] Encoding result video with the same time scale as original#47

Open
X-Stuff wants to merge 1 commit intoavsaase:masterfrom
X-Stuff:fix-correct-tbn
Open

[Fix] Encoding result video with the same time scale as original#47
X-Stuff wants to merge 1 commit intoavsaase:masterfrom
X-Stuff:fix-correct-tbn

Conversation

@X-Stuff
Copy link

@X-Stuff X-Stuff commented Apr 16, 2024

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

This allows to concatenate splitted parts without errors
@avsaase
Copy link
Owner

avsaase commented Aug 21, 2024

Hi @X-Stuff, sorry for taking to long for getting to this PR. I just merged another PR which created a conflict with this one. Can you rebase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants