Giter Site home page Giter Site logo

sharpavi's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sharpavi's Issues

MPEG-4 issue

Hi,

i tried your SharpAVI but using x264 codec it returns (your encoder constructor) that i dont have MPEG-4 compatible codec but getavailablecodec() return x264 . How i can work with this? Thanks
F

Different resolutions crop in video

I have a tablet with 1920x1200 resolution and with windows magnification (recommended by windows) by 150%.

The problem is that it doesn't capture the screen correctly.
If you remove the magnification it works perfectly.

Leaving the magnification but adding a more standard resolution like fullHd (1920x1080) also works.
It seems to be a problem with this resolution + magnification.

NOTE: It is not possible to change the resolution of the tablet.

Video is coming out upside down

Dear Sir,

I am trying to produce a video from a single image (eventually a series of images) into a video sequence.

After some success with the following (copied) code I am finding that my video is coming out upside down.

This is a rest call in WebAPI...

public IHttpActionResult PostVideo(TTSResp ttsi)
        {
            try
            {
                var syspath = System.Web.HttpContext.Current.Request.MapPath(@"~\");

                var writer = new AviWriter(syspath +"test.avi")
                {
                    FramesPerSecond = 30,
                    // Emitting AVI v1 index in addition to OpenDML index (AVI v2)
                    // improves compatibility with some software, including 
                    // standard Windows programs like Media Player and File Explorer
                    EmitIndex1 = false
                };

                // returns IAviVideoStream
                var stream = writer.AddVideoStream();
                // set standard VGA resolution
                stream.Width = 362;
                stream.Height = 238;
                // class SharpAvi.KnownFourCCs.Codecs contains FOURCCs for several well-known codecs
                // Uncompressed is the default value, just set it for clarity
                stream.Codec = KnownFourCCs.Codecs.Uncompressed;
                // Uncompressed format requires to also specify bits per pixel
                stream.BitsPerPixel = BitsPerPixel.Bpp32;

                // read one image
                var path = System.Web.HttpContext.Current.Request.MapPath(@"~\Images\mouth00.jpg");
              
                var i = 0;
                while (i < 300)
                {
                    var bitmap = new Bitmap(path);
                    
                    // I thought this might fix the problem but no...
                    bitmap.RotateFlip(RotateFlipType.Rotate180FlipY);

                    var bits = bitmap.LockBits(new Rectangle(0, 0, 362, 238), ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb);

                    var frameData = new byte[stream.Width * stream.Height * 4];
                    Marshal.Copy(bits.Scan0, frameData, 0, frameData.Length);
                    bitmap.UnlockBits(bits);
                    
                    // write data to a frame
                    stream.WriteFrame(true, // is key frame? (many codecs use concept of key frames, for others - all frames are keys)
                                      frameData, // array with frame data
                                      0, // starting index in the array
                                      frameData.Length // length of the data

                    );
                    i++;
                }
                
                writer.Close();
                return Ok("");
            }

Attached is an screenshot of the produced video (which is upside down)...
image

x264vfw Record Error..

When I Try Make VideoStream...

Sometime Error.... ( maybe case by case about Record Size. )

( I think When Try record Small Bitmap... CreateVideoStream Error... | Just x264vfw Codec )

   public static CodecInfo[] GetAvailableCodecs()
    {
        var result = new List<CodecInfo>();

        //var inBitmapInfo = CreateBitmapInfo(8, 8, 32, KnownFourCCs.Codecs.Uncompressed);   <--- Okay
        var inBitmapInfo = CreateBitmapInfo(385, 160, 32, KnownFourCCs.Codecs.Uncompressed);   <--- Error
        inBitmapInfo.ImageSize = (uint)4;

        foreach (var codec in DefaultCodecPreference)
        {
            //var outBitmapInfo = CreateBitmapInfo(8, 8, 24, codec);   <--- Okay
            var outBitmapInfo = CreateBitmapInfo(385, 160, 24, codec);    <---- Error
            VfwApi.CompressorInfo compressorInfo;
            var compressorHandle = GetCompressor(inBitmapInfo, outBitmapInfo, out compressorInfo);
            if (compressorHandle != IntPtr.Zero)
            {
                VfwApi.ICClose(compressorHandle);
                result.Add(new CodecInfo(codec, compressorInfo.Description));
            }
        }

        return result.ToArray();
    }

public class CodecInfo
{
    public CodecInfo(FourCC codec, string name);

    public FourCC Codec { get; }
    public string Name { get; }
}

Size = 8,8 Okay !
Size = 385, 160 Error !
Size = 1920, 1080 Okay !

Size = Something ( Sometime Okay, Sometime Error Because Record Size )

Thank you So much ^^

Trouble with x264vfw

x264vfw [warning]: Few frames probably would be lost. Ways to fix this:
x264vfw [warning]: - if you use VirtualDub or its fork than you can enable 'VirtualDub Hack' option
x264vfw [warning]: - you can enable 'File' output mode
x264vfw [warning]: - you can enable 'Zero Latency' option
When i trying record screen with x264vfw encoder i got this, and black screen on 1-5s of video, you recommended to check Zero Latency option, but i cant understand how, can you help pls?

Clarification on licensing of components

Hi,

Thanks for this project!

I can see that this project has a permissive license, but it's not clear whether there are any further licensing issues for components used by this library. For example, where did lameenc32.dll come from & what license does it have?

Thanks, Darren.

Continuous recording, writing out to multiple files

I am thinking of creating a method in AviWriter that would allow closing the current .avi file and creating a new one, continuing to write the frames and audio to the new one. This would allow continuous recording, by adding a new N-minute file, and deleting the oldest N-minute file. Before I start on this, do you think this approach would work well? Are there any gotchas that I need to look out for or do you think an alternative approach would be better?
PS: Many thanks for this library, it's does what it claims really well. :-)

When using any codec only first frame is visible on the recorded AVI

Hello baSSiLL,

I am trying to use your SharpAvi library in our project based on .NET Framework 4.8

I downloaded your code and set the Sample as start project, no other changes. When I try to record a screencast video by using any of Motion JPEG codecs your software records a video which contains only 1 frame as screenshot, ther rest frames are just black screen.

Only Encoder = (none) works, but the file size is VERY big.

Please check if your sample ist still working.

I use Windows 10 21H2 x64, VS 2022 (17,7,1).

Regards,
ivancoredev

Realtime MPEG-4 encoding

Hi,

I'm trying to do some realtime encoding with a usb capture device. I'm getting 1920x1080 bitmap frames, and i what to make realtime encoding. MPEG-4 would be perfect.

Have you tried this before?!
I know, this is not a issue but i already tried everything with FFMPEG and it can't take the task.

SharpAvi and UWP

Hi baSSiLL

I have successfully used your library in a desktop bridge application. Your example code helped me alot. Thank you.

I wonder if its possible to use your library in a UWP app. You do not have access to a screenshots in a UWP app, but if I could create bitmaps would it work?

thanks
Haydn

Resulting Video Playback Problems using VLC

I can successfully create a video that plays perfectly with Window Media Player. However, when I try to play it in VLC (which can play pretty much everything), something strange happens. All frames in the video are played. However, they are played at a rate of 1 minute per .2 seconds. That is you might miss the video if you blink.

I seems like the resulting video is missing some timing information that VLC relies on. I haven't tried other players. I'm trying to use VLCLibSharp for playback in my app, and this just isn't working. The stand alone VLC player does the same thing.

It is hard to know if the problem is with this utility or with VLC.

AviWriter does not close file

After a
using (AviWriter writer = new AviWriter(fn))
{
...
writer.close();
}
it is not possible to access the file until process ist terminated.

var s = new BufferedStream(File.OpenRead(fn), 1000000);

throws an IOException. Also opening with Mediaplayer does not work.

DLL is not signed

I was wondering if there is a signed version for this DLL or not?

I get this warning when I use the current version which will not allow me to publish with it.
warning CS8002: Referenced assembly 'SharpAvi, Version=2.1.1.0, Culture=neutral, PublicKeyToken=null' does not have a strong name.

Installed codecs not recognized

I am trying to use the Mpeg4 video stream, with mp43 encoding (which is installed on my computer), but GetAvailableCodecs returns only x264 (and when i use this all recordings just are just black, with a size of 5 KB, which cant be the correct filesize). Maybe i installed the wrong encoders, could you provide us the link to the encoders which were used for testing?

WPF Add ImageSource

Hi,
How to write imagesource to stream?

I trying Imagesource to bytes but I get:
"System.ArgumentException: 'Buffer size is not sufficient.'"

In documentation I read I need write DIB. How to convert ImageSource to Windows DIB?

//I convert canvas to Imagesource bytes
byte[] canvasdata = CanvasWriter.SaveCanvasToImgSimulate(canvas, (int)canvas.Width, (int)canvas.Height);

var writer = new AviWriter("test.avi")
{
    FramesPerSecond = 30,
    // Emitting AVI v1 index in addition to OpenDML index (AVI v2)
    // improves compatibility with some software, including 
    // standard Windows programs like Media Player and File Explorer
    EmitIndex1 = true
};

var stream  = writer.AddMotionJpegVideoStream((int)data.CanvasW, (int)data.CanvasH, 70);

stream.WriteFrame(true, canvasdata, 0, canvasdata.Length);

writer.Close();

Thanks

Mixed Audio Stream

Hi
I checked the second solution which you tell #21
So far I have the following code:

                audioStream = CreateAudioStream(waveFormat, encodeAudio, audioBitRate);
                bgmStream = CreateAudioStream(waveFormat, encodeAudio, audioBitRate);
                var device = new MMDeviceEnumerator().EnumerateAudioEndPoints(DataFlow.Render, DeviceState.Active).ToList().FirstOrDefault();
                //Get system sound
                bgmSource = new WasapiLoopbackCapture(device);
                audioStream.Name = "Voice";
                audioSource = new WaveInEvent
                {
                    DeviceNumber = audioSourceIndex,
                    WaveFormat = waveFormat,
                    // Buffer size to store duration of 1 frame
                    BufferMilliseconds = (int)Math.Ceiling(1000 / writer.FramesPerSecond),
                    NumberOfBuffers = 3,
                };

                bgmSource.DataAvailable += bgmSource_DataAvailable;
                audioSource.DataAvailable += audioSource_DataAvailable;
            if (audioSource != null&& bgmSource!=null)
            {
                videoFrameWritten.Set();
                audioBlockWritten.Reset();      
                audioSource.StartRecording();
                bgmSource.StartRecording();
            }
            screenThread.Start();

Is the data in the Stream started to be recorded after starting ‘IWaveIn.StartRecording()’?
Which step should I perform the mixed stream?
And I saw the MixingSampleProvider, but it's seem can't be help me,it 's?
Thank you very much for helping me in your busy schedule.

DivideByZeroException using Mpeg4VideoEncoderVcm with xVid

Hi Great library!!

I'm using this code to get an mp4 video, it works fine running on iisExpress,

    public static byte[] CreateMovie(List<string> frames)
    {
        var width = 320;
        var height = 240;
        var framRate = 20;
        var quality = 100;

        using (var ms = new MemoryStream())
        {
            var writer = new AviWriter(ms, true)
            {
                FramesPerSecond = framRate,
                EmitIndex1 = true
            };

            var codecs = Mpeg4VideoEncoderVcm.GetAvailableCodecs();

            log.Debug("System Available Codecs");
            foreach (var c in codecs)
            {
                log.Debug(c.Codec);
            }

            FourCC selectedCodec = KnownFourCCs.Codecs.Xvid;

            log.Debug("Using Codec");
            log.Debug(selectedCodec.ToString());

            try
            {
                var encoder = new Mpeg4VideoEncoderVcm(
                    width,
                    height,
                    framRate,
                    frames.Count,
                    quality,
                    selectedCodec);

                var stream = writer.AddEncodingVideoStream(encoder, true, width, height);

                foreach (var frame in frames)
                {
                    byte[] arr = Convert.FromBase64String(frame);
                    var bm = ToBitmap(arr);
                    var rbm = ReduceBitmap(bm, width, height);

                    byte[] fr = BitmapToByteArray(rbm);

                    stream.WriteFrame(true, fr, 0, fr.Length);
                }
            }
            catch (Exception ex)
            {
                log.Debug("Video Creation Exception");
                log.Debug(ex.ToString());
            }

            writer.Close();

            return ms.ToArray();
        }
    }

but when i deploy to my server the code trowhs the following exception

System.Reflection.TargetInvocationException:
System.DivideByZeroException: Attempted to divide by zero.
at SharpAvi.Codecs.VfwApi.ICSendMessage(IntPtr handle, Int32 message, BitmapInfoHeader& inHeader, BitmapInfoHeader& outHeader)
at SharpAvi.Codecs.Mpeg4VideoEncoderVcm.StartCompression()

some clue about what may be happening?

thanks!! :)

Errors in Mpeg4VcmVideoEncoder Issues

Creating a AddMpeg4VcmVideoStream with Xvid - Divide by zero error.

I'm able to create a stream and get down to WriteFrame using x264vfw. It errors out with very strange errors:

System.ArgumentOutOfRangeException
HResult=0x80131502
Message=A positive number is expected. (Parameter 'length')
Source=SharpAvi
StackTrace:
at SharpAvi.Output.EncodingVideoStreamWrapper.WriteFrame(Boolean isKeyFrame, Byte[] frameData, Int32 startIndex, Int32 length)
at SharpAvi.Output.AsyncVideoStreamWrapper.<>c__DisplayClass2_0.b__0()
at SharpAvi.Utilities.SequentialInvoker.Invoke(Action action)
at Program.

$(String[] args) in ......

I look at the length input variable it is set to # bytes before the call. After the call it is zero, and the passed in array is now null. Neither of these should be possible since they are input only values. It almost looks like an old style C stack or buffer flow issue. Yes, I know that the bitmap bits are locked, but that still shouldn't be possible?

I have spent hours triple checking all the my input values and all your settings. I have spent more hours looking over the available documentation.

XVid Stats reader.

Thanks for a great project. Really brilliant code. I have a question about xvid. When I use xvid to create the video stream it launches a Status Application. Any idea how to get it to not launch the application?

thanks!!

.NET Core target

Hello, Is there a plan to create a .NET Core version that can be restored with nuget? Thank you.

This Library not available in .NET Core

Using this Library heavily to record test actions, and then moved to VSCode using .NET Core, getting exceptions as the library is not yet available.

Can you guys provide an update on this?

Please turn MAX_SUPER_INDEX_ENTRIES into an optional parameter

I just had the creation of an AVI file fail after 2 days and about 1 TB of data written.

System.InvalidOperationException
  HResult=0x80131509
  Message=Cannot write more frames to this stream.
  Source=SharpAvi.NetStandard
  StackTrace:
   at SharpAvi.Output.AviWriter.WriteStreamFrame(AviStreamBase stream, Boolean isKeyFrame, Byte[] frameData, Int32 startIndex, Int32 count)
   at SharpAvi.Output.AviWriter.SharpAvi.Output.IAviStreamWriteHandler.WriteVideoFrame(AviVideoStream stream, Boolean isKeyFrame, Byte[] frameData, Int32 startIndex, Int32 count)
   at SharpAvi.Output.AviVideoStream.WriteFrame(Boolean isKeyFrame, Byte[] frameData, Int32 startIndex, Int32 count)
   at SharpAvi.Output.VideoStreamWrapperBase.WriteFrame(Boolean isKeyFrame, Byte[] frameData, Int32 startIndex, Int32 length)
   at SharpAvi.Output.AsyncVideoStreamWrapper.<>n__0(Boolean isKeyFrame, Byte[] frameData, Int32 startIndex, Int32 length)
   at SharpAvi.Output.AsyncVideoStreamWrapper.<>c__DisplayClass2_0.<WriteFrame>b__0()
   at SharpAvi.Output.SequentialInvoker.Invoke(Action action)
   at SharpAvi.Output.AsyncVideoStreamWrapper.WriteFrame(Boolean isKeyFrame, Byte[] frameData, Int32 startIndex, Int32 length)

  This exception was originally thrown at this call stack:
    [External Code]

I believe this is because I exceeded the maximum amount of super index entries:

if (si.SuperIndex.Count == MAX_SUPER_INDEX_ENTRIES)
{
    throw new InvalidOperationException("Cannot write more frames to this stream.");
}

From what quickly googled, this appears to be some kind of safety measure for compatibility? Can you please make it so that one can optionally set this to something higher and maybe add a kind of "Only use if you know what you are doing" warning to it?

I'll try to do this on a fork and if I succeed, I'll maybe send a PR.

Format issue

Hi, I have recorded the screen and saved it with *.webm extension, but this is not supporting in chrome.please help me

Screen recording as video, audio on SharpAvi - Audio not recording

What has been achieved:
I have successfully integrated that with the sample provided and I'm trying to capture the audio through NAudio with SharpAPI video stream for the video to record along with audio implementation.

Issue:
Whatever I write the audio stream in SharpAvi video. On output, It was recorded only with video and audio is empty.

Checking audio alone to make sure:
But When I try capture the audio as separate file called "output.wav" and It was recorded with audio as expected and can able to hear the recorded audio. So, I'm concluding for now that the issue is only on integration with video via SharpApi

writterx = new WaveFileWriter("Out.wav", audioSource.WaveFormat);

Full code to reproduce the issue:
https://drive.google.com/open?id=1H7Ziy_yrs37hdpYriWRF-nuRmmFbsfe-

Code glimpse from Recorder.cs
NAudio Initialization:

audioSource = new WasapiLoopbackCapture();

audioStream = CreateAudioStream(audioSource.WaveFormat, encodeAudio, audioBitRate);

audioSource.DataAvailable += audioSource_DataAvailable;

Capturing audio bytes and write it on SharpAvi Audio Stream:

private void audioSource_DataAvailable(object sender, WaveInEventArgs e)
{
    var signalled = WaitHandle.WaitAny(new WaitHandle[] { videoFrameWritten, stopThread });
    if (signalled == 0)
    {
        audioStream.WriteBlock(e.Buffer, 0, e.BytesRecorded);               
        audioBlockWritten.Set();
        Debug.WriteLine("Bytes: " + e.BytesRecorded);
    }
}

Can you please suggest a Solution

Asked the same in SO
https://stackoverflow.com/questions/60238492/screen-recording-as-video-audio-on-sharpavi-audio-not-recording?noredirect=1

Error from AddMpeg4VideoStream for any codec

I get an error independent which encoder I chose. Even the MotionJpeg does through a "No compatible MPEG-4 encoder found" message. However AddMotionJpegVideoStram works.

var vidStream = vidWriter.AddMpeg4VideoStream(1008, 1019, (double)30, quality: 70, codec: KnownFourCCs.Codecs.MotionJpeg);

I installed x264 and xvid, both through errors as well.

I'm on Windows 10.

Fody Merge Lib. Trouble.

When I used Fody.Costura.

lameenc32.dll import embedded resource.

But SharpAvi have to Set Location.. (My exe File With lameenc32.dll)

Plz Add this Function Next Version.

// Add ( Fody Or ILMerger Already Finished Loadlibrary )

    public static void SetLameDll(string libraryName)
    {
        var facadeAsm = GenerateLameFacadeAssembly(libraryName);
        lameFacadeType = facadeAsm.GetType(typeof(Mp3AudioEncoderLame).Namespace + ".Runtime.LameFacadeImpl");
    }

// End Add

    public static void SetLameDllLocation(string lameDllPath)
    {
    }

Thanks ^^ Mr. And Happy New Year ^^

Issue with example

Examples have this line of code:
var frameData = new byte[stream.Width * stream.Height * 4](stream.Width-_-stream.Height-_-4);
but this code has no sense, it's object not a method, and -_- just a ascii smile, not a code,
and if i just load bmp file as byte array, or i load it in memory stream and convert to byte array,
on output i have just black screen.

Generated uncompressed videos are corrupt 1 out of 4 times

Hi Vasili,

I just encountered issues with uncompressed files generated by SharpAVI (last released version from NuGet).

SharpAVI will write uncompressed AVI files, but then when you open them, Windows Media Player will fail to open them and show an error dialog (other players such as VLC or avidemux will not play them correctly either). This is on Windows 10 Pro 64-bit (latest updates).

After some more testing, the issue seems to be that it only works properly if the width of the images that are added to the stream are a multiple of 4. So the .avi files will only play properly in 1 out of 4 cases (if you use different sizes each time). When I use the MJPEG encoder, all generated videos work fine.

I have attached a very simple self-contained Visual Studio 2015 project that reproduces this issue consistently: TestSharpAVI.zip

If you could find a moment to look into this issue, that would be great.

Best,
Koen

Audio and Video streams become out of sync

I have been trying to create videos that take an image, and audio file and runs them at the same time. My plan is to have the image show for as long as the audio is playing, however as the video plays, the image and audio get very out of sync. Is there any way to match them together, perhaps with a keyframe, so they show/play simultaneously?

Here is my method I use to encode the video

 public void EncodeClip(string picturePath, string soundPath)
        {
            Bitmap bitmap = new Bitmap(new Bitmap(picturePath));
            bitmap.RotateFlip(RotateFlipType.Rotate180FlipX);

            var frameData = new byte[VideoWidth * VideoHeight * 4];

            using (Mp3FileReader reader = new Mp3FileReader(soundPath))
            {
                byte[] buffer = new byte[reader.Length];
                reader.Read(buffer, 0, buffer.Length);
                audioStream.WriteBlock(buffer, 0, buffer.Length);

                var bits = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
                Marshal.Copy(bits.Scan0, frameData, 0, frameData.Length);
                bitmap.UnlockBits(bits);


                int FrameTime = (int)Math.Round(reader.TotalTime.Ticks * writer.FramesPerSecond / 10000000);
                for (int i = 0; i < FrameTime; i++)
                {
                    // write data to a frame
                    videoStream.WriteFrame(true, frameData, 0, frameData.Length);
                }

            }

        }

I've tested to capture the rounding error that occurs, thinking that was the issue, however it was only ever off by a few frames
PS: I am encoding at 60FPS, .Avi movie extension, and .mp3 audio files

AviWrite Close Function Trouble ( Fx35 Version )

When i Try Call AviWriter Close Function (Not Stream, It's File Name)
Stream is Not Dead... (Because closeWirter is False)

    public AviWriter(string fileName)
    {
        Contract.Requires(!string.IsNullOrEmpty(fileName));

        #if !FX45

        streamsRO = new ReadOnlyCollection<IAviStream>(streamsList);
        closeWriter = true;  <---- #########Plase Add this.#########

        #endif

        var fileStream = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.None, 1024 * 1024);
        fileWriter = new BinaryWriter(fileStream);
    }

Thanks so much ^^ i Like this Project.

x264 popup appears

I downloaded VfW package (from here) to make perform X264 encoding. But a window pops up, as soon as I start capturing:

x264vfw [warning]: Few frames probably would be lost. Ways to fix this:
x264vfw [warning]: - if you use VirtualDub or its fork than you can enable 'VirtualDub Hack' option
x264vfw [warning]: - you can enable 'File' output mode
x264vfw [warning]: - you can enable 'Zero Latency' option

Any idea, how to avoid this?
(...or which another free codec for small vids)

Many thanks in advance!

AVI Wrapped to the right slightly

Hi,

Thanks for the super useful library.

Unfortunately, I've found an issue in my usage of it. The AVI seems to shift the source bitmaps a few pixels to the right, with the right edge wrapping around to the left.

It is probably best explained with an image, see below.

image

Thanks,

Steve.

Recording video and audio at the same time.

Thanks for a good lib! Questions: Should I use two different threads for video and audio? Is it even possible? In the code example, video and audio streams are written after each other in a loop, but the async version of the WriteFrame methods were not used. Why not? If I would have a loop using async writing of the video and then async writing of the audio, would that either prevent audio or video to record at optimal speed? How do I select the audio input source?

Thumbnail Time Trouble..

image

Thanks!! baSSiLL !!!

If i Record With Voice... it's Good Work When on Player

But, Window Thumbnail Time is Not Good ^^;;

I Don't Know why..^^

Have a nice time ^^

how to close the video at the end of the process

when I use the MotionJpeg codec even if the computer restarts during recording, the video is correct.

However when I use x264 the file seems to be without end and does not play.
Even though it is a software restart (shutdown / r / t 10)

On windows

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.