Skip to content

Input from STDIN and spooling through audio/video. #109

@Demonstrandum

Description

@Demonstrandum

Take input from STDIN from a pipe

I was wondering if piping the video data directly to mkchromecast through stdin would be possible.
e.g. data from the webcam:

ffmpeg -loglevel panic -f video4linux2 -i /dev/video0 -f ogg - | mkchromecast --video -
# The dash at the end in the ffmpeg command means it outputs to 
# STDOUT instead of to a file,
# and the dash in the mkchromecast command would mean it read
# the data from STDIN.

I couldn't find an way of doing this, so instead I recorded it to a separate file with

ffmpeg -f video4linux2 -i /dev/video0 -f ogg me.ogg

then in a separate shell session I streamed it:

mkchromecast --video me.ogg

which of course results in a huge delay as it reads form the beginning of the file, and the beginning was mkchromecast connecting.

This brings me on to my next question:

Spooling

Is there any way to spool backwards and forwards from whatever file it's reading, perhaps a way to go back to the beginning of the file or go to the very end (useful for streaming continuously growing file like from a webcam).

I don't know if any of this seems reasonable.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions