Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handbrake starting encode, then immediately completing encode with 0kb output #5995

Open
Aerochill opened this issue Apr 24, 2024 · 6 comments

Comments

@Aerochill
Copy link

Problem Description

I am using Handbrake with autovideoconverter. When I try to use the watch folder with autovideoencoder the process just ends up like I stated in the title.

Doing so through the Handbrake GUI, however, yields expected results. I've combed through the logs and I can't seem to figure out why it is "succeeding" to encode nothing.

Activity Log, Crash Log or any other details

Opening /watch/2023-12-23 15-44-52.mkv...
[09:05:18] CPU: AMD Ryzen 5 5600X 6-Core Processor
[09:05:18]  - logical processor count: 12
[09:05:18] Intel Quick Sync Video support: yes
[09:05:18] Intel Quick Sync Video discrete adapter with index 0 and renderD128
[09:05:18] Impl mfx-gen library path: /usr/lib/libmfx-gen.so.1.2.9
[09:05:18]  - Intel Media SDK hardware: API 2.9 (minimum: 1.3)
[09:05:18]  - Decode support:  h264 hevc (8bit: yes, 10bit: yes) av1 (8bit: yes, 10bit: yes)
[09:05:18]  - H.264 encoder: yes
[09:05:18]     - preferred implementation: hardware (any) via ANY
[09:05:18]     - capabilities (hardware):  lowpower breftype icq vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[09:05:18]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[09:05:18]     - preferred implementation: hardware (any) via ANY
[09:05:18]     - capabilities (hardware):  lowpower bpyramid icq vsinfo masteringinfo cllinfo opt1
[09:05:18]  - AV1 encoder: yes (8bit: yes, 10bit: yes)
[09:05:18]     - preferred implementation: hardware (any) via ANY
[09:05:18]     - capabilities (hardware):  lowpower bpyramid icq vsinfo masteringinfo cllinfo opt1 av1bitstream
[09:05:18] hb_scan: path=/watch/2023-12-23 15-44-52.mkv, title_index=1
Input #0, matroska,webm, from '/watch/2023-12-23 15-44-52.mkv':
  Metadata:
    ENCODER         : Lavf60.3.100
  Duration: 00:01:27.27, start: 0.000000, bitrate: 2669 kb/s
  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn
    Metadata:
      DURATION        : 00:01:27.266000000
  Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp
    Metadata:
      title           : simple_aac
      DURATION        : 00:01:27.168000000
[09:05:18] scan: decoding previews for title 1
[09:05:18] scan: audio 0x1: aac, rate=48000Hz, bitrate=1 Unknown (AAC LC, 2.0 ch)
[09:05:18] using bitstream PAR 1:1
[09:05:18] scan: 10 previews, 1280x720, 30.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[09:05:18] scan: supported video decoders: avcodec qsv
[09:05:18] libhb: scan thread found 1 valid title(s)
+ Using preset: AV1QSV3.0
+ title 1:
  + stream: /watch/2023-12-23 15-44-52.mkv
  + duration: 00:01:27
  + size: 1280x720, pixel aspect: 1/1, display aspect: 1.78, 30.000 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: duration 00:01:27
  + audio tracks:
    + 1, Unknown (AAC LC, 2.0 ch) (iso639-2: und)
  + subtitle tracks:
[09:05:18] Starting work at: Wed Apr 24 09:05:18 2024

[09:05:18] 1 job(s) to process
[09:05:18] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 160,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "opus",
                "Gain": 0.0,
                "Mixdown": "stereo",
                "Name": "simple_aac",
                "NormalizeMixLevel": false,
                "PresetEncoder": "opus",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac"
        ],
        "FallbackEncoder": "none"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 1,
                    "Seconds": 27,
                    "Ticks": 7853940
                },
                "Name": ""
            }
        ],
        "ChapterMarkers": false,
        "File": "/output/.gDqVzf/2023-12-23 15-44-52.mkv",
        "InlineParameterSets": false,
        "Mux": "mkv",
        "Options": {
            "IpodAtom": false,
            "Optimize": false
        }
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 10,
                "Settings": {
                    "mode": 1
                }
            },
            {
                "ID": 19,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 720,
                    "width": 1280
                }
            }
        ]
    },
    "Metadata": {},
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "HWDecode": 0,
        "Path": "/watch/2023-12-23 15-44-52.mkv",
        "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_av1_10bit",
        "HardwareDecode": 0,
        "Level": "auto",
        "MultiPass": false,
        "Options": "",
        "Preset": "quality",
        "Profile": "auto",
        "QSV": {
            "AdapterIndex": 0,
            "AsyncDepth": 0,
            "Decode": true
        },
        "Quality": 24.0,
        "Tune": "",
        "Turbo": false
    }
}
[09:05:18] qsv: discrete qsv adapter with index 0 has been selected
[09:05:18] Starting Task: Encoding Pass
[09:05:18] work: skipping crop/scale filter
[09:05:18] work: compression level not specified, track 1 setting compression level 10.00
[09:05:18] job configuration:
[09:05:18]  * source
[09:05:18]    + /watch/2023-12-23 15-44-52.mkv
[09:05:18]    + title 1, chapter(s) 1 to 1
[09:05:18]    + container: matroska,webm
[09:05:18]    + data rate: 2669 kbps
[09:05:18]  * destination
[09:05:18]    + /output/.gDqVzf/2023-12-23 15-44-52.mkv
[09:05:18]    + container: Matroska (libavformat)
[09:05:18]  * video track
[09:05:18]    + decoder: h264_qsv 8-bit (yuv420p)
[09:05:18]    + filters
[09:05:18]      + Framerate Shaper (mode=1)
[09:05:18]        + frame rate: 30.000 fps -> constant 30.000 fps
[09:05:18]      + Format (format=p010le)
[09:05:18]    + Output geometry
[09:05:18]      + storage dimensions: 1280 x 720
[09:05:18]      + pixel aspect ratio: 1 : 1
[09:05:18]      + display dimensions: 1280 x 720
[09:05:18]    + encoder: AV1 10-bit (Intel Media SDK)
[09:05:18]      + preset:  quality
[09:05:18]      + profile: auto
[09:05:18]      + level:   auto
[09:05:18]      + quality: 24.00 (ICQ)
[09:05:18]      + color profile: 1-1-1
[09:05:18]      + chroma location: left
[09:05:18]  * audio track 1
[09:05:18]    + name: simple_aac
[09:05:18]    + decoder: Unknown (AAC LC, 2.0 ch) (track 1, id 0x1)
[09:05:18]      + samplerate: 48000 Hz
[09:05:18]    + mixdown: Stereo
[09:05:18]    + encoder: Opus (libopus)
[09:05:18]      + bitrate: 160 kbps, samplerate: 48000 Hz
[09:05:18]      + compression level: 10.00
[09:05:18] sync: expecting 2617 video frames
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
[09:05:18] hb_display_init: using VA driver 'iHD'
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
[09:05:18] encqsvInit: using encode-only via system memory (LowPower) path
[09:05:18] encqsvInit: AV1 Main profile @ level 3.1
[09:05:18] encqsvInit: TargetUsage 1 AsyncDepth 6
[09:05:18] encqsvInit: GopRefDist 8 GopPicSize 64 NumRefFrame 4 IdrInterval 0
[09:05:18] encqsvInit: BFramesMax 7 BRefType pyramid
[09:05:18] encqsvInit: RateControlMethod ICQ ICQQuality 24
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0

What Operating System are you running?

TrueNAS Scale 24.04

What version of HandBrake are you running?

1.7.3

Where did you download HandBrake from?

TrueNAS handbrake implementation

@sr55
Copy link
Contributor

sr55 commented Apr 24, 2024

Can you provide an encode log for the GUI so we can see what your doing?

Are you sure the CLI is actually 1.7.3?

@Aerochill
Copy link
Author

I am sure the CLI is 1.7.3

Here is the encode log from a successful encode in the GUI

YGO Omega 2024-04-23 10-41-52 2024-04-24 10-18-52.log

@sr55
Copy link
Contributor

sr55 commented Apr 24, 2024

Assuming a a file that doesn't work on the CLI works with the GUI consistently, I have no idea. It's getting hung up on hardware from the looks but there is no obvious reason for it.

I have no idea what autovideoconverter is but if it's containerised HandBrake in any way, it may be the container causing issues.

Beyond that, I don't have any suggestions I'm afraid.

@Aerochill
Copy link
Author

I have learned some things. It appears that the encode only behaves like this with extremely large or small files

with my 300 MB file with multiple files I was able to encode every time.

But with anything less than 150MB and any of my files larger than 1500 MB I was not able to encode

I saw someone talk about an issue like this in a different forum, but I dont remember where

@sr55
Copy link
Contributor

sr55 commented Apr 25, 2024

There are no filesize limits. Folks are regularly encoding multi-hundred GB files with HB without issue.

Your not doing this on a network drive are you?

@itsTyrion
Copy link

itsTyrion commented May 19, 2024

I've had that a couple of days ago when trying to to a 4k transcode (SVT-AV1 10bit) with a lot of stuff open, but I forgot about the encode and wasn't able to reproduce it later on so there's at least a chance this wasn't a one-time fluke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants