1

The Situation

I'm writing a NodeJS script that takes a video stream (or file), pipes it to ffmpeg to standardize the format, and then sends it to various ETL processes to extract data from the video.

I want my node-level data stream to have awareness of how far into the video it is, and it seems the best (only?) way to do this is to use ffprobe to extract times from the stream packets.

The Problem

Before I actually start spawning ffmpeg commands, I'm trying to test at the CLI level. When I pipe ffmpeg's output directly to ffprobe, I receive a complaint:

av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe

The command in question:

ffmpeg -i /path/to/in.mp4 -f mpegts - | ffprobe -i - -print_format json

The Question

Am I misunderstanding something about what ffprobe accepts? I haven't found a single example of ffmpeg piping to ffprobe, which makes me nervous.

Is it possible to pipe ffmpeg data directly to ffprobe?

Bonus points: if you have a better way of extracting timing information from the ffmpeg stream, take a look at this question

slifty
  • 13,062
  • 13
  • 71
  • 109

0 Answers0