The simplest abstraction of NVR(Network Video Recorder) is like the follow:
The user specifies a path (such as: ~/recrods/) to store video records.
The NVR creates video files (such as: 1.mp4, 2.mp4) on the path.
Now we are going to implement a web-page NVR. Is it possible to do the similar things in the browser without popping up file selectors?
Related
I'm encoding a video file using the built-in adaptive streaming transform. Once the file is successfully processed, an asset container is created with the below files:
Is it possible to provide custom file names at the time a job is created? It seems that the default behavior is to take a certain number of characters from the original file name and prepend them in the above file names. If possible, I'd like to configure this behavior.
P.S. I'm using the .NET SDK.
You can create a custom transform to output file names differently. On https://learn.microsoft.com/en-us/rest/api/media/transforms/createorupdate#definitions search for the Mp4Format section. In that you can specify the filenamePattern with certain macros like {Bitrate} and {Codec}.
See https://learn.microsoft.com/en-us/azure/media-services/latest/custom-preset-cli-howto for an example custom transform and the process by which to create it in Media Services.
I use the macros on my jobs, they work ok. I have a process that takes 3 videos (an intro section, the actual content, and the outro section) and encodes them as one single video. The issue I have with the macros is that it uses the file name of the first video in the inputs. So it ends up using the file name of the intro video which is a generic name. They need to have a way where we can have a little more control.
I suppose I could copy/rename the intro video to a desired name before I encode and it would pick it up, but that seems to be a little bit of overkill.
The Macros are good, but they could use some enhancements I think.
I'm building a project where people can upload files, I would like to then display those files in a browser where people can interact with them (vote, comment etc)
However, this means I need to programatically build the html depending on the format of the video or image. Is there a way to feed a file (or filename) into a library, and determine whether I need to display it in a video element or an image element? Even a list of video formats vs image formats would help but I haven't seen anything in regards to that.
No module can reliably determine the file type. The user could either change the extension or even the magic number of the file to obfuscate it. The only reliable way it to try to pass file to some image / video transcoder to let it decide or error out if the format is invalid. This way you know you are working with known formats since all files are transcoded to your specific extensions. That could be mp4 or png. I recommend using handbrake for videos and sharp for images. Leaving the NPM links down below:
https://www.npmjs.com/package/handbrake-js
https://www.npmjs.com/package/sharp
I have used asterisk MusicOnHold with that I have to point a particlar folder in musiconhold.conf and during the execution all the tone inside that folder are played for all the users.
But now I have to play a specific sound file for each user uploaded by them.My problem is that how can I play this file for user.Because if he uploads a sound file then I have to manually create a class in musiconhold.conf pointing to that folder the do moh reload.
I just want to automate the things to the user just uploads the sound file and during the call of that user in extensions.conf I can point to that sound file and it will be played without reload or adding context in musiconhold.conf everytime.
For ex. the way Playback(pathToSoundfil) works which takes tone path directly is there any function like in musiconhold for directly passing the sound file?
Thanks
You can do as many section in your musiconhold file as you want.
After that you can use thoose class
No, you can't change classes without reload res_musiconhold
However you can use asterisk realtime architecture and put whole config into mysql. Still need do script which will do reload.
If you want 100% realtime solution, you can use conference and play into same conference any file. Just create enother call to conference which play file. This variant require expert level in asterisk.
I want to observe mutations of the DOM on a dynamic webpage, specifically the value of one div.I don't want to repeatedly download the webpage and search for this value, as it seems inefficient. I would like to display this value inside another program. What are my options to communicate with another program from inside a Chrome extension ?
One idea that came to my mind is this one: install a local Web server and grab POST values sent to PHP script from the Chrome extension. Then I could write to the filesystem, and observe a specific file.
Is there another way to do this ?
How do you display audio files like an imagepicker? I'm using the MPMediaplayer class but I can't get it to work. My requirement is to click on a tableviewcell, and have audio files appear like an imagepicker.
simple get the path of all audio files. and parse the name only from the path. store all the names in array and display in UITableView. just read about how to use nsfilemanager.