how to embed video (avi/mpg4) in Xaringan slides - r-markdown

I'm trying to embed some local videos into my xaringsn presentation.
I've succesfully embedded GIFs but I need more quality and AVI or MPG4 are mandatory
The issue is I can't get the video embedded no matter if I use markdown syntax or html syntax
![video](media/animation.avi)
<video width="320" height="240">
<source src="media/animation.mp4" type="video/mp4">
</video>
any hint would be much appreciated

Your latter one with video should work. Just won't show up on the RStudio Viewer Pane so check using another browser, e.g. Google Chrome.

Related

How to embed auto-generated English subtitles with either youtube-dl or yt-dlp?

The key here is to be able to embed the auto-generated subtitles.
The tool can download the autogenerated subtitles but can only embed the real subtitle file, if it exists. I wondered if there would be a way to embed or capture in the video the auto-generated subs. Thanks!
Emmbed Subtitle To Video
--embed-subs: Embed subtitles in the video (only for mp4, webm and mkv videos)
When --embed-subs and --write-subs are used together, the subtitles are written to disk and also embedded in the media file. You can use just --embed-subs to embed the subs and automatically delete the separate file.
don't forget to list the available subtitles using --list-subs.
You can find more like this here
Burn Subtitles To Video
Burn subtitles into the video is also an easy step. You can do this just using commonly used VLC Media Player and can be downloaded from here. I found a great video about this. you can do this with just 4 easy steps by following this video

download mp3 from google translate text to speech in Albanian

I am trying to download mp3 files from Google translate using the Albanian country code "al"
http://translate.google.com/translate_tts?tl=al&q=dritare
but I get
video playback aborted due to a network error
I'm using Firefox and windows 7.
I use this method successfully with other languages for example Italian
http://translate.google.com/translate_tts?tl=it&q=esercito
and then I can download the mp3 just fine. I have also tried English and Greek.
Albanian text to speech it is supported by Google translation and I can hear the text pronounced in Albanian when I press the sound icon.
I have also tried in Chrome and it isn't working there either.
Thanks
The code for the Albanian language is "sq" not "al" which is the country's code. So if you type for example
http://translate.google.com/translate_tts?tl=sq&q=po
everything works fine!

Play videos in Sharepoint

In SharePoint 2013 I want to have a web part with 3 videos. When the user click on one of them,
the player will open in a new window. Videos must be streamed in order to preserve bandwidth.
I started learning about the media web part, but I'm still pretty new to SharePoint 2013 so I don't want to spend time on a solution that doesn't work in the end.
If you have any ideas on what solution would best fit my scenario, that would help me greatly.
Thank you.
I have limited experience with video libraries in SharePoint 2013, but here is what has worked for me:
Quicktime formats open in a new window.
WMV format will play in the browser.
I have had a lot of problems with just uploading mp4 files (never finishes the upload, regardless of file size), and haven't tried out the others.
Maybe this will help someone.
The player from Sharepoint 2013 supports only certain formats(for HTML5 : asf, avi, mpg, mp3, mp4, ogg, ogv, webm, wma, wmv ; classic Silverlight Media Web Part supports: asf, mp3, mp4, wma, wmv).
I had to support swf files so I searched for other options. I found this one https://code.google.com/p/youplayer/downloads/detail?name=mediaplayer.swf and it works for me.

Visual c++ load rtf document contains images and text in richedit box?

I am currently working on a project. I have an rtf file which contains some text and images both. I need to display those images and text from rtf to richtextbox in Visual C++. We are not using .Net frameworks or MFC's so everything is in Visual C++ only.
I do'nt have any idea how to do it. If anyone can guide me then it will be really helpful. Thanks in advance.
RichTextBox cannot load HTML. It can load only RTF or plain text.
There are 3rd party components that can convert HTML to RTF, but they don't really do a good job especially when dealing with images. I had done intensive research on this for my sticky notes product Notezilla.
You can use the Web Browser control to show your HTML.

From C++ image frames to html5 <video tag in client browser

In my C++ application I have video image frames coming from a web camera.
I wish to send those image frames down to a HTML5 video tag element for live video playing from the camera. How can I do this?
For a starting point you are going to want to look into WebM and H.264/MPEG-4 AVC. Both of these technologies are used as HTML5 media streams. It use to be that FireFox only supported WebM while Safari and Chrome both supported H.264. I am not sure about their current states, but you will probably have to implement both.
Your C++ will then have to implement a web server that can stream these formats on the fly. Which may require significant work. If you choose this route this Microsoft document may be of some use. Also, the WebM page has developer documentation. It is possible that H.264 must be licensed for a cost. WebM allows royalty free usage.
If I am not mistaken neither of these formats has to be completely downloaded in order to work. So you would just have to encode and flush the current frame you have over and over again.
Then as far as the video tag in HTML5 you just have to provide it the URLS your C++ server will respond to. Here is some documentation on that. Though, you may want to see if there is some service to mirror these streams as not to overload your application.
An easier way to stream your webcam could be simply to use FFMPEG.
Another usefull document can be found at:
http://www.cecs.uci.edu/~papers/aspdac06/pdf/p736_7D-1.pdf
I am no expert, but I hope that at least helps you get your start.