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

create video from jpeg ipcam snapshot #179

Open
realrecordzLab opened this issue Apr 29, 2022 · 0 comments
Open

create video from jpeg ipcam snapshot #179

realrecordzLab opened this issue Apr 29, 2022 · 0 comments

Comments

@realrecordzLab
Copy link

I have this code from node-onvif library. It will take a jpeg snapshot from the selected ip cam stream. I need to convert snapshots into a video and then stream it to the moblie app made using capacitor.js framework. Will be this possible using this library?
I'm looking to issues and examples but not sure what I need to use. I only need video and no audio.

device.init().then(() => {
  // Get the data of the snapshot
  console.log('fetching the data of the snapshot...');
  return device.fetchSnapshot();
}).then((res) => {
  // Save the data to a file
  fs.writeFileSync('snapshot.jpg', res.body, {encoding: 'binary'});
  console.log('Done!');
}).catch((error) => {
  console.error(error);
});

At the moment I'm pasing the returned jpeg object from the ipcam directly to the front end but it's a bit inefficient.

@realrecordzLab realrecordzLab changed the title create video from jpeg icam snapshot create video from jpeg ipcam snapshot Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant