I need two things to be done:
Create a video from the images (jpeg) which are placed in a folder and
Encode this video to h.264 format and stream to the network.
Right now I am sending each image files to the network and receiving it on the server and then displaying it there. This gives an illusion of video playback but in actual it is only images which are displayed one after another.
I just need to convert this images group to the video of h.264 format and stream it to the network.
Have a look here: Working way to make video from images in C#
Related
I'm developing a C# video streaming application using NReco library. At this moment I was able to encode audio and video separately and save data in to queue. I can stream video using UDP protocol without audio and it played nicely in ffplay equally I can stream audio using UDP protocol without video and it also played nicely.Now I want to merge these two streams in to one and stream through UDP protocol and player should play both audio and video. But I have no idea how to do it. I would appreciate if some one can give me any points to do this or any other different method achieve this.
Thank You.
The answer highly depends on the source of video and audio streams. NReco.VideoConverter is a wrapper to FFMpeg tool and it actually can combine video and audio streams (see filters configuration in FFMpeg documentation) if either video or audio input can be specified as ffmpeg input source (UDP stream or direct show input device).
If both video and audio data represented by byte stream in your C# code you cannot pass them together using NReco.VideoConverter (ConvertLiveMedia method) because it uses stdin for communicating with ffmpeg and only one stream can be passed from C# code.
I am using direct show to capture video and save it to file. I have tried in vain to find ways to decrease the resultant video size but cannot manage. I would like to know if anyone can tell me how I can:
Decrease the frame rate of the video
Decrease the quality of the video (even down to 320 x 240)
Apply a compression on the video (mpeg? etc).
Raw video is huge in size, and to size-efficient storage assumes you compress the video. You are to use one of the video encoders, such as MPEG-4 AVC (H.264) or Windows Media. You typically insert an additional filter into your pipeline between capture filter and multiplexer/file writer. Read up on this in multiple past topics:
Using video codecs like XVid in c#
Real-time video encoding in DirectShow
How to properly build a directshow graph to compress video...
I want to record video and audio files using C#. After recording of audio + video i want to merge them. There can be only one video file and 10 audio file. I want this ten files to overlay on one video file.
I am assure that i want video file in .wmv format. Can you tell me i should record audios in which format so later i can overlay those audio files on .wmv format video file?
Also please let me know how to overlay audio file on .wmv video file?
Hope i will get prompt reply for this
You can use DirectShow Editing Services (DES) to do it. DirectShowLib should provide DES support in C#. Using it, create a timeline with video group (1 track) and audio group (several tracks if you need to overlay/mix some audios, i.e. hear more than one at a time). Place your video and audio files on the timeline in desired positions. Then tell DES to create a DirectShow graph and you'll get one video and one audio output pin. Connect them to ASF writer to save result to WMV.
I'm trying to write an application that is able to download the "chunks" sent by a IIS Smooth Streaming server and capture thumbnails of the video. I'm able to create the proper GET requests to download the chunks, but I'm having trouble finding a way to play or view the chunks I download.
Does anybody know of a way to combine and play/view the video sent? I know there are Silverlight players that will play the stream, but I'm trying to do this in a WPF application. Also any info on the file type that is sent from the server would be helpful in finding a way to play the content.
Thanks.
You need to split the packages and extract the video and audio frames. Then you need to decode the video and audio. After this you need to render the decodec frames.
So best solution would be an DirectShow filter doing the download and splitting. With this filter you can then use the DirectShow system to decode and render the stream. Does anybody know if there is such a filter available?
I'm using flow player for streaming videos to my browser.The videos are uploaded by the users and they may upload different formats. What will be solution to stream the videos as mp4 , what ever be the format they upload. I'm currently using ffmpeg commands.
The problem is after encoding the video is getting down scaled.Also if the user upload large video file the encoding itself takes more time.
I need to stream the videos as soon as its uploaded to the server, what ever may be the format(like in youtube).
I'd look into ffmpeg as it allows yo to transcode just about every video format on the planet.
However; I'm not sure of it's real-time capabilities or it's abilities to stream it's output. Might be a good place to start though.
I think you could do this by automating expression encoder on the server even though it is mainly used for smooth streaming format but expression encoder isn't opensource or free :(