Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#8216 closed defect (invalid)

Very slow yuv file writer

Reported by: xiaotiansf Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

-c:v libopenh264 -i solo.mp4 -map 0:v -an -pix_fmt yuv420p -y solo.yuv
ffmpeg is built on
https://github.com/xiaotiansf/FFmpeg
./configure --toolchain=msvc --enable-asm --enable-x86asm --arch=x86_64 --disable-shared --enable-static --enable-gpl --enable-libopenh264 --enable-libx264
libopenh264 is built on
https://github.com/xiaotiansf/openh264-1/tree/thread_support2

The problems observed using profile tool http://www.codersnotes.com/sleepy/

  1. Writing output YUV (file_write in libavformat/file.c) uses about 95% overal time which makes overall progress exceptional slow.
  2. ffmpeg Benchmark log shows that the overall speeds becomes slower and slower from start to end.
  3. By commenting out file_write in libavformat/file.c, it takes no time to finish the entire process.

Change History (7)

comment:1 by xiaotiansf, 4 years ago

Analyzed by developer: unset
Keywords: Slow added; slow removed
Reproduced by developer: unset

Can use any mp4 file to reproduce the issue.

comment:2 by Elon Musk, 4 years ago

Resolution: invalid
Status: newclosed

comment:3 by Kieran Kunhya, 4 years ago

Writing raw data to a disk is slow

comment:4 by xiaotiansf, 4 years ago

Resolution: invalid
Status: closedreopened

I compared the performance between openh264 decoder standalone h264dec.exe and ffmpeg via libopenh264 decoder. ffmpeg yuv writing uses 9x time of h264dec's yuv writing from profiler.

comment:5 by Elon Musk, 4 years ago

Resolution: invalid
Status: reopenedclosed

Not FFmpeg is compared but some custom build.

comment:6 by Elon Musk, 4 years ago

Keywords: Slow YUV writer removed
Priority: importantnormal

comment:7 by Carl Eugen Hoyos, 4 years ago

Component: ffmpegundetermined
Note: See TracTickets for help on using tickets.