Is there a way to edit videos using c# without using a media library eg. Microsoft Expression Encoder etc.
Just need to be able to cut out unwanted parts or insert other videos into a specified time of the original video.
Can I edit the raw video file by perhaps converting it into a binary file and then cutting/pasting the code?
Most video formats have a container and a codec--that might be a good place to start
http://www.pitivi.org/manual/codecscontainers.html
If one were interested in implementing a program modifying video sans libraries a good place to start might be looking at the existing open source video libraries(eg FFMPEG https://www.ffmpeg.org/download.html ) as a reference
No there is no way to edit a video without using anything that would be considered a "library". You either must write your "library" or use a existing 3rd party one.
The only thing that could possibly not be thought of as a "library" is a full external tool that does what you want and your code would just be a front end GUI for it. For example writing a GUI front end for FFmpeg.
Related
I am building a program(in C#) and I need to download the audio from a youtube video(using the URL). I found two libraries which allow me to do it:
YotubeExtractor and libvideo(Also known as VideoLibrary), but I don't know how to use them, I mean I tried using their documentation but non of them worked.
Do you know another way which I can download or maybe explain me how to do this?
Thank you and have a nice day!
Don't use other people's code unless it's large and popular or your only option, I recommend, so that you both learn more and know how it works, as well as know how to maintain it if it breaks.
Retrieve the page using standard .NET functionality, parse out the HTML to find the video URL, download it using the same standard functionality, and then convert it to MP3 as a separate logical unit of your software.
For converting to MP3 you may well want to use someone else's library or call an external program like FFMPEG since that's not as trivial as parsing a webpage.
I'd like to be able to write some code so that given a name and a video, I can personalize the video with that person's name in it.
Eg, I want to send my family's Christmas message which is a video of us doing silly things and with a video overlay that says Merry Christmas, !
Ideally, I'd like to do this in C#.NET but am open to other technologies if they exist.
Many thanks.
The ffmpeg utility (https://www.ffmpeg.org) can do this type of thing - you should be able to find examples if you Google text or video overlays with ffmpeg:
Overlaying images on a video:
https://video.stackexchange.com/a/12111
https://superuser.com/a/683696
Overlaying text:
https://stackoverflow.com/a/10919953/334402
https://superuser.com/a/701206 (includes a watermark)
The above are all done on the command line. To include them into your c# program you can:
invoke the command line from your program
use a c# wrapper around the ffmpeg command line functionality
Directly use the libraries that ffmpeg uses
The best compromise may be the wrapper option. These exist for different languages and environments, but some examples for c#:
http://www.codeproject.com/Articles/774093/Another-FFmpeg-exe-Csharp-Wrapper
http://www.ffmpeg-csharp.com (this one is not free so check the licence...)
I am working on a project which is related to videos.
I need to cut part of a video (I want to retrieve that part of video which lies from 00:30:00 to 00:40:00).
I have searched about it and found it can be done by using ffmpeg (This is a command line tool which is used to edit and convert videos.) But I don't want to use any tool.
Is it possible to do this with code, rather then with another tool?
If what you actually want is to build the capability to cut samples out of existing video material into a .net program the splicer project might be what you're looking for.
hi
I am developing a video capture application using C#.net. i captured
video through webcam and saved it as a JPEG images then i want to make a
wmv file with those images. how can i do that what are the basic steps needed for that can any body help
I am working on this myself. I have found two ways that may be possible - both require the purchase of an outside library.
The first one looks to be the easiest but costs the most, although it will allow you to use it for free you will just have to deal with a pop up telling you to purchase the library: http://bytescout.com/products/developer/imagetovideosdk/imagetovideosdk_convert_jpg_to_video.html
The other involves using Microsoft Encoder 4. I am still working on this one. You can get the free version here: http://www.microsoft.com/download/en/details.aspx?id=18974
C# doesn't natively support much in the way of sound or video so outside reference assemblies seem to be a necessity.
Right now that is the best help I can offer until I figure it out.
I'm working on an application that will read in file paths and play audio files. I'm trying to keep this as simple as possible--by using existing codecs and free/open utilities. I'd like some suggestions on the best way to do this. I've had two ideas, both involving FFmpeg:
Create a simple GUI that allows the user to read pass in file(s) to be played, and then a ffplay.exe process is run in the background to play the file(s).
Go more in-depth by just using libavcodec and basing my project off the functionality available with that.
There are only a few main goals I have for this.
Be able to read in and play multiple files without breaks between them
Start playback at an arbitrary spot (based on a percent of total duration) within the track
Stop playback after an arbitrary amount of time, and move to the next track
Which of my two methods seem the most practical for this project? Is there a better--or perhaps less feature-intensive--alternative to FFmpeg that you would suggest.
This is for a Windows application written in C#.
Edit: One of the reasons that I started with FFmpeg is that it can handle many file types, notably MP3, AAC, Flac.
Edit2: If the use of libavcode.dll is the best option, it would also be helpful to get some info on implementing that in C#.
The BASS audio library has C# bindings and works very well with common audio formats (e.g. MP3) with plug-ins for other formats (e.g. AAC).
However, for commercial development, you require a license to use BASS.