nschlia / ffmpegfs

FUSE-based transcoding filesystem with video support from many formats to FLAC, MP4, TS, WebM, OGG, MP3, HLS, and others.
https://nschlia.github.io/ffmpegfs/
GNU General Public License v3.0
198 stars 14 forks source link

cannot allocate memory #35

Closed zhuker closed 4 years ago

zhuker commented 5 years ago

high bitrate yuv444 h264 wont decode images

2019-05-29 14:38:48 DEBUG  : [/media/zhukov/storage/clients/universal/mummy/4k/R1_235_CC.mp4] Starting decoder thread.
2019-05-29 14:38:48 INFO   : [/media/zhukov/storage/clients/universal/mummy/4k/R1_235_CC.mp4] Transcoding to png.
2019-05-29 14:38:48 DEBUG  : [/media/zhukov/storage/clients/universal/mummy/4k/R1_235_CC.mp4] Opening input file.
2019-05-29 14:38:48 DEBUG  : [/media/zhukov/storage/clients/universal/mummy/4k/R1_235_CC.mp4] Opened input codec for stream #0: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
2019-05-29 14:38:48 INFO   : [/media/zhukov/storage/clients/universal/mummy/4k/R1_235_CC.mp4] Video in: h264@54.65 Mbps [21:58.832]
2019-05-29 14:38:48 INFO   : [/home/zhukov/ffmpegfs/mummy/scans/R1_235_CC.png] Opening output file.
2019-05-29 14:38:48 DEBUG  : [/home/zhukov/ffmpegfs/mummy/scans/R1_235_CC.png] Opening format type 'png'.
2019-05-29 14:38:48 DEBUG  : [/home/zhukov/ffmpegfs/mummy/scans/R1_235_CC.png] Output pixel format: rgb48be
2019-05-29 14:38:48 DEBUG  : [/media/zhukov/storage/clients/universal/mummy/4k/R1_235_CC.mp4] Decoder thread is running.
   open[140488648701424] flags: 0x8000 /R1_235_CC.mp4/00000000250.png
   unique: 34926, success, outsize: 32
unique: 34927, opcode: READ (15), nodeid: 258, insize: 80, pid: 24843
read[140488648701424] 8192 bytes from 0 flags: 0x8000
unique: 34928, opcode: LOOKUP (1), nodeid: 1, insize: 54, pid: 11041
LOOKUP /R1_235_CC.mp4
getattr /R1_235_CC.mp4
   NODEID: 2
   unique: 34928, success, outsize: 144
2019-05-29 14:38:53 ERROR  : [/home/zhukov/ffmpegfs/mummy/scans/R1_235_CC.png] Reading image frame no. 250: (12) Cannot allocate memory
   unique: 34927, error: -12 (Cannot allocate memory), outsize: 16
unique: 34929, opcode: LOOKUP (1), nodeid: 2, insize: 56, pid: 13793
LOOKUP /R1_235_CC.mp4/00000000250.png
getattr /R1_235_CC.mp4/00000000250.png
   NODEID: 258
   unique: 34929, success, outsize: 144
unique: 34930, opcode: FLUSH (25), nodeid: 258, insize: 64, pid: 13793
   unique: 34930, error: -38 (Function not implemented), outsize: 16
unique: 34931, opcode: RELEASE (18), nodeid: 258, insize: 64, pid: 0
release[140488648701424] flags: 0x8000
   unique: 34931, success, outsize: 16
zhuker commented 5 years ago

also i frequently get something like 2019-05-29 14:45:42 ERROR : [/home/zhukov/ffmpegfs/mummy/scans/R1_235_CC.png] Timeout reading image frame no. 4442: (110) Connection timed out

nschlia commented 5 years ago

These are probably actually two bugs. I'll look into it.

nschlia commented 5 years ago

The error message is a bit misleading, it is issued when ffmpegfs tries to read past the end of the cache, i.e. an image that is not yet available. That should never happen...

Probably a multi threading problem. How many cores does your machine have? More than 8?

nschlia commented 5 years ago

Added a lot of extra logging with these commits:

https://github.com/nschlia/ffmpegfs/commit/60b93c37fb889de87b15922478ffd9ae8e917487 https://github.com/nschlia/ffmpegfs/commit/51065aca310efed3f67901a1d1560325b5aaac8b

The logs should help me to figure out what's wrong. Multi threaded programming is like a box of chocolates. You never know what you're gonna get.

Please run ffmpegfs with --log_maxlevel=INFO to get the whole data. Probably even --log_maxlevel=TRACE would be good, although this may spoil the tests as it logs a whole lotta stuff. INFO should be sufficient, though.

nschlia commented 4 years ago

Should be fixed with the new frame set logic.