Settings for Google Stabiliser

Discuss encoding for devices and presets.
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.
Post Reply
run_the_race
Posts: 2
Joined: Sun Apr 11, 2021 12:32 pm

Settings for Google Stabiliser

Post by run_the_race »

Description of problem or question:
Does any know of some handbrake outputs setting which are compatible with google photo's video stabiliser?

My camera records to .MOV files. Google photo's video stabiliser only works with .mp4. So I wish to use handbrake to convert the video from my camera to a file that google photo can stabilise.
I tried converting it to .mp4 with various settings but could not get it to work. It always fails to export/save. My research shows that google photos video stabiliser supports H264, and recently added H265 support. I could not get either to work, or .mp4, or an wide array of various settings, is there something I am missing? Some research said its the fps (must not be 60fps), but even if I reduce the fps to 24 or 30, it still doesnt work.


Steps to reproduce the problem (If Applicable):
1. Convert video to .mp4 using handbrake
2. Copy video onto phone.
3. Open google photos on your phone.
4. Select the video.
5. At the button tap `EDIT`, then `VIDEO` then press the button that looks like a slightly rotate rectangle, that is the stabilise button.
5. If will then process the video.
6. Tap `save` and it fails to export. It plays the video fine.




HandBrake version (e.g., 1.0.0):
1.3.3



Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Windows 10, version 2004



HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz
Ram: 16289 MB, 
GPU Information:
  Intel(R) HD Graphics 4600 - 20.19.15.5063
  AMD Radeon HD 8790M - 27.20.1034.6
Screen: 1920x1200
Temp Dir: C:\Users\Michael\AppData\Local\Temp\
Install Dir: C:\Users\Michael\scoop\apps\handbrake\current
Data Dir: C:\Users\Michael\AppData\Roaming\HandBrake

-------------------------------------------


# Starting Encode ...

[01:34:59] base preset: 59.94fps (Modified)
[13:34:59] hb_init: starting libhb thread
[13:34:59] Starting work at: Sun Apr 11 13:34:59 2021
[13:34:59] 1 job(s) to process
[13:34:59] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": "av_aac",
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      },
      {
        "Bitrate": 640,
        "DRC": 0.0,
        "Encoder": "ac3",
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "C:\\Users\\Michael\\Videos\\DSCF1182 pan left.SVP-1_sameas_source.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "D:\\Series Wedding\\Fujifilm_original\\DSCF1182 pan left.SVP.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "mpeg4",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Quality": 1.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[13:34:59] CPU: Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz
[13:34:59]  - Intel microarchitecture Haswell
[13:34:59]  - logical processor count: 8
[13:34:59] Intel Quick Sync Video support: yes
[13:34:59]  - Intel Media SDK hardware: API 1.20 (minimum: 1.3)
[13:34:59]  - H.264 encoder: yes
[13:34:59]     - preferred implementation: hardware (any) via D3D11
[13:34:59]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[13:34:59]  - H.265 encoder: no
[13:34:59] hb_scan: path=D:\Series Wedding\Fujifilm_original\DSCF1182 pan left.SVP.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image D:\Series Wedding\Fujifilm_original\DSCF1182 pan left.SVP.mkv
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2585: nav_get_title_list(D:\Series Wedding\Fujifilm_original\DSCF1182 pan left.SVP.mkv\) failed
[13:34:59] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[13:34:59] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'D:\Series Wedding\Fujifilm_original\DSCF1182 pan left.SVP.mkv':
  Metadata:
    COMMENT-eng     : FUJIFILM DIGITAL CAMERA X-T2
    creation_time   : 2021-04-11T11:25:12.000000Z
    MAJOR_BRAND     : qt
    MINOR_VERSION   : 0
    COMPATIBLE_BRANDS: qt
    ORIGINAL_FORMAT : Digital Camera
    ORIGINAL_FORMAT-eng: Digital Camera
    COMMENT         : FUJIFILM DIGITAL CAMERA X-T2
    ENCODER         : Lavf58.64.100
  Duration: 00:00:05.95, start: 0.000000, bitrate: 325951 kb/s
    Stream #0:0: Video: h264 (High), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 1k tbn, 48k tbc (default)
    Metadata:
      BPS-eng         : 325162012
      DURATION-eng    : 00:00:05.950000000
      NUMBER_OF_FRAMES-eng: 358
      NUMBER_OF_BYTES-eng: 241839247
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-04-11 11:25:12
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      BPS-eng         : 1536000
      DURATION-eng    : 00:00:03.000000000
      NUMBER_OF_FRAMES-eng: 75
      NUMBER_OF_BYTES-eng: 576000
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-04-11 11:25:12
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[13:34:59] scan: decoding previews for title 1
[13:34:59] scan: audio 0x1: pcm_s16le, rate=48000Hz, bitrate=1536000 Unknown (pcm_s16le) (2.0 ch) (1536 kbps)
[13:35:03] scan: 10 previews, 1920x1080, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[13:35:03] scan: supported video decoders: avcodec qsv
[13:35:03] libhb: scan thread found 1 valid title(s)
[13:35:03] Skipping subtitle scan.  No suitable subtitle tracks.
[13:35:03] Starting Task: Encoding Pass
[13:35:03] Skipping crop/scale filter
[13:35:03] work: only 1 chapter, disabling chapter markers
[13:35:03] job configuration:
[13:35:03]  * source
[13:35:03]    + D:\Series Wedding\Fujifilm_original\DSCF1182 pan left.SVP.mkv
[13:35:03]    + title 1, chapter(s) 1 to 1
[13:35:03]    + container: matroska,webm
[13:35:03]    + data rate: 325951 kbps
[13:35:03]  * destination
[13:35:03]    + C:\Users\Michael\Videos\DSCF1182 pan left.SVP-1_sameas_source.mp4
[13:35:03]    + container: MPEG-4 (libavformat)
[13:35:03]      + align initial A/V stream timestamps
[13:35:03]  * video track
[13:35:03]    + decoder: h264
[13:35:03]    + filters
[13:35:03]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[13:35:03]      + Decomb (mode=39)
[13:35:03]      + Framerate Shaper (mode=1)
[13:35:03]        + frame rate: 60.000 fps -> constant 60.000 fps
[13:35:03]    + Output geometry
[13:35:03]      + storage dimensions: 1920 x 1080
[13:35:03]      + pixel aspect ratio: 1 : 1
[13:35:03]      + display dimensions: 1920 x 1080
[13:35:03]    + encoder: MPEG-4 (libavcodec)
[13:35:03]      + quality: 1.00 (QP)
[13:35:03]      + color profile: 1-1-5
[13:35:03]  * audio track 1
[13:35:03]    + decoder: Unknown (pcm_s16le) (2.0 ch) (1536 kbps) (track 1, id 0x1)
[13:35:03]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[13:35:03]    + mixdown: Stereo
[13:35:03]    + dither: none
[13:35:03]    + encoder: AAC (libavcodec)
[13:35:03]      + bitrate: 160 kbps, samplerate: 48000 Hz
[13:35:03]  * audio track 2
[13:35:03]    + decoder: Unknown (pcm_s16le) (2.0 ch) (1536 kbps) (track 1, id 0x1)
[13:35:03]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[13:35:03]    + mixdown: Stereo
[13:35:03]    + dither: none
[13:35:03]    + encoder: AC3 (libavcodec)
[13:35:03]      + bitrate: 640 kbps, samplerate: 48000 Hz
[13:35:03] sync: expecting 357 video frames
[13:35:03] encavcodecInit: MPEG-4 ASP encoder
[13:35:03] encavcodec: encoding at constant quantizer 118
[13:35:03] encavcodec: encoding with stored aspect 1/1
[13:35:04] sync: first pts video is 0
[13:35:04] sync: "Chapter 1" (1) at frame 1 time 0
[13:35:04] sync: first pts audio 0x1 is 0
[13:35:04] sync: first pts audio 0x1 is 0
[13:35:12] reader: done. 1 scr changes
[13:35:13] work: average encoding speed for job is 36.659382 fps
[13:35:13] comb detect: heavy 0 | light 1 | uncombed 357 | total 358
[13:35:13] decomb: deinterlaced 0 | blended 1 | unfiltered 357 | total 358
[13:35:13] vfr: 358 frames output, 0 dropped and 0 duped for CFR/PFR
[13:35:13] vfr: lost time: 0 (0 frames)
[13:35:13] vfr: gained time: 0 (0 frames) (0 not accounted for)
[13:35:13] pcm_s16le-decoder done: 75 frames, 0 decoder errors
[13:35:13] pcm_s16le-decoder done: 75 frames, 0 decoder errors
[13:35:13] h264-decoder done: 358 frames, 0 decoder errors
[13:35:13] sync: got 358 frames, 357 expected
[13:35:13] sync: framerate min 60.000 fps, max 60.000 fps, avg 60.000 fps
[13:35:13] mux: track 0, 358 frames, 64160389 bytes, 85785.48 kbps, fifo 128
[13:35:13] mux: track 1, 141 frames, 60218 bytes, 80.51 kbps, fifo 64
[13:35:13] mux: track 2, 93 frames, 238080 bytes, 318.32 kbps, fifo 64
[13:35:13] Finished work at: Sun Apr 11 13:35:13 2021
[13:35:13] libhb: work result = 0

# Encode Completed ...

context
Trying to make a wedding video of my sisters wedding that I impromptu starting filming on the day, and the footage is absoutely shakey and awful, hence the google stabiliser. So I am not a professional video editing, but understand the concepts from engineering.
Deleted User 13735

Re: Settings for Google Stabiliser

Post by Deleted User 13735 »

Use a 1080 60p preset.
Choose MP4 in settings if not already so.
User avatar
Ritsuka
HandBrake Team
Posts: 1266
Joined: Fri Jan 12, 2007 11:29 am

Re: Settings for Google Stabiliser

Post by Ritsuka »

IMHO it would be better to use Davinci Resolve, it's free and has a motion stabilisation filter.
Deleted User 13735

Re: Settings for Google Stabiliser

Post by Deleted User 13735 »

I agree, except that Resolve, as one's first NLE, presents a daunting learning curve.
mduell
Veteran User
Posts: 7464
Joined: Sat Apr 21, 2007 8:54 pm

Re: Settings for Google Stabiliser

Post by mduell »

If you're doing an encode for later editing, I'd suggest one of the Production presets.
run_the_race
Posts: 2
Joined: Sun Apr 11, 2021 12:32 pm

Re: Settings for Google Stabiliser

Post by run_the_race »

Thanks for the Davinci recommendation!

Im currently using blender as a video editor, I used it once before many years ago, so refreshing my memory. I know google stabiliser uses AI, and from what I red yields the best results. I tried a free video editor with stabilisation, `Animotica`, and it produces ok result, but in some situations the straights lines like pillars get very distorted (curvey), hence I was trying to get google stabiliser to work. Reading up on Danvinci it seems to produce very good results (https://www.rocketstock.com/blog/best-v ... -software/), I couldnt find out if it uses AI, but it seems fit for purpose, will start learning even more!
Post Reply