video – Stream PC screen and audio to Web

I have an application in C# and I’d like to share the PC’s monitor(s) and audio to ChromeCast. It looks like the best approach is to stream the screen and audio to a website, and load the website in ChromeCast. I found a library called “ScreenRecorderLib” which can record my screen and save it to MP4 in segments so I can watch it while I am still recording. The problem I am facing right now is that when I open the web page, I see the video up to the point I opened the page. I have to refresh to get the rest of the video, and of course the video plays from the beginning. For the webpage I use ASP.net, and I made this controller:

public class VideoController : ApiController
{
      public HttpResponseMessage Get()
      {
            Func<Stream, HttpContent, TransportContext, Task> func = WriteToStream;
            var response = Request.CreateResponse();
            response.Content = new PushStreamContent(func, new MediaTypeHeaderValue("video/mp4"));

            response.Headers.Add("Connection", "keep-alive");
            return response;
      }

      public async Task WriteToStream(Stream outputStream, HttpContent content, TransportContext context)
      {
            try
            {
                var buffer = new byte(65536);
                using (var video = File.Open("screen.mp4", FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
                {
                    var length = (int)video.Length;
                    var bytesRead = 1;
                    while (true)
                    {
                        bytesRead = video.Read(buffer, 0, buffer.Length);
                        await outputStream.WriteAsync(buffer, 0, bytesRead);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("ERROR: " + ex.Message);
                return;
            }
            finally
            {
                outputStream.Close();
            }
        }
}

My HTML is very simple:

<html>
<video src="/video" controls autoplay>
</html>

Can someone give me some ideas how to achieve this?

html – ¿Por qué no se descarga el vídeo con el atributo download?

Tengo el siguiente código. Sin embargo, no puedo descargar el vídeo cuando inserto el atributo download en el enlace y lo pulso. ¿Alguna solución?

<video nodownload controls src="https://es.stackoverflow.com/mivideo.mp4" height='315' width='560'></video><br><br>

<a href="https://es.stackoverflow.com/mivideo.mp4" download>Descargar</a>

video – ffmpeg stuck on last couple of frames during alphamerge

I’m trying to put alpha channel on an mp4 file, using an alpha file that I have previously extracted. The command that I’m using with some tuning flags is this:

ffmpeg -hide_banner -i video.mp4 -i alpha.mp4 -filter_complex "(0:v)(1:v)alphamerge" -c:v libvpx -c:a libopus -b:v 2900k -crf 40 -pix_fmt yuva420p -threads 32 -auto-alt-ref 0 final_4.webm -loglevel verbose

Both the files video.mp4 and alpha.mp4 are 4k, 60fps

The issue that I’m facing is this: the whole process works normally until the very last one or two frames, then ffmpeg just hangs indefinitely with this last output frame= 90 fps=1.2 q=0.0 size=1kB time=00:00:01.49 bitrate=5.4kbits/s speed=0.02x, no output in verbose or trace mode also.

Surprisingly, this is working for some other videos which are similar to video.mp4

ffprobe video.mp4 outputs this:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:00:01.53, start: 0.000000, bitrate: 2972 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 3840x2160 (SAR 1:1 DAR 16:9), 2905 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 70 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

ffprobe alpha.mp4 outputs this:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'alpha.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:00:08.18, start: 0.000000, bitrate: 705 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 3840x2160 (SAR 1:1 DAR 16:9), 698 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      timecode        : 00:00:00:00
  1. Is there a way to add more verbosity to at least know what’s going on at this point?
  2. Is there any other way I can do this such that it is more reliable and works, unlike this method?

advanced custom fields – ACF Pro – get_field image and video not working

I have the following code on the homepgae but for some reason I can’t get the poster image and video src to work. Could you help me with it.

<?php $our_values = get_field('our_values'); ?>
<?php $our_values_image = get_field('video_poster_image'); ?>
<?php $our_values_video = get_field('values_video'); ?>

<?php if($our_values('values_video')): ?>
    <section class="video-section">
        <div class="container">
            <div class="one-half">
                <div class="home-intro">
                    <?php if($our_values('heading')): ?>
                        <h2 class="text-welcome"><?php echo $our_values('heading'); ?></h2>
                        <div class="line-rule"></div>
                    <?php endif; ?>
                    <?php echo $our_values('body_copy'); ?>
                </div>
            </div>
            <div class="one-half">
                <div class="home-video">
                    <video controls="controls" autoplay="false" class="video" loop="false" muted="" poster="<?php echo $our_values_image('url'); ?>">
                        <source id="mp4" src="<?php echo $our_values_video('url'); ?>" type="video/mp4">
                    </video>
                </div>
            </div>
        </div>
    </section>
    <div class="clearfix"></div>
<?php endif; ?>

Ronny

video – ffmpeg how to extract audio from mkv to ogg

ffmpeg how to extract audio from mkv to ogg. My mkv file have 2 audio track. I use this command.

ffmpeg -i test.mkv -vn -acodec copy audio.ogg

It show error like this.

(ogg @ 00000186dcba1040) Unsupported codec id in stream 0
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
    Last message repeated 1 times

How to extract audio from mkv to ogg.

Other – Best Video Hosting Service from Proxies123.com.com | Proxies123.com

Dear Wjuncation members,

Need Good Suggestion to Use Video hosting Service – I can see many of the video hosting come and died soon after working for 5 to 6 month, Recently there are many new Video host launched like Oogly.io, Aparat.cam, MixDrop.co, Okstream.co Easyload.io
PlayTube.ws, Streamtape.com, StreamZ, Dood.to etc and etc, but iam getting confusion to choose which one is best and good for video hosting and providing Downloading Option to the user and play video files in all Devices, getting confuse to chose the video hosting company,

i can see all the video hosting look similler, but i can see like okstream.co is a new hosting company and provide download option and showing inactives files and has dmca manager option also and their player is fast aswell but its new and getting confuse to trust this video hosting,

if iam going to create my own then i have to pay to much for script and server and i have to hair somebody to look my server, what is your best suggestion which one is best and long term and trusty to use it, i tried gounlimited also but their domain is blocked in india and many more countries may be, because they are saying they are older host since from 2016, but i can tell that there is old host like hxload from long time too since from 2016 which ignored dmca. really getting confusion to chose and continue doing business. if i trust one and keep uploading and die after 4 month then all the efforts will lost like vidload.net – died in some month after launched.

need your honest opinion to use the hosting company for movies and tv series website with download option

 

Trump who defends the confederate flag and  tweeted a video of a guy yelling “white power” thinks “Black Lives Matter” is a symbol of hate?

When Trump has a chance to attack Democrats he acts with speed and focus. But when he learned that Russia was offering bounties on US soldiers he ignored it, and even lobbied for Russia to rejoin the G8 (currently the G7).

 

This is a far bigger scandal than Benghazi but conservatives will ignore it because they are partisan traitors with hatred in their hearts. 

Other – Best Video Hosting Service from Wjuncation.com | Proxies123.com

Dear Wjuncation members,

Need Good Suggestion to Use Video hosting Service – I can see many of the video hosting come and died soon after working for 5 to 6 month, Recently there are many new Video host launched like Oogly.io, Aparat.cam, MixDrop.co, Okstream.co Easyload.io
PlayTube.ws, Streamtape.com, StreamZ, Dood.to etc and etc, but iam getting confusion to choose which one is best and good for video hosting and providing Downloading Option to the user and play video files in all Devices, getting confuse to chose the video hosting company,

i can see all the video hosting look similler, but i can see like okstream.co is a new hosting company and provide download option and showing inactives files and has dmca manager option also and their player is fast aswell but its new and getting confuse to trust this video hosting,

if iam going to create my own then i have to pay to much for script and server and i have to hair somebody to look my server, what is your best suggestion which one is best and long term and trusty to use it, i tried gounlimited also but their domain is blocked in india and many more countries may be, because they are saying they are older host since from 2016, but i can tell that there is old host like hxload from long time too since from 2016 which ignored dmca. really getting confusion to chose and continue doing business. if i trust one and keep uploading and die after 4 month then all the efforts will lost like vidload.net – died in some month after launched.

need your honest opinion to use the hosting company for movies and tv series website with download option

 

How to disable the suggested videos displayed over the ongoing video that come in YouTube near the end of the ongoing video?

I find it annoying since these suggested videos just pop up and cover the screen of the current video that I am watching.

I can do video editing in very simple and short time. for $5

I can do video editing in very simple and short time.

We will give you the video editing according to the ration and your recruitment. We will make the video very honestly and in the best way. Trust us once and watch it.


Thank youThank you

.