[FFmpeg-user] Issue with MJPEG Video Conversion in FFmpeg

Enrico Schreier Enrico.Schreier at erdmannsoftware.com
Wed Mar 12 12:07:48 EET 2025


Dear FFmpeg Development Team,

I hope this message finds you well.

We are encountering an issue when processing a video file using FFmpeg, and we are hoping you can provide some assistance. The video in question is in MJPEG format and features a transition from 8-bit greyscale to an YUV420 color space at some point during playback.

Here is the issue we are experiencing:

Conversion with FFmpeg:
When we convert the video using FFmpeg, the filter graph appears to adjust correctly to the different color spaces. The video plays correctly when processed in forward motion, but it ends up being completely in greyscale.

Reversing the Video:
When we attempt to reverse the video using the following command:

ffmpeg -ss 380 -to 480 -i input.avi -filter_complex "[0]reverse" out4.mp4

the video file becomes corrupted. Specifically, the greyscale portions of the video are skipped, and the non-greyscale sections are displayed in color. This results in a fragmented output where parts of the video are missing entirely (the greyscale segments), and other parts are displayed in color.

We are unable to share the video file due to privacy and data protection reasons, but we have attached the relevant FFmpeg output as a .txt file for your reference. We hope that this will help you better understand the issue.

Our request: Could you please assist us in identifying the cause of this behavior? It seems that FFmpeg may not be properly handling the transition between the different color spaces when reversing the video. We would appreciate any insights or potential solutions you can provide to help us resolve this issue.

Thank you very much for your time and assistance. We look forward to your guidance and support.

Best regards,

Enrico Schreier

(c) ERDMANN-Softwaregesellschaft mbH
Gesch?ftsf?hrer: Ulrich Erdmann
Dr.-Kahlbaum-Allee 16
02826 G?RLITZ
DEUTSCHLAND
Telefon: +49 3581 4761-0
Telefax: +49 3581 4761-99
E-Mail: info at erdmannsoftware.com
Rechtsform: Gesellschaft mit beschr?nkter Haftung
Handelsregister: Amtsgericht Dresden HRB 9857
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpe_output.txt
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20250312/ed91ee32/attachment.txt>


More information about the ffmpeg-user mailing list