Is it possible to read input_file from stdin?

14 views
Skip to first unread message

Tim Terakopov

unread,
Jun 8, 2011, 5:16:54 PM6/8/11
to FLVmeta Discussion
Is it somehow possible to read the input file from stdin like with
flvtool2?

Ie. Can I do something like ffmpeg -i whatever.avi -f flv .... pipe:1
| flvmeta stdin whatever.flv ?

Thanks,
Tim

Marc

unread,
Jun 9, 2011, 4:22:45 AM6/9/11
to FLVmeta Discussion
Alas, it's not possible for the moment.

flvtool2 works by loading the input file in its entirety in memory,
which can lead to a big memory consumption.

FLVmeta, on the contrary, reads the file one first time to gather
statistics in order to compute the new metadata, and then performs a
second reading to fully copy the file to the destination.

This requires the ability for the input stream to be seekable (by
going back to the beginning of the file), and unfortunately, stdin
lacks this ability.

One way to handle this would be to read stdin into a temporary file,
and work on this file instead, but a script could pretty well handle
that step around the invocation of flvmeta.

Regards,
Marc
Reply all
Reply to author
Forward
0 new messages