-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Describe the bug
The same ffmpeg command produces slightly different pixel data when executed in a WebAssembly (WASM) environment versus the binary executable.
- WASM Output:
[57, 87, 77, 46, 47, 57, 48, 62, 65, 42, ...] - Binary Output:
[58, 88, 78, 47, 49, 58, 50, 63, 66, 43, ...]
This inconsistency is observed in the output of a rawvideo file using the gray pixel format.
To Reproduce
Run the following command in both the WASM and binary environments:
ffmpeg -i input_file.mp4 \
-vf "crop=in_w*0.6:in_h*0.6:in_w*0.2:in_h*0.2,format=gray,scale=32:32" \
-f rawvideo -pix_fmt gray gray.raw- Replace
input_file.mp4with any valid input file. - Compare the pixel data in the resulting
gray.rawfile from both environments.
Expected behavior
The pixel data in the rawvideo output (gray.raw) should be identical between the WASM and binary environments, as the same command is used with the same input file.
Desktop
- OS: Windows
- Browser (for WASM): Chrome
- Browser Version: 115
- FFmpeg Binary Version: 5.12, 7.1
- FFmpeg WASM Version: 0.11.6, 0.12.15
Additional context
- The issue is reproducible across multiple versions of both the WASM and binary implementations.
- The input file remains consistent during testing.
- It is unclear if this discrepancy arises from rounding, floating-point precision differences, or another internal factor.
Metadata
Metadata
Assignees
Labels
No labels