DrKLO/Telegram · info
3. Path to YUV input file\n
Error message
3. Path to YUV input file\n
What it means
Third descriptive line of yuvjpeg's usage block: `3. Path to YUV input file`. Documents argument #3, the raw 4:2:0 YUV input path. Printed only on the argc != 5 error path.
Source
Thrown at TMessagesProj/jni/mozjpeg/yuvjpeg.c:120
const char *jpg_path;
FILE *yuv_fd;
size_t yuv_size;
unsigned char *yuv_buffer;
JSAMPLE *jpg_buffer;
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
FILE *jpg_fd;
JSAMPROW yrow_pointer[16];
JSAMPROW cbrow_pointer[8];
JSAMPROW crrow_pointer[8];
JSAMPROW *plane_pointer[3];
int y;
if (argc != 5) {
fprintf(stderr, "Required arguments:\n");
fprintf(stderr, "1. JPEG quality value, 0-100\n");
fprintf(stderr, "2. Image size (e.g. '512x512')\n");
fprintf(stderr, "3. Path to YUV input file\n");
fprintf(stderr, "4. Path to JPG output file\n");
return 1;
}
errno = 0;
quality = strtol(argv[1], NULL, 10);
if (errno != 0 || quality < 0 || quality > 100) {
fprintf(stderr, "Invalid JPEG quality value!\n");
return 1;
}
matches = sscanf(argv[2], "%dx%d", &luma_width, &luma_height);
if (matches != 2) {
fprintf(stderr, "Invalid image size input!\n");
return 1;
}
if (luma_width <= 0 || luma_height <= 0) {View on GitHub (pinned to 45ab8f4308)
Solutions
- Pass the YUV input path as argument 3 and the JPEG output path as argument 4.
- Confirm the YUV file exists and is readable.
- Provide exactly four arguments in the documented order.
Defensive patterns
Strategy: validation
Validate before calling
#include <unistd.h>
/* argument 3 must be a readable YUV file */
if (access(yuv_in, R_OK) != 0) { /* report and do not invoke */ } Prevention
- Confirm the YUV input path exists and is readable.
- Keep argument order: quality, size, YUV in, JPG out.
- Quote paths containing spaces.
When it happens
Trigger: Same trigger as 191: yuvjpeg invoked with argc != 5.
Common situations: Confusing input vs output argument slots; this line makes clear argument 3 is the YUV input and argument 4 is the JPEG output.
Related errors
- 1. JPEG quality value, 0-100\n
- 2. Image size (e.g. '512x512')\n
- Required arguments:\n
- Invalid JPEG quality value!\n
- Invalid image size input!\n
AI-assisted analysis of DrKLO/Telegram@45ab8f4308 (2026-08-14).
Data as JSON: /api/errors/e7f599a3642fd0f1.
Report an issue: GitHub.