# Hardware acceleration for mapillary\_tools

**URL:** https://forum.mapillary.com/t/hardware-acceleration-for-mapillary-tools/3678
**Category:** Command line tools
**Created:** [January 3, 2020, 8:04pm UTC](https://forum.mapillary.com/t/hardware-acceleration-for-mapillary-tools/3678 "2020-01-03T20:04:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jpennycook](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jpennycook](https://forum.mapillary.com/u/jpennycook)
#### Post date: [January 3, 2020, 8:04pm UTC](https://forum.mapillary.com/t/hardware-acceleration-for-mapillary-tools/3678/1 "2020-01-03T20:04:36Z")

</div>

When I use **mapillary\_tools video\_process** , **ffmpeg** uses up a signifcant amount of my CPU. This is expected, but it doesn’t consume any of my GPU. Can an option to use hardware acceleration be added to a future version of mapillary\_tools - i.e. add **-hwaccel** when calling **ffmpeg**?

---

<div class="post-metadata">

### Author: ![bob3bob3](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/bob3bob3/32/68393_2.png) [@bob3bob3](https://forum.mapillary.com/u/bob3bob3)
#### Post date: [December 23, 2020, 2:24pm UTC](https://forum.mapillary.com/t/hardware-acceleration-for-mapillary-tools/3678/2 "2020-12-23T14:24:08Z")

</div>

If you wish to change the ffmpeg command;

lib/python2.7/site-packages/mapillary\_tools/process\_video.py - around line 114

```
command = [
    'ffmpeg',
    '-hwaccel xxxxx' ,
    '-i', video_file,
    '-loglevel', 'quiet',

```

xxxxx  
]

AFAIK the -hwaccel option requires a device argument.

---

<div class="post-metadata">

### Author: ![jpennycook](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jpennycook](https://forum.mapillary.com/u/jpennycook)
#### Post date: [December 23, 2020, 3:09pm UTC](https://forum.mapillary.com/t/hardware-acceleration-for-mapillary-tools/3678/3 "2020-12-23T15:09:31Z")

</div>

I think “-hwaccel auto” should do something (I think not specifying anything, i.e. just “-hwacel”, also has some effect), otherwise just pass a value from the command line used to call mapillary\_tools in the first place.
