Comments (3)
You need to add an audio source to the config file. This would be something like:
# At the time being, this can't be a card you're also using for video input.
# You could work around this by commenting out line 61 of replay_ingest.cpp
# and reusing the same iadp object as argument to add_source and add_audio_source.
# You would also need to use create_decklink_input_adapter_with_audio to create the
# input adapter object.
#
# 2 = card number
# 0 = 1080i 59.94
# 0 = SDI over copper
# 2 = capture two channels of audio
iadp = Replay::create_decklink_audio_input_adapter(2, 0, 0, 2)
asrc = app.add_audio_source(:input => iadp, :chmap => { 0 => '/mnt/buffer/audio_ch1', 1 => '/mnt/buffer/audio_ch2' })
This needs to be near the top of the config, because you'll use asrc later when you configure your cameras. Each audio channel gets recorded to a separate buffer file. You don't need to record channels you're not using. Audio can take up a surprising amount of space in the current implementation, because the phase vocoder implementation precomputes the FFT of the incoming audio data for many overlapping windows. Be prepared for this, and only record the channels you need.
Audio output will go to the same device you are using for video output.
You also need to set up the mapping that determines which audio channels get played back with each camera. Define a camera like this (again, your audio configuration has to precede this in the file):
chmap = {
0 => asrc.channel(0),
1 => asrc.channel(1)
}
iadp = Replay::create_decklink_input_adapter(0, 0, 0, Replay::RawFrame::CbYCrY8422)
app.add_source(:input => iadp, :file => '/mnt/buffer/cam1', :name => 'CAM 1', :channel_map => chmap)
If you don't define any channel_map for a camera, you won't get any audio when playing back that camera.
You can reuse the same chmap for multiple cameras, or not - it's up to you. (and there's nothing sacred about the name chmap, you can have several and assign them to different cameras). I had something like this for hockey. Channels 0 and 1 were a generic stereo mix, channels 2 and 3 were mics near corner cameras.
chmap_main = {
0 => asrc.channel(0),
1 => asrc.channel(1)
}
chmap_Lcorner = {
0 => asrc.channel(2),
1 => asrc.channel(2),
}
chmap_Rcorner = {
0 => asrc.channel(3),
1 => asrc.channel(3)
}
Then by attaching the different maps to different cameras I had a sort of "audio follows video" configuration.
Sorry if that was a bit scatterbrained, but it should get you started. The audio implementation is not as well tested as the rest of the code, so YMMV (but please don't hesitate to report any issues you find).
from exacore.
Are you still having trouble?
from exacore.
I never did get audio working.
from exacore.
Related Issues (20)
- Keyer: Need to properly handle transition commands while transition is already in progress HOT 1
- replay: issues when buffer files are already present
- 8-bit PNG RGBAs HOT 1
- Graphics web interface
- Include disk usage percentage and alarms in replay GUI HOT 1
- replay: add ability to tag shots in web UI
- replay: capture audio from devices other than DeckLink HOT 4
- replay: save highlight clips with audio
- replay: audio buffer handling
- avpinput_decklink: mix down audio channels
- replay: automatically take down keyers when rolling out media files
- replay: Support uploading of highlights and replays using Twitter video API
- Any other build instructions?
- Attempting to do a clean build on Ubuntu 16.04 LTS HOT 6
- Address librsvg header deprecation
- 1080i50 input and output please. HOT 2
- replay: crash on controller unplugging
- replay: selecting input with no captured frames causes program to slow drastically.
- replay: previewing replay does not keep scroll back/forward time unless current preview is played
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 exacore.