Skip to content

Commit 5a40264

Browse files
authored
Update README.md
1 parent 1537f4a commit 5a40264

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ You can use `ffprobe` command for now. It might be implemented in the library in
114114

115115
Currently, no.
116116

117+
## Something doesn't work
118+
119+
Try running your program with `DEBUG=ffmpeg-stream` environment variable.
120+
It will print the ffmpeg command it executes and all the ffmpeg logs.
121+
The command usually looks something like `ffmpeg -f … -i pipe:3 -f … pipe:4`.
122+
`pipe:number` means it uses standard input/output instead of a file.
123+
117124
## Error: Muxer does not support non seekable output
118125

119126
When getting error similar to this:
@@ -131,7 +138,7 @@ When getting error similar to this:
131138
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
132139
```
133140

134-
ffmpeg says that the combination of options you specified doesn't support streaming. You can experiment with calling ffmpeg directly and specifying `-` as output file. Maybe some other options or different format will work. Streaming sequence of JPEGs over websockets worked flawlessly for me (`f: 'mjpeg'`).
141+
ffmpeg says that the combination of options you specified doesn't support streaming. You can experiment with calling ffmpeg directly and specifying `-` or `pipe:1` as output file. Maybe some other options or different format will work. Streaming sequence of JPEGs over websockets worked flawlessly for me (`{ f: "image2pipe", vcodec: "mjpeg" }`).
135142

136143
You can also use `createBufferedOutputStream`. That tells the library to save output to a temporary file and then create a node stream from that file. It wont start producing data until the conversion is complete, though.
137144

0 commit comments

Comments
 (0)