Open slanglade opened 1 year ago
Can you try the latest image to see if it's better ?
I just tried this on 1.6.1 (h265 QSV, VBR 2-pass encoding, 6000kbps bitrate) and I have exactly the same problem. I also have a Synology with a slightly different CPU: J4125. I am also using the lowpower=0
workaround, otherwise the encoding doesn't start at all:
Example log:
[12:23:45] 1 job(s) to process
[12:23:45] json job:
{
"Audio": {
"AudioList": [
{
"Bitrate": 160,
"CompressionLevel": -1.0,
"DRC": 0.0,
"DitherMethod": "auto",
"Encoder": "fdk_aac",
"Gain": 0.0,
"Mixdown": "stereo",
"NormalizeMixLevel": false,
"PresetEncoder": "fdk_aac",
"Quality": -3.0,
"Samplerate": 0,
"Track": 0
}
],
"CopyMask": [
"copy:aac"
],
"FallbackEncoder": "fdk_aac"
},
"Destination": {
"AlignAVStart": false,
"ChapterList": [
{
"Duration": {
"Hours": 0,
"Minutes": 0,
"Seconds": 12,
"Ticks": 1126800
},
"Name": ""
}
],
"ChapterMarkers": false,
"File": "/output/MVI_0103 (1).mkv",
"InlineParameterSets": false,
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": false
},
"Mux": "mkv"
},
"Filters": {
"FilterList": [
{
"ID": 7,
"Settings": {
"mode": 1
}
},
{
"ID": 14,
"Settings": {
"crop-bottom": 0,
"crop-left": 0,
"crop-right": 0,
"crop-top": 0,
"height": 1080,
"width": 1920
}
}
]
},
"Metadata": {
"Name": "MVI_0103"
},
"PAR": {
"Den": 1,
"Num": 1
},
"SequenceID": 0,
"Source": {
"Angle": 0,
"Path": "/storage/Haystack/MVI_0103.MOV",
"Range": {
"End": 1,
"Start": 1,
"Type": "chapter"
},
"Title": 1
},
"Subtitle": {
"Search": {
"Burn": true,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"Bitrate": 6000,
"ChromaLocation": 1,
"ColorInputFormat": 0,
"ColorMatrix": 1,
"ColorOutputFormat": 0,
"ColorPrimaries": 1,
"ColorRange": 2,
"ColorTransfer": 1,
"Encoder": "qsv_h265",
"HardwareDecode": 0,
"Level": "auto",
"Options": "lowpower=0",
"Preset": "balanced",
"Profile": "auto",
"QSV": {
"AdapterIndex": 0,
"AsyncDepth": 0,
"Decode": false
},
"Tune": "",
"Turbo": false,
"TwoPass": true
}
}
[12:23:45] CPU: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz
[12:23:45] - logical processor count: 4
[12:23:45] Intel Quick Sync Video support: yes
[12:23:45] Intel Quick Sync Video integrated adapter with index 0
[12:23:45] Impl mfxhw64 library path: /opt/intel/mediasdk/lib/libmfxhw64.so.1.35
[12:23:45] - Intel Media SDK hardware: API 1.35 (minimum: 1.3)
[12:23:45] - Decode support: h264 hevc (8bit: yes, 10bit: yes) av1 (8bit: yes, 10bit: yes)
[12:23:45] - H.264 encoder: yes
[12:23:45] - preferred implementation: hardware (any) via ANY
[12:23:45] - capabilities (hardware): lowpower breftype icq+la+i+downs vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[12:23:45] - H.265 encoder: yes (8bit: yes, 10bit: yes)
[12:23:45] - preferred implementation: hardware (any) via ANY
[12:23:45] - capabilities (hardware): lowpower bpyramid icq vsinfo masteringinfo cllinfo opt1
[12:23:45] - AV1 encoder: no
[12:23:45] hb_scan: path=/storage/Haystack/MVI_0103.MOV, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image /storage/Haystack/MVI_0103.MOV
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
[12:23:45] bd: not a bd - trying as a stream/file instead
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[12:23:45] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/Haystack/MVI_0103.MOV':
Metadata:
major_brand : qt
minor_version : 537331968
compatible_brands: qt CAEP
com.apple.quicktime.make: Canon
com.apple.quicktime.model: Canon EOS 700D
com.apple.quicktime.rating.user: 0.000000
creation_time : 2023-01-19T19:54:14.000000Z
Duration: 00:00:12.52, start: 0.000000, bitrate: 45348 kb/s
Stream #0:0[0x1](eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p(pc, bt709, progressive), 1920x1080, 43728 kb/s, 25 fps, 25 tbr, 25k tbn (default)
Metadata:
creation_time : 2023-01-19T19:54:14.000000Z
vendor_id : [0][0][0][0]
Stream #0:1[0x2](eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata:
creation_time : 2023-01-19T19:54:14.000000Z
vendor_id : [0][0][0][0]
[12:23:45] scan: decoding previews for title 1
[12:23:45] scan: audio 0x1: pcm_s16le, rate=48000Hz, bitrate=1536000 English (pcm_s16le) (2.0 ch) (1536 kbps)
[12:23:46] scan: 10 previews, 1920x1080, 25.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[12:23:46] scan: supported video decoders: avcodec qsv
[12:23:46] libhb: scan thread found 1 valid title(s)
[12:23:46] Starting Task: Analysis Pass
[12:23:46] Skipping crop/scale filter
[12:23:46] job configuration:
[12:23:46] * source
[12:23:46] + /storage/Haystack/MVI_0103.MOV
[12:23:46] + title 1, chapter(s) 1 to 1
[12:23:46] + container: mov,mp4,m4a,3gp,3g2,mj2
[12:23:46] + data rate: 45348 kbps
[12:23:46] * destination
[12:23:46] + /output/MVI_0103 (1).mkv
[12:23:46] + container: Matroska (libavformat)
[12:23:46] * video track
[12:23:46] + decoder: h264 8-bit (yuv420p)
[12:23:46] + bitrate 43728 kbps
[12:23:46] + filters
[12:23:46] + Framerate Shaper (mode=1)
[12:23:46] + frame rate: 25.000 fps -> constant 25.000 fps
[12:23:46] + Format (format=nv12)
[12:23:46] + Output geometry
[12:23:46] + storage dimensions: 1920 x 1080
[12:23:46] + pixel aspect ratio: 1 : 1
[12:23:46] + display dimensions: 1920 x 1080
[12:23:46] + encoder: H.265 (Intel Media SDK)
[12:23:46] + preset: balanced
[12:23:46] + options: lowpower=0
[12:23:46] + profile: auto
[12:23:46] + level: auto
[12:23:46] + bitrate: 6000 kbps, pass: 1
[12:23:46] + color profile: 1-1-1
[12:23:46] + chroma location: left
[12:23:46] * audio track 1
[12:23:46] + decoder: English (pcm_s16le) (2.0 ch) (1536 kbps) (track 1, id 0x1)
[12:23:46] + bitrate: 1536 kbps, samplerate: 48000 Hz
[12:23:46] + mixdown: Stereo
[12:23:46] + encoder: AAC (libfdk_aac)
[12:23:46] + bitrate: 160 kbps, samplerate: 48000 Hz
[12:23:46] sync: expecting 313 video frames
[12:23:46] hb_display_init: using VA driver 'iHD'
libva info: VA-API version 1.17.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
[12:23:46] encqsvInit: using encode-only path
[12:23:46] encqsvInit: H.265/HEVC Main profile @ level 4.0
[12:23:46] encqsvInit: TargetUsage 4 AsyncDepth 6
[12:23:46] encqsvInit: GopRefDist 8 GopPicSize 32 NumRefFrame 4 IdrInterval 0
[12:23:46] encqsvInit: BFramesMax 7 BRefType pyramid
[12:23:46] encqsvInit: RateControlMethod VBR TargetKbps 6000 MaxKbps 6000 BufferSizeInKB 1500 InitialDelayInKB 750 BRCParamMultiplier 1
[12:23:46] sync: first pts video is 0
[12:23:46] sync: Chapter 1 at frame 1 time 0
[12:23:46] sync: first pts audio 0x1 is 0
[12:23:47] qsv_enc_init: using 'hardware (1) via VAAPI' implementation, API: 1.35
[12:23:54] reader: done. 1 scr changes
[12:23:57] work: average encoding speed for job is 32.325069 fps
[12:23:58] vfr: 313 frames output, 0 dropped and 0 duped for CFR/PFR
[12:23:58] vfr: lost time: 0 (0 frames)
[12:23:58] vfr: gained time: 0 (0 frames) (0 not accounted for)
[12:23:58] pcm_s16le-decoder done: 587 frames, 0 decoder errors
[12:23:58] h264-decoder done: 313 frames, 0 decoder errors
[12:23:58] sync: got 313 frames, 313 expected
[12:23:58] sync: framerate min 25.000 fps, max 25.000 fps, avg 25.000 fps
[12:23:58] Starting Task: Encoding Pass
[12:23:58] Skipping crop/scale filter
[12:23:58] job configuration:
[12:23:58] * source
[12:23:58] + /storage/Haystack/MVI_0103.MOV
[12:23:58] + title 1, chapter(s) 1 to 1
[12:23:58] + container: mov,mp4,m4a,3gp,3g2,mj2
[12:23:58] + data rate: 45348 kbps
[12:23:58] * destination
[12:23:58] + /output/MVI_0103 (1).mkv
[12:23:58] + container: Matroska (libavformat)
[12:23:58] * video track
[12:23:58] + decoder: h264 8-bit (yuv420p)
[12:23:58] + bitrate 43728 kbps
[12:23:58] + filters
[12:23:58] + Framerate Shaper (mode=1)
[12:23:58] + frame rate: 25.000 fps -> constant 25.000 fps
[12:23:58] + Format (format=nv12)
[12:23:58] + Output geometry
[12:23:58] + storage dimensions: 1920 x 1080
[12:23:58] + pixel aspect ratio: 1 : 1
[12:23:58] + display dimensions: 1920 x 1080
[12:23:58] + encoder: H.265 (Intel Media SDK)
[12:23:58] + preset: balanced
[12:23:58] + options: lowpower=0
[12:23:58] + profile: auto
[12:23:58] + level: auto
[12:23:58] + bitrate: 6000 kbps, pass: 2
[12:23:58] + color profile: 1-1-1
[12:23:58] + chroma location: left
[12:23:58] * audio track 1
[12:23:58] + decoder: English (pcm_s16le) (2.0 ch) (1536 kbps) (track 1, id 0x1)
[12:23:58] + bitrate: 1536 kbps, samplerate: 48000 Hz
[12:23:58] + mixdown: Stereo
[12:23:58] + encoder: AAC (libfdk_aac)
[12:23:58] + bitrate: 160 kbps, samplerate: 48000 Hz
[12:23:58] sync: expecting 313 video frames
[12:23:58] hb_display_init: using VA driver 'iHD'
libva info: VA-API version 1.17.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
[12:23:58] encqsvInit: using encode-only path
[12:23:58] encqsvInit: H.265/HEVC Main profile @ level 4.0
[12:23:58] encqsvInit: TargetUsage 4 AsyncDepth 6
[12:23:58] encqsvInit: GopRefDist 8 GopPicSize 32 NumRefFrame 4 IdrInterval 0
[12:23:58] encqsvInit: BFramesMax 7 BRefType pyramid
[12:23:58] encqsvInit: RateControlMethod VBR TargetKbps 6000 MaxKbps 6000 BufferSizeInKB 1500 InitialDelayInKB 750 BRCParamMultiplier 1
[12:23:58] sync: first pts video is 0
[12:23:58] sync: Chapter 1 at frame 1 time 0
[12:23:58] sync: first pts audio 0x1 is 0
[12:23:58] qsv_enc_init: MFXVideoENCODE_Init failed (-16)
[12:23:58] work: average encoding speed for job is 0.000000 fps
[12:23:58] vfr: 12 frames output, 0 dropped and 0 duped for CFR/PFR
[12:23:58] vfr: lost time: 0 (0 frames)
[12:23:58] vfr: gained time: 0 (0 frames) (0 not accounted for)
[12:23:58] pcm_s16le-decoder done: 135 frames, 0 decoder errors
[12:23:58] h264-decoder done: 48 frames, 0 decoder errors
[12:23:58] sync: got 16 frames, 313 expected
[12:23:58] sync: framerate min 25.000 fps, max 25.000 fps, avg 25.000 fps
[12:23:58] mux: track 0, 0 frames, 0 bytes, 0.00 kbps, fifo 8
[12:23:58] mux: track 1, 29 frames, 12905 bytes, 172.07 kbps, fifo 32
[12:23:59] Finished work at: Mon Feb 27 12:23:59 2023
[12:23:59] libhb: work result = 3
Hi,
Latest version can't use QSV anymore for me : h264 single pass is now failing with "MFXVideoEncode_init failed (-15)". If I remove the container and the latest image, and recreate using v1.25.1 image, it works again.
Two side notes :
Is there a way to have a more verbose output for the intel drive part ?
I am also using the lowpower=0 workaround, otherwise the encoding doesn't start at all
Yeah, it seems that the workaround might still be needed.
Note that HandBrake 1.6 still has issues with QSV:
Latest version can't use QSV anymore for me : h264 single pass is now failing with "MFXVideoEncode_init failed (-15)". If I remove the container and the latest image, and recreate using v1.25.1 image, it works again.
You are not alone, see the issue I linked in my previous comment.
the new control tab on the left + full size UI is great !
Thanks! It's always appreciated to have positive feedback !
for a strange reason, I have to change my group_id from 100 ('users' on DSM 7.1) to 101 (admin) when trying the latest image. Otherwise it fails with a strange "grp100 doesn't exists". It looks like it doesn't like me speciying the same group id that is uses by default. Again, no problem with v1.25.1
This will be fixed in next version of the image.
Sorry for the delay. Indeed the QSV status for handbrake (particulary on older CPU version) seems to be cahotic.
After upgrading to latest image, I did the following :
I can then encode using h264 or h265, single pass only. If I try two passes, the container crash and reboot instantly when the second pass starts.
Edit: in fact, the i915 config file is totally useless. The dmesg still show messages stating "no huc or guc firmware", so I guess we're stuck with lowpower=0 ?
So Iet's wait for a better Handbrake release regarding this problem.
PS : no more problem with "group_id=100" !
Hi,
I've got a DS220+ with a celeron J4025. It is supposed to support hardware encoding of H264 and H265.
First of all, every time an encoding task starts, it reports full support for QSV :
The sample source movie is encoded like this (but the behaviour is the same with all video source I tried) :
Only H264 constant qualiy or single pass constant bitrate are working. If I try, with the very same source movie, I get :
More details follows :
H264 constant bitrate with 2 passes
The first pass works ok, but the second pass fails with the container failing and restarting The encoding part in the logs is
H265, any quality / bitrate / passes combination
The job fails when starting (but no container restart):