RandomEngy / VidCoder

A Blu-ray, DVD and video file transcoder for Windows.
http://vidcoder.net
GNU General Public License v2.0
669 stars 42 forks source link

Could not set encoded date on file #1241

Closed Registered55 closed 1 month ago

Registered55 commented 1 month ago

Problem Description

using the option preserve created date is not working right for the creation date, the modification date is being preserved, but not the creation date..

What version of VidCoder are you running?

10.5 Beta Zip

Encode Log

VC [05:41:24] VidCoder 10.5 Beta
VC [05:41:24] Starting job 1/1
VC [05:41:24]   Source path: D:\VIDCODER\PXL_20240108_222751316.TS.mp4
VC [05:41:24]   Destination path: C:\EXCLUDE\vidcoder\PXL_20240108_222751316.TS.mp4
VC [05:41:24]   Title: 1
VC [05:41:24]   Range: All
VC [05:41:24]   Preset: Mobile 1080p 30
VC [05:41:24]   Picker: Custom
VC [05:41:24] Worker ready: Pipe 'VidCoderWorker.52a224d4-cd55-46fd-b11d-3a55978a5e91' is open
VC [05:41:24] Connecting to process 9812 on pipe VidCoderWorker.52a224d4-cd55-46fd-b11d-3a55978a5e91
HB [05:41:25] CPU: Unknown
[05:41:25]  - logical processor count: 12
[05:41:25] Intel Quick Sync Video support: no
[05:41:25] hb_scan: path=D:\VIDCODER\PXL_20240108_222751316.TS.mp4, title_index=1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\VIDCODER\PXL_20240108_222751316.TS.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 131072
    compatible_brands: isomiso2mp41
    creation_time   : 2024-01-08T22:28:03.000000Z
    location        : +50.8278-0.1413/
    location-eng    : +50.8278-0.1413/
    com.android.manufacturer: Google
    com.android.model: Pixel 7
    com.android.capture.fps: 30.000000
  Duration: 00:00:09.24, start: 0.000000, bitrate: 20033 kb/s
  Stream #0:0[0x1](eng): Data: none (mett / 0x7474656D), 47 kb/s (default)
      Metadata:
        creation_time   : 2024-01-08T22:28:03.000000Z
        handler_name    : MetaHandle
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
      Metadata:
        creation_time   : 2024-01-08T22:28:03.000000Z
        handler_name    : SoundHandle
        vendor_id       : [0][0][0][0]
  Stream #0:2[0x3](eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 1920x1080, 19787 kb/s, SAR 1:1 DAR 16:9, 29.99 fps, 120 tbr, 90k tbn (default)
      Metadata:
        creation_time   : 2024-01-08T22:28:03.000000Z
        handler_name    : VideoHandle
        vendor_id       : [0][0][0][0]
      Side data:
        displaymatrix: rotation of -90.00 degrees
  Stream #0:3[0x4](eng): Data: none (mett / 0x7474656D) (default)
      Metadata:
        creation_time   : 2024-01-08T22:28:03.000000Z
        handler_name    : MetaHandle
[05:41:25] scan: decoding previews for title 1
[05:41:25] Auto-Rotating video 270 degrees
HB [05:41:25] scan: audio 0x1: aac, rate=48000Hz, bitrate=192159 English (AAC LC, 2.0 ch, 192 kbps)
HB [05:41:26] scan: 20 previews, 1080x1920, 29.989 fps, autocrop = 0/0/0/0, aspect 1:1.78, PAR 1:1, color profile: 1-1-1, chroma location: left
[05:41:26] libhb: scan thread found 1 valid title(s)
HB [05:41:26] Starting work at: Fri May 24 05:41:26 2024
[05:41:26] 1 job(s) to process
[05:41:26] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0,
        "Encoder": "copy",
        "Gain": 0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 48000,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:mp2",
      "copy:mp3",
      "copy:flac"
    ],
    "FallbackEncoder": "av_aac"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "C:\\EXCLUDE\\vidcoder\\PXL_20240108_222751316.TS.part.mp4",
    "Options": {
      "IpodAtom": false,
      "Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 11,
        "Settings": {
          "mode": "1",
          "rate": "27000000/900000"
        }
      },
      {
        "ID": 20,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1920",
          "width": "1080"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "D:\\VIDCODER\\PXL_20240108_222751316.TS.mp4",
    "HWDecode": 0
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "MultiPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "-map_metadata 0 -movflags use_metadata_tags",
    "Preset": "faster",
    "Profile": "auto",
    "Quality": 32,
    "QSV": {
      "Decode": false
    },
    "HardwareDecode": 4
  }
}
[05:41:26] Starting Task: Encoding Pass
[05:41:26] work: skipping crop/scale filter
[05:41:26] Auto Passthru: allowed codecs are AAC, MP2, MP3, FLAC
[05:41:26] Auto Passthru: fallback is AAC (avcodec)
[05:41:26] Auto Passthru: using AAC Passthru for track 1
[05:41:26] work: only 1 chapter, disabling chapter markers
[05:41:26] job configuration:
[05:41:26]  * source
[05:41:26]    + D:\VIDCODER\PXL_20240108_222751316.TS.mp4
[05:41:26]    + title 1, chapter(s) 1 to 1
[05:41:26]    + container: mov,mp4,m4a,3gp,3g2,mj2
[05:41:26]    + data rate: 20033 kbps
[05:41:26]  * destination
[05:41:26]    + C:\EXCLUDE\vidcoder\PXL_20240108_222751316.TS.part.mp4
[05:41:26]    + container: MPEG-4 (libavformat)
[05:41:26]      + align initial A/V stream timestamps
[05:41:26]  * video track
[05:41:26]    + decoder: hevc 8-bit (yuv420p)
[05:41:26]      + bitrate 19787 kbps
[05:41:26]    + filter
[05:41:26]      + Framerate Shaper (mode=1:rate=27000000/900000)
[05:41:26]        + frame rate: 29.989 fps -> constant 30.000 fps
[05:41:26]    + Output geometry
[05:41:26]      + storage dimensions: 1080 x 1920
[05:41:26]      + pixel aspect ratio: 1 : 1
[05:41:26]      + display dimensions: 1080 x 1920
[05:41:26]    + encoder: H.265 (libx265)
[05:41:26]      + preset:  faster
[05:41:26]      + options: -map_metadata 0 -movflags use_metadata_tags
[05:41:26]      + profile: auto
[05:41:26]      + level:   auto
[05:41:26]      + quality: 32.00 (RF)
[05:41:26]      + color profile: 1-1-1
[05:41:26]      + color range: tv
[05:41:26]      + chroma location: left
[05:41:26]  * audio track 1
[05:41:26]    + decoder: English (AAC LC, 2.0 ch, 192 kbps) (track 1, id 0x1)
[05:41:26]      + bitrate: 192 kbps, samplerate: 48000 Hz
[05:41:26]    + AAC Passthru
[05:41:26] sync: expecting 277 video frames
[05:41:26] encx265: unknown option '-map_metadata 0 -movflags use_metadata_tags'
x265 [info]: HEVC encoder version 3.6+1-aa7f602f7
x265 [info]: build info [Windows][GCC 13.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 12 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(30 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias  : 30 / 300 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 15 / 4 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 2 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-32.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp
x265 [info]: tools: fast-intra strong-intra-smoothing lslices=8 deblock sao
[05:41:26] Auto-Rotating video 270 degrees
[05:41:26] sync: first pts video is 0
[05:41:26] sync: "Chapter 1" (1) at frame 1 time 0
[05:41:26] sync: first pts audio 0x1 is 0
HB [05:41:28] reader: done. 1 scr changes
HB [05:41:30] work: average encoding speed for job is 0.000000 fps
HB [05:41:30] vfr: 277 frames output, 0 dropped and 0 duped for CFR/PFR
[05:41:30] vfr: lost time: 0 (0 frames)
[05:41:30] vfr: gained time: 0 (0 frames) (0 not accounted for)
[05:41:30] aac-decoder done: 432 frames, 0 decoder errors
[05:41:30] hevc-decoder done: 277 frames, 0 decoder errors
[05:41:30] sync: got 277 frames, 277 expected
[05:41:30] sync: framerate min 29.989 fps, max 29.989 fps, avg 29.989 fps
x265 [info]: frame I:      4, Avg QP:33.83  kb/s: 1787.70
x265 [info]: frame P:     55, Avg QP:34.34  kb/s: 1375.68
x265 [info]: frame B:    218, Avg QP:37.67  kb/s: 620.37
x265 [info]: Weighted P-Frames: Y:7.3% UV:7.3%
encoded 277 frames in 4.25s (65.19 fps), 787.20 kb/s, Avg QP:36.96
[05:41:30] mux: track 0, 277 frames, 909667 bytes, 785.32 kbps, fifo 512
[05:41:30] mux: track 1, 432 frames, 221463 bytes, 191.19 kbps, fifo 512
[05:41:30] Finished work at: Fri May 24 05:41:30 2024
HB [05:41:30] libhb: work result = 0
VC E [05:41:30] Could not set encoded date on file: Microsoft.WindowsAPICodePack.COMNative.Shell.PropertySystem.PropertySystemException (0x80004005): Unable to set property.
 ---> System.Runtime.InteropServices.COMException (0x80030005): Access Denied. (0x80030005 (STG_E_ACCESSDENIED))
   at Microsoft.WindowsAPICodePack.Shell.PropertySystem.ShellPropertyWriter.WriteProperty(PropertyKey key, Object value, Boolean allowTruncatedValue)
   at Microsoft.WindowsAPICodePack.Shell.PropertySystem.ShellPropertyWriter.WriteProperty[T](ShellProperty`1 shellProperty, T value, Boolean allowTruncatedValue)
   at Microsoft.WindowsAPICodePack.Shell.PropertySystem.ShellProperty`1.set_Value(T value)
   at VidCoder.Services.ProcessingService.UpdateFileTimes(EncodeJobViewModel finishedJobViewModel, IAppLogger encodeLogger, String outputPath) in C:\git\VidCoder\VidCoder\Services\ProcessingService.cs:line 2620
VC [05:41:30] Job completed (Elapsed Time: 5s)
RandomEngy commented 1 month ago

That's odd, the logs indicate that the only failure was setting the encoded date, and that the created and modified time succeeded.

You're saying that the Created time in the file Properties dialog doesn't get preserved?

image

Registered55 commented 1 month ago

it's all good now...no idea why.

image

image

image

image

maybe I got confused with the "date" vs "date created" column in Explorer? (if so, sorry if I wasted your time).

however the last screenshot above, not sure if this date difference is an issue.

RandomEngy commented 1 month ago

Yeah I'm guessing that "Media created" value difference is the result of the encoded date failing to write. Don't know if I can do anything about that one.