Silence in liquidsoap audio stream on Windows Server (Hyper-V) - audio

I have this liquidsoap script thath streaming an audio to icecast server
out = output.icecast(
host = "127.0.0.1",
port = 8000,
user = "dj",
password = "test",
name = "Test name",
encoding = "UTF-8"
)
wd = "C:/Users/Administrator/Desktop"
pl = "#{wd}/dreamsoundstation"
tech = "#{pl}/technical"
set("log.file.path","#{tech}/liquidsoap.log")
set("log.level", 3)
promo_dir = "#{pl}/promo"
ef = "#{pl}/efir"
ni = "#{ef}/night"
mo = "#{ef}/morning"
da = "#{ef}/daytime"
ev = "#{ef}/evening"
mus_ni_dir = "#{ni}/music"
mus_mo_dir = "#{mo}/music"
mus_da_dir = "#{da}/music"
mus_ev_dir = "#{ev}/music"
jin_ni_dir = "#{ni}/jingles"
jin_mo_dir = "#{mo}/jingles"
jin_da_dir = "#{da}/jingles"
jin_ev_dir = "#{ev}/jingles"
mus_ni = playlist (reload = 360, "#{mus_ni_dir}")
mus_mo = playlist (reload = 360, "#{mus_mo_dir}")
mus_da = playlist (reload = 360, "#{mus_da_dir}")
mus_ev = playlist (reload = 360, "#{mus_ev_dir}")
jin_ni = playlist (reload = 360, "#{jin_ni_dir}")
jin_mo = playlist (reload = 360, "#{jin_mo_dir}")
jin_da = playlist (reload = 360, "#{jin_da_dir}")
jin_ev = playlist (reload = 360, "#{jin_ev_dir}")
promo = playlist (reload = 360, "#{promo_dir}")
ins_ni = rotate (weights = [2, 1], [jin_ni, promo])
ins_mo = rotate (weights = [2, 1], [jin_mo, promo])
ins_da = rotate (weights = [2, 1], [jin_da, promo])
ins_ev = rotate (weights = [2, 1], [jin_ev, promo])
ni = rotate (weights = [3, 1], [mus_ni, ins_ni])
mo = rotate (weights = [3, 1], [mus_mo, ins_mo])
da = rotate (weights = [3, 1], [mus_da, ins_da])
ev = rotate (weights = [3, 1], [mus_ev, ins_ev])
radio = switch (track_sensitive = true,
[
({ 0h - 6h }, ni),
({ 6h - 12h }, mo),
({ 12h - 18h }, da),
({ 18h - 0h }, ev)
])
radio = crossfade(start_next=1., fade_out=1., fade_in=1., radio)
out(
%mp3(bitrate = 320, id3v2 = true),
description = "MP3 320 Kbps",
mount = "main",
mksafe(radio)
)
On my development machine that have real soundcard that works fine: mount point appears in icecast administration panel and i can hear an audio that plays in that mount.
But production vds server (Windows Server 2013 Hyper-V virtualization) has no soundcard (even some virtually soundcard). That`s a sweety thing in Hyper-V. And when I execute this script mount point appears but there is no sound.
Liquidsoap generate this logs
2015/06/20 00:47:07 >>> LOG START
2015/06/20 00:47:07 [protocols.external:3] Didn't find "ufetch".
2015/06/20 00:47:07 [protocols.external:3] Didn't find "wget".
2015/06/20 00:47:07 [main:3] Liquidsoap 1.0.1-win32
2015/06/20 00:47:07 [main:3] Using: graphics=[distributed with Ocaml] pcre=0.1.0 dtools=0.3.0 duppy=0.4.2 cry=0.2.2 mm=0.2.0 xmlplaylist=0.1.3 lastfm=0.3.0 ogg=0.4.3 vorbis=0.6.1 speex=0.2.0 mad=0.4.4 flac=0.1.1 flac.ogg=0.1.1 dynlink=[distributed with Ocaml] lame=0.3.1 aacplus=0.2.0 theora=0.3.0 schroedinger=0.1.0 gavl=0.1.4 ao=0.2.0 taglib=0.2.0 camomile=0.8.1 faad=0.3.0 yojson=1.0.2
2015/06/20 00:47:07 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2015/06/20 00:47:07 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2015/06/20 00:47:07 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2015/06/20 00:47:07 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2015/06/20 00:47:07 [threads:3] Created thread "generic queue #1".
2015/06/20 00:47:07 [threads:3] Created thread "generic queue #2".
2015/06/20 00:47:07 [music:3] Loading playlist...
2015/06/20 00:47:07 [music:3] Playlist is a directory.
2015/06/20 00:47:07 [music:3] Successfully loaded a playlist of 31 tracks.
2015/06/20 00:47:07 [jingles:3] Loading playlist...
2015/06/20 00:47:07 [jingles:3] Playlist is a directory.
2015/06/20 00:47:07 [jingles:3] Got an empty list: keeping the old one.
2015/06/20 00:47:07 [promo:3] Loading playlist...
2015/06/20 00:47:07 [promo:3] Playlist is a directory.
2015/06/20 00:47:07 [promo:3] Got an empty list: keeping the old one.
2015/06/20 00:47:07 [music:3] Loading playlist...
2015/06/20 00:47:07 [music:3] Playlist is a directory.
2015/06/20 00:47:07 [music:3] Successfully loaded a playlist of 20 tracks.
2015/06/20 00:47:07 [jingles:3] Loading playlist...
2015/06/20 00:47:07 [jingles:3] Playlist is a directory.
2015/06/20 00:47:07 [jingles:3] Got an empty list: keeping the old one.
2015/06/20 00:47:07 [music:3] Loading playlist...
2015/06/20 00:47:07 [music:3] Playlist is a directory.
2015/06/20 00:47:07 [music:3] Successfully loaded a playlist of 41 tracks.
2015/06/20 00:47:07 [jingles:3] Loading playlist...
2015/06/20 00:47:07 [jingles:3] Playlist is a directory.
2015/06/20 00:47:07 [jingles:3] Got an empty list: keeping the old one.
2015/06/20 00:47:07 [music:3] Loading playlist...
2015/06/20 00:47:07 [music:3] Playlist is a directory.
2015/06/20 00:47:07 [music:3] Successfully loaded a playlist of 42 tracks.
2015/06/20 00:47:07 [jingles:3] Loading playlist...
2015/06/20 00:47:07 [jingles:3] Playlist is a directory.
2015/06/20 00:47:07 [jingles:3] Got an empty list: keeping the old one.
2015/06/20 00:47:07 [main:3] Connecting mount main for dj#127.0.0.1...
2015/06/20 00:47:07 [decoder:3] Method "MAD" accepted "C:/Users/Administrator/Desktop/dreamsoundstation/efir/evening/music/08 Never Strangers.mp3".
2015/06/20 00:47:07 [decoder:3] Method "MAD" accepted "C:/Users/Administrator/Desktop/dreamsoundstation/efir/daytime/music/07 - Smile when you smile.mp3".
2015/06/20 00:47:07 [decoder:3] Method "MAD" accepted "C:/Users/Administrator/Desktop/dreamsoundstation/efir/morning/music/05 - Pooma - January.mp3".
2015/06/20 00:47:07 [decoder:3] Method "MAD" accepted "C:/Users/Administrator/Desktop/dreamsoundstation/efir/night/music/01 Machine.mp3".
2015/06/20 00:47:07 [main:3] Connection setup was successful.
2015/06/20 00:47:07 [threads:3] Created thread "wallclock_main" (1 total).
2015/06/20 00:47:07 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2015/06/20 00:47:07 [mksafe:3] Switch to safe_blank.
2015/06/20 00:55:27 [main:3] Shutdown started!
2015/06/20 00:55:27 [main:3] Waiting for threads to terminate...
2015/06/20 00:55:27 [main:3] Closing connection...
2015/06/20 00:55:27 [clock.wallclock_main:3] Streaming loop stopped.
2015/06/20 00:55:27 [threads:3] Thread "wallclock_main" terminated (0 remaining).
2015/06/20 00:55:27 [main:3] Cleaning downloaded files...
2015/06/20 00:55:27 >>> LOG END
And I can not see nothing bad. Today I am streaming through Mixxx player with Asio4All. It works fine. But there no so powerfull functionality. So my question is can i use asio4all in liquidsoap? Or maybe i can use some virtual card (but after 15 minutes i don`t find any good solution)

Related

How is the AAC encoder priming delay handled in HLS?

As per Apple, in AAC encoding 2112 priming samples are added at the beginning of audio. When creating HLS stream with AAC audio, will these priming samples be added to the beginning of each HLS segment or only to the first HLS segment? And, how does this AAC encoder delay affect HLS DISCONTINUITY tags later in the HLS stream?
https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html
I depends on the AAC you use.
For 'old-style' AAC-LC you only have priming samples at the beginning of the stream and not at the beginning of each segment.
But the delay is carried through the entire stream.
Typically a new piece of media is displayed after a DISCONTINUITY tag - for example an advertisement - so you will receive another set of priming samples.
Your AAC audio decoder needs to discard the priming samples (first 2112) PCM output samples after startup and after DISCONTINUITY.
If you use the more modern xHE-AAC - you don't have to worry about priming samples anymore.
Another wrinkle - in the early days it was just assumed that AAC-LC has 2112 priming samples.
Now the number can be different and it can be signaled in the MP4 container as Edit-List.

Synchronize + merge audio of one video file into another

Suppose the following:
I got two video files with audio
They are pretty much the same (going by 'images'), but differ in codec, quality, .. and audio.
To have a more specific example, furtermore suppose:
Video 1 (the 'target') is running #24 FPS in 2160p [HEVC]. The first 25 seconds of audio and video are not "belonging"/unessential to the video depicted.
Video 2 is running #30 FPS in 720p [X264]. The first 19 seconds of audio and video are not "belonging"/unessential to the video depicted.
I now want to perfectly merge the audio of "Video 2" into the target Video, so that the audio of both videos pretty match (except e.g. language)
My initial thought would be to synchronize both videos by frames using fingerprinting/hashes similar to various repost checker bots.
Is there an easier method, how would I go from there (preferably using ffmpeg)?
Bonus points if the first 25 seconds of the "Video 1" audio are prepended to the "Video 2" audio while the first 19 seconds are omitted.

ALSA capture stream with 8 channels but opening stream as 4

I'm writing an app for embedded device. The device is connected to an 8 mic board, so 8 channels are transferred into the board. In ALSA this device is visible as HW:3,0.
I've opened the HW:3,0 stream and with:
snd_pcm_hw_params_test_channels()
I've checked the number of allowed channels. The output was 1 - 8.
What happens, if I open the stream and set the number of channels to 4? Does ALSA drops the rest of 4 channels and I get a buffer of CH1 | CH2 | CH3 | CH4 samples or I get CH1 | ... | CH8 in a buffer?
Thank you for help,
Renegade
The hw_params_* constraints are managed by the driver. So the driver gets told that the stream has four channels, and the driver is then responsible to configure the hardware to generate four samples per frame.

Cobalt raspi-2_gold is unable to play video

When running raspi-2_gold of cobalt, it is unable to play the selected video. It is stuck at the black screen.
What works:
It is able to load all the thumbnails initially
Able to select a video
All video controls working fine
Did try nerd stats, NO frames received, displaying Codecs, ID, viewport, Volume, Connection speed, Buffer health.
also all thumbnails below the video are shown
What doesn't:
No video as well as audio
Tried videos of all resolution, results are same = NO Video & Audio
Questions:
Are there specific certificate requirements
Any audio/video library requirements
ERROR MESSAGE
[2278:1362215416:ERROR:player_internal.cc(134)] Not implemented reached in void SbPlayerPrivate::SetVolume(double)
[2280:1362347860:WARNING:thread_set_name.cc(36)] Thread name "omx_video_decoder" was truncated to "omx_video_decod"
[2279:1362349124:INFO:player_worker.cc(136)] Try to seek to timestamp 0
[2280:1362352181:INFO:open_max_component_base.cc(82)] Opened "OMX.broadcom.video_decode" with port 130 and 131
[2283:1363620269:INFO:alsa_audio_sink_type.cc(241)] alsa::AlsaAudioSink enters idle loop
[2282:1363554339:FATAL:open_max_component.cc(216)] Check failed: false. OMX_EventError received with 80001000 0
starboard::raspi::shared::open_max::OpenMaxComponent::OnErrorEvent() [0x17eedd8]
starboard::raspi::shared::open_max::OpenMaxComponentBase::OnEvent() [0x17f34ec]
starboard::raspi::shared::open_max::OpenMaxComponentBase::EventHandler() [0x17f375c]
Caught signal: SIGABRT (6)
<unknown> [0x75cc6180]
<unknown> [0x75cc4f70]
Aborted
Thanks to #Andrew Top for the answer. Setting the memory split to 256 MB worked. Videos were playing quite well. The HQ videos and 360 degree ones need up to 256 MB of GPU, 720p and below could be played in at least 200 Mb of GPU.

SDP file for PCM audio stream?

I am multicasting PCM audio from mpd through pulseaudio to the network and receive it with VLC. This works fine as long as the audio is 44.1kHz - every other sampling rate results in VLC complaining it needs a correct SDP file describing the stream.
Is there a way to either
a) save the current "settings" in a running VLC session to a SDP file (to later edit it) or
b) create an SDP file by hand, which has these settings included:
rtp://#239.0.0.100:27028
24000Hz sampling rate
PCM Audio, 16bit
Thanks for any help or pointers!
This is what PulseAudio outputs with a debug level of 4 and works as the content of test.sdp:
v=0
o=root 3619500147 0 IN IP4 10.12.65.99
s=PulseAudio RTP Stream on RAMPv6
c=IN IP4 239.0.0.100
t=3619500147 0
a=recvonly
m=audio 27028 RTP/AVP 98
a=rtpmap:98 L16/24000/2
a=type:broadcast

Resources