Opened 4 years ago

#8839 new defect

Report output file lines are truncated to 1024

Reported by: Syed Andaleeb Roomy Owned by:
Priority: minor Component: undetermined
Version: unspecified Keywords: log report truncation
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug: When using -report option or the FFREPORT environment variable and using a long (e.g. > 1024) input URL (e.g. the presigned URLs for AWS S3 bucket), the log lines in the file are seen to be truncated to first 1023 visible chars, possibly because of the hardcoded 1024-byte buffer in log_callback_report in fftools/cmdutils.c.

Following log indicates a test on version 4.0.2, but newer versions also have this issue.

It would be nice to accommodate longer lines, since it is important to be able to parse the exact error/info message at the end of the lines.

How to reproduce:

FFREPORT=file=ffreport.log:level=16 ffmpeg -y -i "" test.mp4
ffmpeg started on 2020-08-05 at 19:46:28
Report written to "ffreport.log"
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.3.1 (GCC) 20180722
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
[https @ 0000018782f2e180] HTTP error 404 Not Found Server returned 404 Not Found

ffreport.log does not contain the important part about "Server returned 404 Not Found". It is truncated to 1023 chars:

cat ffreport.log
Command line:
"E:\\Installer\\ffmpeg-4.0.2-win64-static\\bin\\ffmpeg.exe" -y -i test.mp4

Change History (0)

Note: See TracTickets for help on using tickets.