Description of problem or question:
NOOB trying to build a CLI command to transcode files recorded from a TVHeadEnd device which come out in a .ts format and are very large. Quality is important but not overly so.
I have an acceptable command so far, just trying to refine it
HandBrakeCLI -i C:\hb\in\IBA-S01E01.ts -o C:\hb\out\IBA-S01E01V4.mkv --preset="H.265 QSV 1080p" --encoder-preset quality --rate 30 --quality 30 --optimize
This reduces the file from 3.58GB to 468MB and completes in around 15 minutes.
Ultimately I want to run this a scheduled task and pick up any file in the C:\hb\in folder and process it to the C:\hb\out folder. Possibly set up an N100 Mini PC as a transcoder either part time or permanently
Any tips or advice on how to improve this command?
Steps to reproduce the problem (If Applicable):
My CLI command:
HandBrakeCLI -i C:\hb\in\IBA-S01E01.ts -o C:\hb\out\IBA-S01E01V4.mkv --preset="H.265 QSV 1080p" --encoder-preset quality --rate 30 --quality 30 --optimize
HandBrake version (e.g., 1.0.0):
1.8.1
Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Windows 11
HandBrake Activity Log ***required***
PS C:\hb> ./HandBrakeCLI -i C:\hb\in\IBA-S01E01.ts -o C:\hb\out\IBA-S01E01V6.mkv --preset="H.265 QSV 1080p" --encoder-preset quality --rate 30 --quality 30 --optimi
ze
[12:16:12] Compile-time hardening features are enabled
Cannot load nvEncodeAPI64.dll
[12:16:12] vcn: not available on this system
[12:16:14] qsv: is available on this system
[12:16:14] hb_init: starting libhb thread
[12:16:14] thread 2 started ("libhb")
HandBrake 1.8.1 (2024062200) - MinGW x86_64 - https://handbrake.fr
12 CPUs detected
Opening C:\hb\in\IBA-S01E01.ts...
[12:16:14] CPU: 11th Gen Intel(R) Core(TM) i5-11400 @ 2.60GHz
[12:16:14] - logical processor count: 12
[12:16:14] Intel Quick Sync Video support: yes, gpu list: 0
[12:16:14] Intel Quick Sync Video integrated adapter with index 0
[12:16:14] Impl mfx-gen library path: C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_1eeee852f82565bd\libmfx64-gen.dll
[12:16:14] - Intel Media SDK hardware: API 2.7 (minimum: 1.3)
[12:16:14] - Decode support: h264 hevc (8bit: yes, 10bit: yes) av1 (8bit: yes, 10bit: yes)
[12:16:14] - H.264 encoder: yes
[12:16:14] - preferred implementation: hardware (1) via D3D11
[12:16:14] - capabilities (hardware): lowpower breftype icq vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[12:16:14] - H.265 encoder: yes (8bit: yes, 10bit: yes)
[12:16:14] - preferred implementation: hardware (1) via D3D11
[12:16:14] - capabilities (hardware): lowpower bpyramid icq vsinfo masteringinfo cllinfo opt1
[12:16:14] - AV1 encoder: no
[12:16:14] hb_scan: path=C:\hb\in\IBA-S01E01.ts, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:333: failed opening UDF image C:\hb\in\IBA-S01E01.ts
src/libbluray/disc/disc.c:437: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:437: error opening file BDMV\BACKUP\index.bdmv
[12:16:14] bd: not a bd - trying as a stream/file instead
libdvdread: Encrypted DVD support unavailable.
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[12:16:14] dvd: not a dvd - trying as a stream/file instead
[12:16:14] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[12:16:14] Found the following PIDS
[12:16:14] Video PIDS :
[12:16:14] 0x100 type H.264 (0x1b) (PCR)
[12:16:14] Audio PIDS :
[12:16:14] 0x101 type LATM AAC (0x11)
[12:16:14] 0x102 type LATM AAC (0x11)
[12:16:14] Subtitle PIDS :
[12:16:14] 0x103 type DVB Subtitling (0x0)
[12:16:14] Other PIDS :
[12:16:14] stream id 0x101 (type 0x11 substream 0x0) audio 0x101
[12:16:14] stream id 0x102 (type 0x11 substream 0x0) audio 0x102
[12:16:14] stream id 0x103 (type 0x0 substream 0x0) subtitle 0x103
[12:16:14] scan: decoding previews for title 1
[12:16:14] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[12:16:14] scan: audio 0x101: aac_latm, rate=48000Hz, bitrate=128000 English (aac_latm LC, 2.0 ch, 128 kbps)
Scanning title 1 of 1, preview 1, 10.00 %[12:16:22] hb_ts_stream_decode - eof
[12:16:22] hb_ts_stream_decode - eof
Scanning title 1 of 1, preview 9, 90.00 %[12:16:23] stream: 22 good frames, 0 errors (0%)
[12:16:23] using bitstream PAR 1:1
[12:16:23] 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:16:23] scan: supported video decoders: avcodec qsv
[12:16:23] scan: removing audio 0x102 because no bitrate found
[12:16:23] libhb: scan thread found 1 valid title(s)
+ Using preset: H.265 QSV 1080p
+ title 1:
+ stream: C:\hb\in\IBA-S01E01.ts
+ duration: 00:56:41
+ size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 25.000 fps
+ autocrop: 0/0/0/0
+ chapters:
+ 1: duration 00:56:41
+ audio tracks:
+ 1, English (aac_latm LC, 2.0 ch, 128 kbps) (iso639-2: eng)
+ subtitle tracks:
+ 1, English (DVB)
[12:16:23] Starting work at: Sun Jul 28 12:16:23 2024
[12:16:23] 1 job(s) to process
[12:16:23] json job:
{
"Audio": {
"AudioList": [
{
"Bitrate": 160,
"CompressionLevel": -1.0,
"DRC": 0.0,
"DitherMethod": "auto",
"Encoder": "av_aac",
"Gain": 0.0,
"Mixdown": "stereo",
"NormalizeMixLevel": false,
"PresetEncoder": "av_aac",
"Quality": -3.0,
"Samplerate": 0,
"Track": 0
}
],
"CopyMask": [
"copy:aac"
],
"FallbackEncoder": "none"
},
"Destination": {
"AlignAVStart": false,
"ChapterList": [
{
"Duration": {
"Hours": 0,
"Minutes": 56,
"Seconds": 41,
"Ticks": 306118981
},
"Name": "Chapter 1"
}
],
"ChapterMarkers": false,
"File": "C:\\hb\\out\\IBA-S01E01V6.mkv",
"InlineParameterSets": false,
"Mux": "mkv",
"Options": {
"IpodAtom": false,
"Optimize": true
}
},
"Filters": {
"FilterList": [
{
"ID": 11,
"Settings": {
"mode": 2,
"rate": "27000000/900000"
}
},
{
"ID": 20,
"Settings": {
"crop-bottom": 0,
"crop-left": 0,
"crop-right": 0,
"crop-top": 0,
"height": 1080,
"width": 1920
}
}
]
},
"Metadata": {},
"PAR": {
"Den": 1,
"Num": 1
},
"SequenceID": 0,
"Source": {
"Angle": 0,
"HWDecode": 0,
"Path": "C:\\hb\\in\\IBA-S01E01.ts",
"Range": {
"End": 1,
"Start": 1,
"Type": "chapter"
},
"Title": 1
},
"Subtitle": {
"Search": {
"Burn": true,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"ChromaLocation": 1,
"ColorInputFormat": 0,
"ColorMatrix": 1,
"ColorOutputFormat": 0,
"ColorPrimaries": 1,
"ColorRange": 1,
"ColorTransfer": 1,
"Encoder": "qsv_h265",
"HardwareDecode": 0,
"Level": "auto",
"MultiPass": false,
"Options": "",
"Preset": "quality",
"Profile": "auto",
"QSV": {
"AdapterIndex": 0,
"AsyncDepth": 0,
"Decode": true
},
"Quality": 30.0,
"Tune": "",
"Turbo": false
}
}
[12:16:24] qsv: integrated qsv adapter with index 0 has been selected
[12:16:24] Starting Task: Encoding Pass
[12:16:24] work: skipping crop/scale filter
[12:16:24] job configuration:
[12:16:24] * source
[12:16:24] + C:\hb\in\IBA-S01E01.ts
[12:16:24] + title 1, chapter(s) 1 to 1
[12:16:24] * destination
[12:16:24] + C:\hb\out\IBA-S01E01V6.mkv
[12:16:24] + container: Matroska (libavformat)
[12:16:24] * video track
[12:16:24] + decoder: h264_qsv 8-bit (yuv420p)
[12:16:24] + bitrate 200 kbps
[12:16:24] + filters
[12:16:24] + Framerate Shaper (mode=2:rate=27000000/900000)
[12:16:24] + frame rate: 25.000 fps -> peak rate limited to 30.000 fps
[12:16:24] + Format (format=nv12)
[12:16:24] + Output geometry
[12:16:24] + storage dimensions: 1920 x 1080
[12:16:24] + pixel aspect ratio: 1 : 1
pElnacyo ddiinmge:n stiaosnks :1 1o9f2 01 ,x 01.00800
%[12:16:24] + encoder: H.265 (Intel Media SDK)
[12:16:24] + preset: quality
[12:16:24] + profile: auto
[12:16:24] + level: auto
[12:16:24] + quality: 30.00 (ICQ)
[12:16:24] + color profile: 1-1-1
[12:16:24] + color range: tv
[12:16:24] + chroma location: left
[12:16:24] * audio track 1
[12:16:24] + decoder: English (aac_latm LC, 2.0 ch, 128 kbps) (track 1, id 0x101)
[12:16:24] + bitrate: 128 kbps, samplerate: 48000 Hz
[12:16:24] + mixdown: Stereo
[12:16:24] + encoder: AAC (libavcodec)
[12:16:24] + bitrate: 160 kbps, samplerate: 48000 Hz
[12:16:24] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[12:16:24] sync: expecting 85033 video frames
Encoding: task 1 of 1, 0.00 %[12:16:24] encqsvInit: using encode-only via system memory (LowPower) path
[12:16:24] encqsvInit: H.265/HEVC Main profile @ level (null)
[12:16:24] encqsvInit: TargetUsage 1 AsyncDepth 6
[12:16:24] encqsvInit: GopRefDist 8 GopPicSize 56 NumRefFrame 4 IdrInterval 0
[12:16:24] encqsvInit: BFramesMax 7 BRefType pyramid
[12:16:24] encqsvInit: RateControlMethod ICQ ICQQuality 30
[h264_qsv @ 000001e7aceaec40] Invalid pkt_timebase, passing timestamps as-is.
Encoding: task 1 of 1, 0.00 %[12:16:25] sync: first pts audio 0x101 is 0
[12:16:25] sync: first pts video is 1680
Encoding: task 1 of 1, 0.04 %[12:16:25] qsv_enc_init: using 'hardware (1) via D3D11' implementation, API: 2.7
Encoding: task 1 of 1, 99.16 % (160.09 fps, avg 138.08 fps, ETA 00h00m06s)[12:26:35] hb_ts_stream_decode - eof
[12:26:35] hb_ts_stream_decode - eof
[12:26:35] reader: done. 3 scr changes
Encoding: task 1 of 1, 99.25 % (160.16 fps, avg 138.10 fps, ETA 00h00m05s)[12:26:36] work: average encoding speed for job is 138.103271 fps
Encoding: task 1 of 1, 99.25 % (160.16 fps, avg 138.10 fps, ETA 00h00m05s)[12:26:36] vfr: 84397 frames output, 0 dropped and 0 duped for CFR/PFR
[12:26:36] vfr: lost time: 0 (0 frames)
[12:26:36] vfr: gained time: 0 (0 frames) (0 not accounted for)
[12:26:36] stream: 84397 good frames, 0 errors (0%)
[12:26:36] aac_latm-decoder done: 158243 frames, 0 decoder errors
[12:26:36] h264_qsv-decoder done: 84397 frames, 0 decoder errors
Encoding: task 1 of 1, 99.25 % (160.16 fps, avg 138.10 fps, ETA 00h00m05s)[12:26:36] sync: got 84397 frames, 85033 expected
[12:26:36] sync: framerate min 10.135 fps, max 53.571 fps, avg 25.000 fps
[aac @ 000001e7aceae880] Ignoring attempt to flush encoder that doesn't support it
[aac @ 000001e7aceae880] Qavg: 1651.088
[12:26:36] mux: track 0, 84397 frames, 422048497 bytes, 1000.13 kbps, fifo 4096
[12:26:36] mux: track 1, 158244 frames, 67796395 bytes, 160.66 kbps, fifo 8192
[12:26:36] Finished work at: Sun Jul 28 12:26:36 2024
[12:26:36] libhb: work result = 0
Encode done!
HandBrake has exited.
HandbrakCLI help
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.