How can I record a video call in Janus? - recording

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?

Related

Audio cannot be decoded (Firefox only)

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

Rails Active Storage : video_tag not showing video

I m trying to implement some upload then play video in my app using Rails 5.2.3 and Active Storage. After fighting with active storage for a while i m finally sure that my attachment is containing the file i want to attach => after inspecting the src is correct
The problem here is that i keep getting those warnings from firefox console :
HTTP "Content-Type" of "text/html" is not supported. Load of media resource http://localhost:3000/rails/active_storage/blobs/eyJfcmFpbHM…JibG9iX2lkIn19--a44730f58a07282f626737b6a541d57fa9dc11c4/vid failed. 23
Cannot play media. No decoders for requested formats: text/html
and a video area with the following message "
No video with supported format and MIME type found"
Now, the console warnings are only showing up in Firefox but the video isn't playable in all the browsers that i tested so i think that my problem got something to do with the warning. I m new to rails so i ve tried all what i have found in google without solving my problem.
I m showing the video with the video_tag this way :
<%= video_tag(url_for(#play.clip), style: "width:100%;height:auto", :controls => true) if #play.clip.attached? %>
And added a meme_types.rb in initializers with the following code
Rack::Mime::MIME_TYPES.merge!({
".mp4" => "video/mp4",
})
I have tried to display the video using plain html5 ( which is the same) and i m naturally getting the same warnings...
fixed. The issue wasn't coming from the active storage itself. The get request to play the video was stopped by a line i wrote in routes.rb to make all "unknown routes" redirect to root_path :
get '*path' => redirect('/')
Now t hat the video playing video has been fixed i have to deal with "redirecting unknown paths to root without causing a problem with the GET "

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

Can not play local rtsp URL using FFmpeg in iOS

I am using FFmpeg for stream rtsp URL in iOS.
I am trying to stream a local url but my app is failed to open url
avformat_open_input method always return -5
I have played the same url rtsp://172.16.1.226:5544/1 on VLC media player on my iPhone and macbook it works on both.
After few research i have found there is some problem with rtsp_transport
I was using av_dict_set(&serverOpt, "rtsp_transport", "tcp", 0); for the server configuration while opening url and the result is can not open feed.
When I changed it to av_dict_set(&serverOpt, "rtsp_transport", "udp", 1);
I am able to open url successfully but I continuously getting error rtsp 1 missing packet and so on.
Can anybody help what should be the right configuration while opening a local rtsp url using ffmpeg.
Should i need to update av_dict_set(&serverOpt, "rtsp_transport", "udp", 1)
Thanks in advance
Yes you can use UDP means av_dict_set(&serverOpt, "rtsp_transport", "udp", 0) in your code it will work.
You can also skip this step. I am playing local and remote both RTSP URL and setting nothing.
Direct open the URL using avformat_open_input without specify the rtsp_transport.

MediaPlayerLauncher with HTTPS

I would like to open an audio file from an HTTPS resource.
First, I tried using MediaPlayerLauncher like so:
MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher {
Media = filename,
Controls = MediaPlaybackControls.Pause,
Orientation = MediaPlayerOrientation.Portrait,
Location = MediaLocationType.None
};
mediaPlayerLauncher.Show();
filename in this case is a URL beginning with https://.
Using Fiddler to monitor traffic, I have noticed that https:// in filename is getting changed to http://.
Next I tried opening the same URL using WebBrowserTask:
WebBrowserTask webBrowser = new WebBrowserTask {
Uri = filename
};
webBrowser.Show();
Checking Fiddler out again, I noticed that two requests are being sent. First is a request to filename by the browser. This results in the "Tap to open file" message to appear in the browser. Tapping it opens the phone's media player (MediaPlayerLauncher?), which sends another request -- in this case, the https:// changed to http:// again (which is similar result to first attempt).
The server I am getting the file from only supports HTTPS, hence the problems arising when the media player requests the file as HTTP.
Is there anyway to stream a file from an HTTPS resource? Does Windows Phone's media player even support it?
Pointing location on the internet for the MediaLuncher is a bad idea. It will freez UI thread and your app won't be responsive. Try first download the audio as a stream and then play it. Use WebClient to open a stream. HTTPS can be open in WP7, so that shouldn't be a problem.

Resources