stream mp3 from a file

Reebo

New Member
How can I create an audio stream only from mp3 file?
Is there a solution like vod:// for mp4?

Thanks in advance.

Marco
 

Max

Administrator
Staff member
Good day.
WCS supports VOD streaming from MP4 container only, please read here. You can re-encode MP3 file to audio only MP4 file with AAC codec, for example
Code:
ffmpeg -i file.mp3 -vn -acodec aac -ar 48000 -ac 2 -ab 128 -f mp4 file.mp4
 

Reebo

New Member
Thanks it works!!!! But poor quality and mono audio.
Could I improve quality and stream stereo audio?

Thanks in advance.

Marco
 

Max

Administrator
Staff member
Which player is used?
Stereo AAC can be played as stereo as HLS or RTSP with the default config, as RTMP - with flash_handler_play.sdp, and as MSE - with mse.sdp with 2 channels.
As WebRTC in Chrome will be played as mono (there is an issue).
 

Reebo

New Member
Hi Max,
I used the html page of "player" of the examples, is there any other better way to play an audio-only stream with autoplay on a web page (cross-browser)???
Thanks in advance for your support.

Marco
 

Max

Administrator
Staff member
I used the html page of "player" of the examples, is there any other better way to play an audio-only stream with autoplay on a web page (cross-browser)???
This is a good enough way.
So, you're publishing AAC stream from a file, then playing in browser via WebRTC as Opus (browsers do not support AAC playback). In this case, audio is transcoding fro AAC to Opus. You can increase the quality by Opus encoder bitrate setting in flashphoner.properties file
Code:
opus.encoder.bitrate=128000[/ICODE]
You can also play stereo in Chromium based browsers using the tweak described [URL='https://docs.flashphoner.com/display/WCS52EN/In+a+browser+via+WebRTC#InabrowserviaWebRTC-Chromium-basedbrowsers']here[/URL]
 
Top