Comments (3)
It is possible this will not work.
The original ONVIF API for video codec changes was called "the Media API", I'll call it "Media1"). It supported JPEG, MPEG-4 and H264
Then along came the Media2 API which is the API that also adds H265 support.
Currently this library implements lots of Media1, but only enough of Media2 for what I needed on a project.
In the code, the functions to set the Video Codec only talk to the Media(1) API.
It is possible that your camera does not know what to do when you make a change (via a Media1 API) to an ONVIF Profile that contains a Media2 value (ie H265)
The fix may be to change in libs\media.js around line 391 and change the code so it checks if the camera supports Media2, and if it does, generate the Media2 XML with the Media2 namespaces.
You can see examples of handling Media1 and Media2 around line 1052 with GetStreamUri
from onvif.
You may be lucky and find the XML for the Media2 setVideoEncoderConfiguration is exactly the same as in Media1, so it is just Namespace changes.
But on some of the other things, the API was different
from onvif.
ok I understand.
so you mean that I cam execute the set video configuration like this -
var Cam = require('onvif').Cam;
const cam_obj = new Cam({
hostname: "192.168.1.55",
username: 'admin',
password: '123456',
port: 80,
timeout: 5000
},
async (err) => {
if (err) {
console.log(`load failed`)
return
}
cam_obj._request({
service: 'media2',
body: cam_obj._envelopeHeader() +
'<SetVideoEncoderConfiguration xmlns="http://www.onvif.org/ver20/media/wsdl">' +
'<Configuration token = "' + 'VideoEncode_token_1' + '">' +
('<Encoding xmlns="http://www.onvif.org/ver10/schema">' + 'H264' + '</Encoding>') +
'</Configuration>' +
'<ForcePersistence>true</ForcePersistence>' +
'</SetVideoEncoderConfiguration>' +
cam_obj._envelopeFooter()
}, function(err, data, xml) {
if(err){
console.log(err)
}
else{
console.log(data)
}
})
}
);
Is there any more configuration I should add?
from onvif.
Related Issues (20)
- Fix tests for master branch
- D-Link DCS-8635LH not working HOT 3
- Non conform /onvif/media2_service response leads to Error: Unrecognized configuration HOT 2
- setOSD(): position can take effect, but plaintext does not HOT 1
- Question: I have a dvr/nvr dahua so the discover method retrieve me 1 record. Is there any other method that can tell me how many cameras the dvr has? HOT 2
- Error: GetRecordings
- Compatibility of Axis M5000-G PTZ Camera. HOT 4
- HikVision "Wrong ONVIF Soap Response" Error HOT 17
- Find recording from nvr within specific time HOT 4
- ONVIF SOAP Fault during connect with Vivotek camera's HOT 3
- Action string in Content-Type causes failures with Illustra cameras
- Discovery has been unable to search, how to debug it
- Discovery displays HTTP servers on local network
- Wrong ONVIF SOAP Response on AXIS Cameras
- NetworkInterfaceSetConfiguration documentation change
- feat req: custom position in createOSD HOT 1
- No events for TAPO C520 C510 HOT 1
- relativeMove documentation incorrect
- Unsubscribe: Triggers a second unsubscribe via _eventRequest
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 onvif.