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

ffmpeg vmaf skipping some frames towards the end randomly #1400

Open
tarun-discovery opened this issue Jan 23, 2025 · 3 comments
Open

ffmpeg vmaf skipping some frames towards the end randomly #1400

tarun-discovery opened this issue Jan 23, 2025 · 3 comments

Comments

@tarun-discovery
Copy link

tarun-discovery commented Jan 23, 2025

I am using following command
ffmpeg -i transcodedA.mp4 -i sourceA.mxf -filter_complex "[0:v][1:v]scale2ref=flags=bicubic[encoded][source];[source]format=pix_fmts=yuv420p,setpts=PTS-STARTPTS[source2];[encoded]setpts=PTS-STARTPTS[encoded1];[encoded1][source2]libvmaf=feature='name=psnr|name=float_ssim|name=float_ms_ssim':n_threads=4:log_fmt=json:log_path=A10-20.json" -f null -

The same command when I run again, the vmaf differs slightly in decimals and some times even by 1%
When I checked deeper by comparing frame level metrics, I noticed following

  • both source and transcoded videos have 480 frame count and same fps
  • In output frame level metrics one of the execution returned last frame no. as 459, while other as 447. I have attached both files in this ticket.
    Note: vmaf and other metrics were consistent till frame no. 447. So that means it was delta of frames that caused difference in final vmaf.

I do not understand why in both execution frame count didnt went till 480?
Why in both execution end frame count is different. Is it a bug in vmaf lib?

ffmpeg version: n7.0.1
vmaf: v2.3.1

@XuShiSheng
Copy link
Contributor

XuShiSheng commented Jan 23, 2025 via email

@tarun-discovery
Copy link
Author

Also when running in debug mode I see following output. If you see Input shows 480 packets read, but output says 466 frames encoded

[vist#0:0/hevc @ 0xaaaafeb531c0] [dec:hevc @ 0xaaaafeb4fc60] Decoder returned EOF, finishing [vist#0:0/hevc @ 0xaaaafeb531c0] [dec:hevc @ 0xaaaafeb4fc60] Terminating thread with return code 0 (success) [fc#0 @ 0xaaaafeb392e0] Filtering thread received EOF [vost#0:0/wrapped_avframe @ 0xaaaafeb82320] Encoder thread received EOF [vost#0:0/wrapped_avframe @ 0xaaaafeb82320] Terminating thread with return code 0 (success) [out#0/null @ 0xaaaafeb49940] All streams finished [out#0/null @ 0xaaaafeb49940] Terminating thread with return code 0 (success) [Parsed_libvmaf_6 @ 0xffff74003690] VMAF score: 69.094762 [fc#0 @ 0xaaaafeb392e0] Terminating thread with return code 0 (success) [out#0/null @ 0xaaaafeb49940] Output file #0 (pipe:): [out#0/null @ 0xaaaafeb49940] Output stream #0:0 (video): 466 frames encoded; 466 packets muxed (205040 bytes); [out#0/null @ 0xaaaafeb49940] Total: 466 packets (205040 bytes) muxed [out#0/null @ 0xaaaafeb49940] video:200KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown frame= 466 fps=9.2 q=-0.0 Lsize=N/A time=00:00:19.39 bitrate=N/A speed=0.384x [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0xaaaafeb3a150] Input file #0 (transcoded.mp4): [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0xaaaafeb3a150] Input stream #0:0 (video): 480 packets read (2731626 bytes); 474 frames decoded; 0 decode errors; [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0xaaaafeb3a150] Total: 480 packets (2731626 bytes) demuxed [AVIOContext @ 0xaaaafeb496a0] Statistics: 2764518 bytes read, 2 seeks [in#1/mxf @ 0xaaaafeb3a2a0] Input file #1 (winning.mxf): [in#1/mxf @ 0xaaaafeb3a2a0] Input stream #1:0 (video): 480 packets read (511717252 bytes); 480 frames decoded; 0 decode errors; [in#1/mxf @ 0xaaaafeb3a2a0] Total: 480 packets (511717252 bytes) demuxed [AVIOContext @ 0xaaaafeb44c30] Statistics: 512219859 bytes read, 6 seeks

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

No branches or pull requests

2 participants