Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exported video 2 frames missing #1350

Closed
jacob-resch opened this issue Mar 10, 2025 · 2 comments
Closed

Exported video 2 frames missing #1350

jacob-resch opened this issue Mar 10, 2025 · 2 comments
Labels
duplicate This issue or pull request already exists state:Done This issue has been resolved/dismissed type:Bug Something isn't working

Comments

@jacob-resch
Copy link

Something weird is probably happening with the encoder because the exported video is missing 2 frames.

From media info this is the codec information of the original

General
Complete name : 20250307_0124_Loop Video_loop_01jnpzt0dkfkpre012tnzskr5v.mp4
Format : MPEG-4
Format profile : Base Media
File size : 5.66 MiB
Duration : 9 s 600 ms
Overall bit rate : 4 949 kb/s
Frame rate : 30.000 FPS
Writing application : Lavf60.16.100
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High
Format level : 3.2
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : avc1
Duration : 9 s 600 ms
Bit rate : 4 933 kb/s
Width : 480 pixels
Height : 854 pixels
Display aspect ratio : 0.562
Frame rate mode : Constant
Frame rate : 30.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.401
Stream size : 5.64 MiB (100%)
Writing library : x264 core 164 r3108 31e19f9
Encoding settings : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=27 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=crf / mbtree=1 / crf=12.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=10000 / vbv_bufsize=20000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Codec configuration box : avcC

And this is the new realsrgan exported version

General
Complete name : 20250307_0124_Loop Video_loop_01jnpzt0dkfkpre012tnzskr5v.realesrgan.mp4
Format : MPEG-4
Format profile : Base Media
File size : 33.6 MiB
Duration : 9 s 534 ms
Overall bit rate : 29.5 Mb/s
Frame rate : 30.000 FPS
Writing application : Lavf61.7.100
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High
Format level : 5.1
Format settings, CABAC : Yes
Format settings, Reference frames : 5 frames
Codec ID : avc1
Duration : 9 s 534 ms
Bit rate : 29.5 Mb/s
Width : 1 920 pixels
Height : 3 416 pixels
Display aspect ratio : 0.562
Frame rate mode : Constant
Frame rate : 30.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.150
Stream size : 33.6 MiB (100%)
Writing library : x264 core 164 r3192 c24e06c
Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=18 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Codec configuration box : avcC

Notice that the duration of the realsrgan is slightly shorter.

What is the reason for this ?

@jacob-resch jacob-resch added the type:Bug Something isn't working label Mar 10, 2025
@github-actions github-actions bot added the state:Backlog This issue will be worked on in the future label Mar 10, 2025
@jacob-resch
Copy link
Author

When adjusting the input video to exactly 10s at 30fps the output is correct. So maybe there is like a rounding error or something that messes it up if it's an uneven number maybe

@k4yt3x
Copy link
Owner

k4yt3x commented Mar 11, 2025

This is a duplicate of #1318

@k4yt3x k4yt3x closed this as completed Mar 11, 2025
@k4yt3x k4yt3x added the duplicate This issue or pull request already exists label Mar 11, 2025
@github-actions github-actions bot added state:Done This issue has been resolved/dismissed and removed state:Backlog This issue will be worked on in the future labels Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists state:Done This issue has been resolved/dismissed type:Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants