Opened 4 years ago
Closed 4 years ago
#8944 closed defect (needs_more_info)
2 output fifos are not enough (4.1.6)
Reported by: | Steve Newcomb | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug (a lacuna in the documentation??):
When demuxing a US broadcast transport stream into its distinct programs, it is easy and efficient to write them as separate files, using a single ffmpeg process as shown below. In my experience, there may be as many as 5 such programs. But I don't need them as separate *files*; I need them as separate *streams*, each being output to its own fifo (named pipe).
As far as I can see from the documentation and from experience, ffmpeg can only write streams to 2 fifos, i.e. stdout (file descriptor 1, pipe:1) and stderr (file descriptor 2, pipe:2). If I attempt to output to an existing named pipe, I get the message "File '<name>' already exists. Exiting." How can I write each program to a separate named pipe? (In any case I would like to reserve stdout and stderr for their normal purposes.)
In the below example, I'm writing three programs to three separate files. It works well, and I need only a single ffmpeg instance to handle all three outputs. How can I do the same thing with three named pipes (fifos)?
How to reproduce:
% hdhomerun_config hdhr0 save /tuner0 - \ | fmpeg -i - \ -ignore_unknown -movflags frag_keyframe+empty_moov -c copy -f mp4 -map p:3:v -map p:3:a /tmp/hdhrprogram_09_3_ABC.fifo \ -ignore_unknown -movflags frag_keyframe+empty_moov -c copy -f mp4 -map p:4:v -map p:4:a /tmp/hdhrprogram_09_4_CW.fifo \ -ignore_unknown -movflags frag_keyframe+empty_moov -c copy -f mp4 -map p:5:v -map p:5:a /tmp/hdhrprogram_09_5_Charge_.fifo built on ... ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
Change History (5)
comment:1 by , 4 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 4 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
I hereby report that the documentation appears to suggest that only two output pipes are available in ffmpeg. That's a bug, I think.
Eventually I learned that...
Any number of unnamed output pipes is supported, provided all output pipes are inherited from a parent process that creates them, allows them to be inherited by child processes, and then spawns ffmpeg and all the processes that will read those same pipes.
...and that's the solution I'm using now. If the above sentence were in the documentation, it would be helpful to users like me.
follow-up: 4 comment:3 by , 4 years ago
FFmpeg's documentation is not a a beginner's course to Unix. Learn to use your operating system.
comment:4 by , 4 years ago
I agree that the FFmpeg documentation should include a reference like your paragraph, which says that more than just pipes 0, 1, and 2 are supported, and under what conditions.
This ticket is a poor place to put that message, however, because the ticket's description is already centred around the observations about ffmpeg functionality: "ffmpeg can only write streams to 2 fifos" and "2 output fifos are not enough". Those observations are based on a misunderstanding of the functionality. That means this ticket will likely get closed and ignored.
It would be better to have a separate ticket which is centred on the documentation omission.
Just to set your expectations, however, this project does not seem to value improving its documentation. Don't be surprised if that ticket languishes. You could also learn how to edit the documentation, and submit a patch with the documentation fix. That patch might well also languish, because it may not get the sign-off required for it to be applied.
As evidence of this attitude, see Cigaes:
FFmpeg's documentation is not a a beginner's course to Unix. Learn to use your operating system.
comment:5 by , 4 years ago
Resolution: | → needs_more_info |
---|---|
Status: | reopened → closed |
Version: | 4.1.4 → unspecified |
You can use the
-y
option to make ffmpeg not to ask to overwrite the output.Also your ticket rather looks like a user question and not a bug report, so consider using ffmpeg-user mailing list for similar questions.