Audio cannot be decoded (Firefox only) - firefox

When trying to play certain audio files loaded from a blob in Firefox, I get this error:
Media resource xyz.mp3 could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004)
Details: virtual mozilla::MediaResult mozilla::FFmpegAudioDecoder<46465650>::DoDecode(mozilla::MediaRawData *, uint8_t *, int, bool *, mozilla::MediaDataDecoder::DecodedData &): FFmpeg audio error:-1094995529
Any ideas why this is happening? I don't get the error on Chrome, and it's unclear why this is happening for some audio files and not others. If you load the original mp3 directly in firefox, it plays fine (i.e. click "xyz.mp3" in the error message).
The FFmpeg error is: AVERROR_INVALIDDATA

Related

Unhandled Promise Rejection: Error: Untrusted URL when I load Youtube video inside WebView on JavaFX

When I load a Youtube video using WebView directly from YT, I get all the page data, but the video stays charging without showing the video itself. This issue is new because the previous week that worked adequately.
I suppose that Youtube has made some changes to prevent embedding video pages inside JavaFX WebView component.
Please use the following repository to see a test.
https://bitbucket.org/diegoluisr/javafx-webview-youtube-test/src/master/enter link description here
WebKit browser prints in the console the following lines...
Console: [https://www.youtube.com/yts/jsbin/player_ias-vflPI0brM/en_US/base.js:39] Unhandled Promise Rejection: Error: Untrusted URL: https://r3---sn-qpgxju8jva-cvbe.googlevideo.com/videoplayback?expire=1564559165&ei=3PJAXYPFN7n6j-8Podm9WA&ip=191.102.199.174&id=o-AFpZ9-9BjKhhYLbO9zoBJ-koAlgU4_rl5mhm-RAcZPp2&itag=22&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-qpgxju8jva-cvbe%2Csn-hp57knly&ms=au%2Crdu&mv=m&mvi=2&pl=24&ctier=L&initcwndbps=236250&mime=video%2Fmp4&ratebypass=yes&dur=10.100&lmt=1563964109911459&mt=1564537439&fvip=2&c=WEB&txp=5316222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cctier%2Cmime%2Cratebypass%2Cdur%2Clmt&sig=ALgxI2wwRgIhAND23sayeeFGInqso6n2wt5VI1-8CmEwn3BS7KEqdFZ0AiEAokZIzzORQLnQLDhnoUmK6gSJP1FxDnpJAIcPNOVxoxg%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRQIgH9Mxi8qnf2E1yvcvfA8gjeJTBKe_kKBklEhjz82gWK4CIQCX6D8qZbu-Dpy-NkCRcluo-OOLSzuu8mgEwgni5_8RFA%3D%3D
Console: [https://www.youtube.com/yts/jsbin/player_ias-vflPI0brM/en_US/base.js:39] Unhandled Promise Rejection: Error: Untrusted URL: https://r4---sn-qpgxju8jva-cvbe.googlevideo.com/videoplayback?expire=1564559175&ei=5_JAXe6MCoS2lAOI14eoBA&ip=191.102.199.174&id=o-ALfOT4rp_IeL6a86s4a2nTlmva4YgQkA9yc_o-ma4_hG&itag=22&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-qpgxju8jva-cvbe%2Csn-hp57knzz&ms=au%2Crdu&mv=m&mvi=3&pl=24&ctier=L&initcwndbps=236250&mime=video%2Fmp4&ratebypass=yes&dur=119.559&lmt=1563514693761974&mt=1564537439&fvip=4&c=WEB&txp=5316222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cctier%2Cmime%2Cratebypass%2Cdur%2Clmt&sig=ALgxI2wwRQIhAI-C_mVNjdJNzAK249RkB62Blm7jw1_FjwQvkebmhCMUAiBOzmlsdMCZriM9VSmcAVM-BzxzGpcK49kHGg8izPQfVA%3D%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRAIgMRZJB2yOLTSlIgblsfaMsK56HcO6MQ6bklYQDnLczM4CIGXeJsTlmhBTDodytkm2jO5Gc6SmY6Q6sjQmwVrUXnvH
Console: [https://www.youtube.com/yts/jsbin/player_ias-vflPI0brM/en_US/base.js:39] Unhandled Promise Rejection: Error: Untrusted URL: https://r2---sn-qpgxju8jva-cvbe.googlevideo.com/videoplayback?expire=1564559162&ei=2vJAXYWoHOXbj-8Prs-DgAo&ip=191.102.199.174&id=o-AO7C5x6ZIyPXAr2qK_vIPflPjs-AOMY2IJVZliAV72Cp&itag=18&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-qpgxju8jva-cvbe%2Csn-hp57kn6e&ms=au%2Crdu&mv=m&mvi=1&pl=24&initcwndbps=236250&mime=video%2Fmp4&gir=yes&clen=19015393&ratebypass=yes&dur=348.856&lmt=1537207191333104&mt=1564537439&fvip=2&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRQIgW0bSjfFcOWJAwx2_jlafwhDh5-QSE4QaHLllKQUCoXgCIQCcEWzrSiuhAAj9ibUukTnM9_Z7Ln8u8ZbxH4gfqid-fw%3D%3D
You could notice three console lines, that is because the player tried to load 2 Advertising video before the "Alice in Chains" video.
I solve my problem working around it; I have to use a commercial component named JxBrowser. This component uses a chromium implementation (version 69) that allows the embed player to work, and disable gestures required to autoplay.
You could find more information on the component website
https://www.teamdev.com/jxbrowser

How can I record a video call in Janus?

I added a "REC" button in the video call which on click does the following request:
videocall.send({"message": { "request": "set", "record" : true, "filename" : "/opt/janus/share/janus/recordings/1111" }});
This guide explains that
record enables or disables the recording of this peer; in case recording is enabled, filename allows to specify a basepath/filename to use for the file (-audio.mjr and -video.mjr are automatically appended)
I tried the video call. The audio and video mjr files are actually created in the specified path under the specified name. Then (I still don't know what other way could I play them) I add manually a .nfo file to read them with the plugin "Recorder/Playout" - it works fine with records from the Video Room - but when I open the record from the list it appears the message "Error opening recording files" and in the terminal where janus is running these errors and warnings appear:
[ERR] [plugins/janus_recordplay.c:janus_recordplay_get_frames:1607]
Invalid header...
[WARN] Error opening audio recording, trying to go
on anyway
[ERR]
[plugins/janus_recordplay.c:janus_recordplay_get_frames:1607] Invalid
header...
[WARN] Error opening video recording, trying to go on anyway
Anyone has a solution?

How do I extract and record audio in webRTC on Firefox?

I implemented one to one webRTC video chat (Both audio and video)
navigator.getUserMedia({
audio: true,
video:true
}, function (stream) {
}, function(err){
})
But i want to record only audio of the chat session. In chrome i am able to record by using RecordRTC, But in Firefox i am getting video+audio file (webM).
How do I extract audio in Firefox from audio+video stream?
you have one of two ways to do it, when you make new recording, you do new RecordRTC(stream, config):
currently the stream you are passing must be videostream, you can change it to audiostream as stream.getAudioTracks()[0], I have not tried this, but guessing that it should work.
or as part of config, add an attribute recorderType: window.StereoRecorder, now it would use StereoRecorder and not firefox's own MediaStreamRecorder.
p.s: have you tried recording remote stream in chrome, because chrome supports recording only stereo mode and webrtc provides audio in mono mode.

Convert mp3 to ogg via Paperclip (S3) on Heroku

I have a media attribute (from paperclip) that can be audio or image. I use an HTML5 audio player (jplayer) for an audio player on the front-end which works well in Chrome and Safari but Firefox has trouble with mp3 and needs a ogg format file. I see usage of ffmpeg but am unsure how to implement to also work on Heroku. I have tried using paperclip-ffmpeg like below but it hasn't been re-formatting the file (have tried format as 'ogv' and 'ogg'):
has_attached_file :media, styles: { ogg: { format: 'ogv' } }, processors: [:ffmpeg]
Any ideas?

Uncaught SyntaxError: An invalid or illegal string was specified

The following line produced the error Uncaught SyntaxError: An invalid or illegal string was specified on the Chromecast device:
var audioBuffer = myAudioContext.createBuffer(1, 500 , 8000);
I have not tried on other browser. Any suggestions?
Edit, upon further testing:
Firefox and Chrome Desktop versions have no error.
Safari desktop version does have the same error as the Chromecast device.
Is there another way to do this: playing raw pcm audio data on the Chromecast device?

Resources