Comments (2)
Many thanks for this guidance.
from vidgear.
Writegear uses libx264 or libx265 encoders.
That's incorrect, WriteGear DOES NOT exclusively use libx264 or libx265 encoders, but only use them as fallback encoders when no -vcodec
parameter is passed in output_param dict.
Is it possible to make use of existing hardware encoders - for example on an Intel CPU the h264_vaapi encoder.
(The solution is in docs, kindly refer it for more details.)
How to change Output Codec?
Changing codec is a piece of cake in VidGear, just pass the encoder -vcodec:h264_vaapi
in output_param dict in WriteGear class. Also you can specify the device/harware to be used with '-vaapi_device':'/dev/dri/renderD128'
or other features such as '-vf':'format=nv12,hwupload'
in output_param dict. You can easily find such options in FFmpeg docs with a little bit of googling._ But first remember to check if your FFmpeg supports VAAPI encoders as below.
Important ⚠️
Kindly first confirm that your FFmpeg supports VAAPI encoders, with command as follows:
ffmpeg -hide_banner -encoders | grep vaapi
V..... h264_vaapi H.264/AVC (VAAPI) (codec h264)
V..... hevc_vaapi H.265/HEVC (VAAPI) (codec hevc)
V..... mjpeg_vaapi MJPEG (VAAPI) (codec mjpeg)
V..... mpeg2_vaapi MPEG-2 (VAAPI) (codec mpeg2video)
V..... vp8_vaapi VP8 (VAAPI) (codec vp8)
💡 Finally, Remember You can alter almost any parameter that is supported by FFmpeg itself with VidGear library!
from vidgear.
Related Issues (20)
- ValueError: [CamGear:ERROR] :: Stream Mode is enabled but Input URL is invalid! [Bug]: HOT 3
- [Question]: Failed to start the camera with CamGear (source=self. source). start () in celery's task HOT 3
- [Docs]: Update the chunk size parameter in docs HOT 3
- [Bug]: frame_size_reduction does not allow value of 0 HOT 4
- [Bug]: NetGear graceful close doesn't work for pattern=2 HOT 5
- [Question]: Change default video path in WebGear HOT 3
- [Question]: Transforms size keep growing. HOT 3
- [Question]: I edit individual frames, but the original unearthly video still ends up on YouTube. Why? HOT 15
- [Question]: Fetch Multiple Video from Youtube HOT 3
- [Proposal]: Dropped support for Python 3.7.x legacy HOT 2
- [Question]: How to get original video fps with VideoGear. HOT 8
- [Bug]: ScreenGear's options wrong names HOT 13
- [Bug]: CamGear - Error when loading first segment , while taking picture from youtube streaming HOT 2
- [Bug]: In NetGear client.recv() stucking in a some non returnable loop HOT 4
- [Proposal]: Add type annotations to the code or add stub files HOT 2
- [Proposal]: Add ffmpeg creationflag in Writegear API HOT 1
- [Bug]: frame desynchronization HOT 6
- [Question]: Does VidGear support downloading arbitrary frames and getting video sizes? HOT 4
- Putting a client IP into the Server code? HOT 2
- [Bug]: Stream gear imposes simplified aspect ratios, which does not seem necessary HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vidgear.