Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion of webm to mp4 with streams #417

Closed
cakong10 opened this issue Mar 3, 2023 · 2 comments
Closed

Conversion of webm to mp4 with streams #417

cakong10 opened this issue Mar 3, 2023 · 2 comments

Comments

@cakong10
Copy link

cakong10 commented Mar 3, 2023

Is it possible to convert a webm input stream to mp4 output stream? I tried to do so in my code but always get a pipe is broken error.

Also, is it possible to use the FFMpegCore DLL by itself, or do I always need to have the .exe file in my repository as well?

@tiesont
Copy link
Contributor

tiesont commented Mar 4, 2023

For your second question, FFMpegCore is managed code, ffmpeg is not. FFMpegCore is more or less Pinvokeing the exe on your behalf. So, yes, you need a compiled executable.

For your first question, WebM is a container format, which may or may not already contain an H.264 file of some sort. You can convert it (almost anything you can do with ffmpeg can be done in FFMpegCore, with enough patience). Here's a Q&A from Stack Overflow that gives some examples: https://stackoverflow.com/questions/18123376/webm-to-mp4-conversion-using-ffmpeg

@rosenbjerg
Copy link
Owner

No what you are attempting is not possible. mp4 requires a seekable stream, which means that you cannot output to a stream but only to a file.
And as @tiesont mentioned, this is just a library that wraps ffmpeg, so the actual ffmpeg/ffprobe binaries are required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants