mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.4k stars 2.91k forks source link

overlay-add not displaying an image properly #14784

Closed ValGitCode closed 2 weeks ago

ValGitCode commented 2 months ago

mpv Information

mpv v0.37.0-337-gbd5b80ba2c Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Feb 17 2024 14:33:58
libplacebo version: v6.338.0-77-g3ba18d5d
FFmpeg version: N-113670-g0895ef0d6d
FFmpeg library versions:
   libavutil       58.39.100
   libavcodec      60.39.101
   libavformat     60.21.100
   libswscale      7.6.100
   libavfilter     9.17.100
   libswresample   4.13.100

Other Information

- macOS version:
macOS 14.3 (23D56)

- Source of mpv:
https://github.com/mpv-player/mpv.git

- Introduced in version:

Reproduction Steps

using a lua script to display an overlay using overlay-add:

mp.command_native({'overlay-add', 1, 100, 150, '/Users/user1/image.bmp', 0, "bgra", 156, 232, 624 ,45, 63})

Expected Behavior

Display an overlay with the proper image

Actual Behavior

I am using several image types which support bgra, but they all have issues. the images are of the same size so the params are the same. With .png and .tga the player crashes, with .tiff or .exr the images are smudged. With .bmp the image is upside down and the colors are wrong

Log File

`------------------------------------- Translated Report (Full Report Below)

Process: mpv [25207] Path: /Users/USER/*/mpv Identifier: mpv Version: ??? Code Type: X86-64 (Translated) Parent Process: zsh [822] Responsible: Terminal [653] User ID: 505

Date/Time: 2024-09-02 14:18:40.1984 -0700 OS Version: macOS 14.3 (23D56) Report Version: 12

Time Awake Since Boot: 1100000 seconds Time Since Wake: 6699 seconds

System Integrity Protection: enabled

Notes: PC register does not match crashing frame (0x0 vs 0x7FF800B43A3C)

Crashed Thread: 14 */ltag

Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: FS pagein error: 22 Invalid argument Exception Codes: 0x000000000000000a, 0x000000014227d000

Termination Reason: Namespace SIGNAL, Code 10 Bus error: 10 Terminating Process: exc handler [25207]

VM Region Info: 0x14227d000 is in 0x142275000-0x142299000; bytes after start: 32768 bytes before end: 114687 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL Rosetta Generic 142274000-142275000 [ 4K] rw-/rwx SM=PRV
---> mapped file 142275000-142299000 [ 144K] r--/r-x SM=PRV ...t_id=4ac16f47 GAP OF 0xc5e3f000 BYTES __TEXT 2080d8000-208178000 [ 640K] r-x/r-x SM=COW /usr/lib/dyld

Error Formulating Crash Report: PC register does not match crashing frame (0x0 vs 0x7FF800B43A3C)

Kernel Triage: CL - (arg = 0x0) cluster_pagein past EOF VM - (arg = 0x0) Filesystem pagein returned an error in vnode_pagein VM - (arg = 0x0) Page has error bit set`

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

po5 commented 2 months ago

It takes in raw bgra with no header.

ValGitCode commented 2 months ago

@po5 thanks, how do I get a raw bgra? Are there any samples anywhere or how can I convert another format to bgra?

ValGitCode commented 1 month ago

is there an update on this one? what is the "priority:ignored-issue-template"?

Akemi commented 3 weeks ago

works as intended for me.

test png: test converted with ffmpeg -v verbose -i test.png -pix_fmt bgra -f rawvideo test.bgra: test.bgra.zip

added n overlay-add 1 100 150 "test.bgra" 0 "bgra" 166 74 664 1660 740 to my input.conf for testing.

looks like this:

Screenshot 2024-10-13 at 14 17 26
Akemi commented 2 weeks ago

closing since answered. if the problem still persists please open a new issue or discussion.