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

Fix video snapshots saving #702

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

andrey-utkin
Copy link
Contributor

@andrey-utkin andrey-utkin commented Oct 10, 2024

media_writer::scale_frame() converts the frame to a JPEG-compatible pixel format, but it doesn't carry over all the frame metadata like format, and picture dimensions. This is the apparent reason why video snapshots don't work. This problem has been reported by many users after the 3.1.2 release, which brought the upgrade of bundled ffmpeg to 6.1.1 from 4.2.1.

This change has been tested.

The problem shows up in the log like this:

I(1/camera_name): Making a snapshot
E(1/camera_name): avcodec_send_frame: snapshot encoding failed: Invalid argument
E(1/camera_name): failed to write snapshot frame
E(1/camera_name): Feeding snapshot decoder failed
E(1/camera_name): Failed to make snapshot

media_writer::scale_frame() converts the frame to a JPEG-compatible
pixel format, but it doesn't carry over all the frame metadata like
format, and picture dimensions. This is the apparent reason why video
snapshots don't work. This problem has been reported by many users after
the 3.1.2 release, which brought the upgrade of bundled ffmpeg to
6.1.1 from 4.2.1.

This change has been tested.

The problem shows up in the log like this:

    I(1/camera_name): Making a snapshot
    E(1/camera_name): avcodec_send_frame: snapshot encoding failed: Invalid argument
    E(1/camera_name): failed to write snapshot frame
    E(1/camera_name): Feeding snapshot decoder failed
    E(1/camera_name): Failed to make snapshot
@andrey-utkin andrey-utkin merged commit fae47f6 into bluecherrydvr:master Oct 15, 2024
1 of 2 checks passed
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.

1 participant