Closed carr0t2 closed 1 year ago
Because the exit value of the "wrapper" is 1. The synovideoindexd
process will then assume that ffmpeg
failed to generate the thumbnail and delete it.
The error in the log file looks like this:
synovideoindexd[310]: video_screenshot.cpp:202 Fail to generate screenshot
Detailed analysis is as follows 241 lines attempt to generate thumbnails.
After concatenating string parameters earlier, on line 100, the command is executed. Since the exit value is 1, it enters the if
statement, and the actually generated thumbnail that was successful is unlinked.
The effect of this is reflected in the strace log as follows:
20:16:56.849761 rt_sigaction(SIGCHLD, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7fb234ddbaf0}, 8) = 0 <0.000043>
20:16:56.849897 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fb2364200d0) = 24996 <0.001125>
20:16:56.851173 wait4(24996, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 24996 <0.701854>
20:16:57.553368 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=24996, si_uid=0, si_status=1, si_utime=0, si_stime=0} ---
20:16:57.553595 unlink("/volume4/xxxx.mp4/SYNOVIDEO_TEMP.jpg") = 0 <0.000364>
20:16:57.554222 sendto(5, "<11> 20:16:57 synovideoind"..., 180, MSG_NOSIGNAL, NULL, 0) = 180 <0.000114>
20:16:57.554793 access("/volume4/xxxx.mp4/SYNOVIDEO_TEMP.jpg", F_OK) = -1 ENOENT (No such file or directory) <0.000203>
Oh waow ! Thank you very much for the detailed research and the PR man, great work !
System details
Describe the bug Thumbnail generation is not possible in VideoStation.
ffmpeg.log
(containing the ffmpeg-wrapper execution logs)