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

ffmpeg pipe, missing metadata #159

Closed
MatthewDavidCampbell opened this issue Aug 29, 2013 · 2 comments
Closed

ffmpeg pipe, missing metadata #159

MatthewDavidCampbell opened this issue Aug 29, 2013 · 2 comments

Comments

@MatthewDavidCampbell
Copy link

Was trying to dump the ffmpeg into a writable via the writeToStream method but stream is missing important metadata....

Error looks isolated to ffmpeg on Windows (using windows 8, 64 bits). Ran the following:
ffmpeg -i "" -codec:v libvpx -f webm ""

and (note: -f webm has to be there otherwise ffmpeg complains about no suitable output format):
ffmpeg -i "" -codec:v libvpx -f webm pipe:1 > ""

Viewing the video file via chrome shows no duration for the piped output whereas the other file (from the first command) works fine. Confirmed with ffprobe. No bitrate info either.

Assume ffmpeg uses file stat info but with streams there isn't any. It affects the writeToStream methods and will give users a head-ache. Update the Readme?

Any rate, great plugin to node!!!!

@njoyard
Copy link
Member

njoyard commented May 2, 2014

Actually this problem is not specific to Windows. Most formats write stream information (duration, bitrate, keyframe position...) at the beginning of the file, and thus ffmpeg can only write this information when its output is seekable (because it has to finish processing streams to the end before knowing what to write). Pipes are not seekable, so you won't get this information when using an output pipe.

As for your note about the output format, ffmpeg determines the output format from the output file extension, which is not possible with pipes; that's why you have to specify the output format explicitly.

@njoyard njoyard closed this as completed May 2, 2014
@FallingSnow
Copy link

This is a major stream joy kill :(

Do you know of any way around this? Such as opening a new stream to prepend this information to the file.

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