Irish-Film-Institute/IFIscripts

seq2ffv1.py occasionally freezes after 24-frame test and printing full rawcooked command line

hyz2993 opened this issue · 4 comments

seq2ffv1.py occasionally freezes after 24-frame test and printing full rawcooked command line.
Here is an instance.

Terminal running data:

admin@ingest04 ~ % seq2ffv1.py -i /Volumes/G-RAID/fss/cintel_/untreated/af15370_harold_johnson_collection_roll_71_glenmalure_1948_ifa2022181 -o /Volumes/G-RAID/fss/cintel_/untreated/for_sipping_2
2024-02-01 13:53:25,285 - Clairmeta - WARNING - Missing dependency : asdcp-info
2024-02-01 13:53:25,285 - Clairmeta - WARNING - Missing dependency : asdcp-unwrap
2024-02-01 13:53:25,286 - Clairmeta - WARNING - Missing dependency : sox
 
**** Who are you?
......
**** Please enter the object entry number of the representation
......
ifiscripts installed from pypi - Version: 2023.12.13
Track 1:                                                    
  af15370_harold_johnson_collection_roll_71_glenmalure_1948_ifa2022181_%08d.dpx
(00086370 --> 00086393)
  DPX/Raw/RGB/12bit/U/BE/Packed
 
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
  built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Input #0, image2, from '/var/folders/t_/tts4pq0d27v728plvz7ycg5c0000gn/T/3bf4794e-dd3d-4f33-84c2-386a363a0fc8/af15370_harold_johnson_collection_roll_71_glenmalure_1948_ifa2022181_%08d.dpx':
  Duration: 00:00:01.00, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: dpx, gbrp12le(gbr/unknown/unknown), 2368x1712 [SAR 1:1 DAR 148:107], 24 fps, 24 tbr, 24 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (dpx (native) -> ffv1 (native))
  File /var/folders/t_/tts4pq0d27v728plvz7ycg5c0000gn/T/8d17c47f-ddef-4371-87a6-80609a24d62c.mkv.rawcooked_reversibility_data -> Stream #0:1
Press [q] to stop, [?] for help
Output #0, matroska, to '/var/folders/t_/tts4pq0d27v728plvz7ycg5c0000gn/T/8d17c47f-ddef-4371-87a6-80609a24d62c.mkv':
  Metadata:
    encoder         : Lavf60.3.100
  Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), gbrp12le(gbr/unknown/unknown, progressive), 2368x1712 [SAR 1:1 DAR 148:107], q=2-31, 200 kb/s, 24 fps, 1k tbn
    Metadata:
      encoder         : Lavc60.3.100 ffv1
  Stream #0:1: Attachment: none
    Metadata:
      mimetype        : application/octet-stream
      filename        : RAWcooked reversibility data
frame=    0 fps=0.0 q=-0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=N/frame=    7 fps=0.0 q=-0.0 size=   31232kB time=00:00:00.29 bitrate=876207.3kbitframe=   13 fps= 12 q=-0.0 size=  105984kB time=00:00:00.54 bitrate=1601883.6kbiframe=   19 fps= 11 q=-0.0 size=  178944kB time=00:00:00.79 bitrate=1850895.5kbiframe=   24 fps= 11 q=-0.0 Lsize=  263571kB time=00:00:00.95 bitrate=2253838.5kbits/s speed=0.449x    
video:263558kB audio:0kB subtitle:0kB other streams:0kB global headers:12kB muxing overhead: 0.005240%
inf GiB/s, nanx realtime                              
- Generating MD5 for /var/folders/t_/tts4pq0d27v728plvz7ycg5c0000gn/T/3bf4794e-dd3d-4f33-84c2-386a363a0fc8/af15370_harold_johnson_collection_roll_71_glenmalure_1948_ifa2022181_00086370.dpx - file 1 of 24
......
- Generating MD5 for /var/folders/t_/tts4pq0d27v728plvz7ycg5c0000gn/T/3bf4794e-dd3d-4f33-84c2-386a363a0fc8/af15370_harold_johnson_collection_roll_71_glenmalure_1948_ifa2022181_00086382.dpx - file 24 of 24
209 MiB/s, 0.78x realtime                              
 
Files are in /var/folders/t_/tts4pq0d27v728plvz7ycg5c0000gn/T/8d17c47f-ddef-4371-87a6-80609a24d62c.mkv.RAWcooked/.
- Generating MD5 for /var/folders/t_/tts4pq0d27v728plvz7ycg5c0000gn/T/8d17c47f-ddef-4371-87a6-80609a24d62c.mkv.RAWcooked/3bf4794e-dd3d-4f33-84c2-386a363a0fc8/af15370_harold_johnson_collection_roll_71_glenmalure_1948_ifa2022181_00086370.dpx - file 1 of 24
......
- Generating MD5 for /var/folders/t_/tts4pq0d27v728plvz7ycg5c0000gn/T/8d17c47f-ddef-4371-87a6-80609a24d62c.mkv.RAWcooked/3bf4794e-dd3d-4f33-84c2-386a363a0fc8/af15370_harold_johnson_collection_roll_71_glenmalure_1948_ifa2022181_00086383.dpx - file 23 of 24
- Generating MD5 for /var/folders/t_/tts4pq0d27v728plvz7ycg5c0000gn/T/8d17c47f-ddef-4371-87a6-80609a24d62c.mkv.RAWcooked/3bf4794e-dd3d-4f33-84c2-386a363a0fc8/af15370_harold_johnson_collection_roll_71_glenmalure_1948_ifa2022181_00086382.dpx - file 24 of 24
- YOUR FILES ARE LOSSLESS YOU SHOULD BE SO HAPPY!!!
- Deleting temp directory /var/folders/t_/tts4pq0d27v728plvz7ycg5c0000gn/T/3bf4794e-dd3d-4f33-84c2-386a363a0fc8
- Deleting temp reversibility directory /var/folders/t_/tts4pq0d27v728plvz7ycg5c0000gn/T/8d17c47f-ddef-4371-87a6-80609a24d62c.mkv.RAWcooked
- Deleting temp FFV1/MKV /var/folders/t_/tts4pq0d27v728plvz7ycg5c0000gn/T/8d17c47f-ddef-4371-87a6-80609a24d62c.mkv
- 24 frame reversibility test for af15370_harold_johnson_collection_roll_71_glenmalure_1948_ifa2022181 is lossless
['rawcooked', '/Volumes/G-RAID/fss/cintel_/untreated/af15370_harold_johnson_collection_roll_71_glenmalure_1948_ifa2022181', '--check-padding', '-c:a', 'copy', '-o', '/Volumes/G-RAID/fss/cintel_/untreated/for_sipping_2/bb24e464-967a-4d6d-acdb-5745f97b42d6.mkv']

# Script got frozen after this for a good while

Tried to suspended and continued but not working:
image

The log file for this process shows the script has just stopped before subprocess.call(ffv12dpx, env=env_dict) in the make_ffv1().

2024-02-01T13:54:07 admin seq2ffv1.py started. 
2024-02-01T13:54:07 admin eventDetail=seq2ffv1.py Version: 2023.12.13 
2024-02-01T13:54:07 admin Command line arguments: Namespace(i='/Volumes/G-RAID/fss/cintel_/untreated/af15370_harold_johnson_collection_roll_71_glenmalure_1948_ifa2022181', o='/Volumes/G-RAID/fss/cintel_/untreated/for_sipping_2', oe=None, user=None, reversibility_dir=None, framerate=None, zip=False, supplement=None) 
2024-02-01T13:54:07 admin EVENT = agentName=Gavin Martin 
2024-02-01T13:54:15 admin EVENT = normalisation, status=started, eventType=Creation, agentName=b'RAWcooked 23.09', eventDetail=Image sequence normalised to FFV1 in a Matroska container 

this part of make_ffv1():

......
    ffv12dpx = (rawcooked_cmd)
    print(ffv12dpx)
    if args.zip:
......
    if not args.zip:
        ififuncs.generate_log(
            log_name_source,
            'EVENT = normalisation, status=started, eventType=Creation, agentName=%s, eventDetail=Image sequence normalised to FFV1 in a Matroska container'
            % normalisation_tool
        )
        subprocess.call(ffv12dpx, env=env_dict)
        ififuncs.generate_log(
            log_name_source,
            'EVENT = normalisation, status=finshed, eventType=Creation, agentName=%s, eventDetail=Image sequence normalised to FFV1 in a Matroska container'
            % normalisation_tool
        )
    return ffv1_path, reel, args, log_name_source, normalisation_tool, rawcooked_logfile

After rawcooked process killed and another go on the script, rawcooked started well.

A pull request #83 has been made for this issue.

Issue fixed. It could cause by the source file disconnects and script closed. Then the process is kept in the back stage and stuck any coming process.