Feature request - Restore after connection issue on network storage

Started by Grobe, November 27, 2023, 09:50:11 PM

Previous topic - Next topic


Having both input and output files on a network drive, I experienced that a 2 hour encoding job (x265) failed after about one and a half hour.
This only happens when using a network drive, and oddly enough this kind of failure seems to be more likely to happens when encoding to x265 (I cannot tell for sure if this correlation is actually true, since I also mostly encode to x265).

The problem lies in that Avidemux runs the encoding for an hour or more, and then it fails. So the larger the video file, the higher possibility of failure before finish.

In this instance, I also know that there is some instability of the network drive. Some time it happens that windows explorer suddenly report zero files within a folder, but after a refresh - the files are there again.

Feature request : suggestion (if possible)
During encoding, there should be saved some additional data (possible a standalone file) with recovery data so that it is possible to recover after a media disconnect, or possible automatically recover.
Maybe there could be a setting for the user to be able to decide how much recovery data to save.

I hope you find this being a reasonable feature request and that it is actually possible to implement.

A typical occurrence produces the following error messages:

Too short

The saved video is incomplete. The error occured at 00:02:49,634 (82). This may happen as result of invalid time stamps in the video.



Error seeking to 213350 ms


File 20231127_095059_out.mkv was NOT saved correctly.

The phy script file for this particular job:

#PY  <- Needed to identify #
#--automatically built--

adm = Avidemux()
if not adm.loadVideo("K:/Scan/Grobe/nedl/Video/20231127_095059.mp4"):
    raise("Cannot load K:/Scan/Grobe/nedl/Video/20231127_095059.mp4")
adm.addSegment(0, 700, 213384300)
adm.markerA = 3531955
adm.markerB = 208952200
adm.setPostProc(3, 3, 0)
adm.setHDRConfig(1, 1, 1, 1, 0)
adm.videoCodec("x265", "useAdvancedConfiguration=False", "general.params=AQ=29", "general.poolThreads=99", "general.frameThreads=0", "general.output_bit_depth=0", "general.preset=veryslow", "general.tuning=none", "general.profile=main"
, "level=-1", "vui.sar_idc=0", "vui.sar_height=1", "vui.sar_width=1", "vui.color_primaries=2", "vui.transfer_characteristics=2", "vui.matrix_coeffs=2", "MaxRefFrames=3", "MinIdr=25", "MaxIdr=250", "i_scenecut_threshold=40"
, "MaxBFrame=3", "i_bframe_adaptive=1", "i_bframe_bias=0", "i_bframe_pyramid=4294967295", "b_deblocking_filter=True", "b_open_gop=False", "interlaced_mode=0", "constrained_intra=False", "b_intra=True"
, "lookahead=40", "weighted_pred=2", "weighted_bipred=True", "rect_inter=False", "amp_inter=False", "limit_modes=False", "cb_chroma_offset=0", "cr_chroma_offset=0", "me_method=3", "me_range=16", "subpel_refine=5"
, "limit_refs=3", "rd_level=3", "psy_rd=1.000000", "rdoq_level=0", "psy_rdoq=0.000000", "fast_pskip=True", "dct_decimate=True", "noise_reduction_intra=0", "noise_reduction_inter=0", "strong_intra_smoothing=True"
, "ratecontrol.rc_method=0", "ratecontrol.qp_constant=0", "ratecontrol.qp_step=4", "ratecontrol.bitrate=0", "ratecontrol.vbv_max_bitrate=0", "ratecontrol.vbv_buffer_size=0", "ratecontrol.vbv_buffer_init=1"
, "ratecontrol.ip_factor=1.400000", "ratecontrol.pb_factor=1.300000", "ratecontrol.aq_mode=2", "ratecontrol.aq_strength=1.000000", "ratecontrol.cu_tree=True", "ratecontrol.strict_cbr=False")
adm.addVideoFilter("imageStab", "smoothing=0.520000", "gravity=0.530000", "autoGravity=False", "sceneThreshold=0.500000", "zoom=1.000000", "algo=0", "motionEstimation=0")
adm.addVideoFilter("swscale", "width=1280", "height=720", "algo=1", "sourceAR=0", "targetAR=0", "lockAR=True", "roundup=0")
if adm.audioTotalTracksCount() <= 0:
    raise("Cannot add audio track 0, total tracks: " + str(adm.audioTotalTracksCount()))
adm.audioCodec(0, "FDK_AAC", "bitrate=56", "afterburner=True", "profile=2", "sbr=False")
adm.audioSetDrc2(0, 0, 1, 0.001, 0.2, 1, 2, -12)
adm.audioSetEq(0, 0, 0, 0, 0, 880, 5000)
adm.audioSetChannelGains(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
adm.audioSetChannelDelays(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
adm.audioSetChannelRemap(0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8)
adm.audioSetShift(0, 0, 0)
adm.audioSetNormalize2(0, 1, 10, -30)
adm.setContainer("MKV", "forceAspectRatio=False", "displayWidth=1280", "displayAspectRatio=2", "addColourInfo=False", "colMatrixCoeff=2", "colRange=0", "colTransfer=2", "colPrimaries=2")