Opened 5 years ago

Closed 5 years ago

Last modified 15 months ago

#7345 closed defect (fixed)

Progress value out_time_ms is in microseconds (μs) NOT milliseconds (ms).

Reported by: Markus Kienast Owned by:
Priority: minor Component: ffmpeg
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:

FFmpeg can produce periodic progress information using e.g. "-progress pipe:1", which produces key=value pairs like below. The value for key "out_time_ms" however is not in milliseconds (ms) but in microseconds, which is abbreviated with "μs" - sometimes "us" may be used for convenience but "ms" means something else.

bitrate= 162.8kbits/s
speed= 3.2x

The key out_time_ms is incorrect as "ms" is the abbreviation for milliseconds but the value shown is actually in microseconds. The correct abbreviation for microseconds is μs or one might use "us", as the Ancient Greek μῦ [mŷː] might be inconvenient for people to use.

Or you change the value to a float showing milliseconds instead. Either way, a correction is needed.

How to reproduce:
You can reproduce that with any transcoding operation.

% ffmpeg -i input -progress pipe:1 -nostats -nostdin output

Version from Ubuntu 18.04

ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 7 (Ubuntu 7.3.0-16ubuntu2)
configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
WARNING: library configuration mismatch
avcodec configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100

Change History (5)

comment:1 by Carl Eugen Hoyos, 5 years ago

Keywords: abbreviation microseconds milliseconds progress removed

Please test current FFmpeg git head and please provide the command line you tested together with the complete, uncut console output to make this a valid ticket.

comment:2 by Gyan, 5 years ago

Yes, pts is scaled to AVTB. Patch sent -

comment:3 by Carl Eugen Hoyos, 5 years ago

Component: undeterminedffmpeg
Version: 3.4git-master

comment:4 by Carl Eugen Hoyos, 5 years ago

Resolution: fixed
Status: newclosed

comment:5 by mahozad, 15 months ago

The out_time_us and out_time_ms are exactly the same in the progress output.

For example:

I'm using ffmpeg on Windows 11:

./ffmpeg.exe -ss 5 -to 13 -i test.ts -progress "http://localhost:8000/progress" result.mp4

ffmpeg version Copyright (c) 2000-2022 the FFmpeg developers

built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100

Note: See TracTickets for help on using tickets.