[FFmpeg-user] How to pass format options to an underlying muxer when using a fifo output wrapped by tee

Dennis Mungai dmngaie at gmail.com
Thu Mar 21 19:10:07 EET 2019


Hello there,

How would one pass an option to an underlying muxer when using a fifo
output?

Take this example:

https://stackoverflow.com/questions/41880004/ffmpeg-how-to-stream-to-multiple-outputs-with-the-same-encoding-independently/42111569

Wherein you have outputs like these:

-i ... -f tee "[onfail=ignore]'C:\Users\blablabla.mp4'|
[f=fifo:fifo_format=flv:drop_pkts_on_overflow=1:attempt_recovery=1:recovery_wait_time=1]rtmp://yourServer...|
[f=fifo:fifo_format=flv:drop_pkts_on_overflow=1:attempt_recovery=1:recovery_wait_time=1]"rtmp://facebook..."

Assume that the underlying muxer, say mp4, has private options that
you want passed to from within a fifo output as shown above with the
flv outputs:

ffmpeg -h muxer=mp4

Muxer mp4 [MP4 (MPEG-4 Part 14)]:
    Common extensions: mp4.
    Mime type: video/mp4.
    Default video codec: mpeg4.
    Default audio codec: aac.
mp4 muxer AVOptions:
  -movflags          <flags>      E........ MOV muxer flags (default 0)
     rtphint                      E........ Add RTP hint tracks
     empty_moov                   E........ Make the initial moov atom empty
     frag_keyframe                E........ Fragment at video keyframes
     frag_every_frame              E........ Fragment at every frame
     separate_moof                E........ Write separate moof/mdat
atoms for each track
     frag_custom                  E........ Flush fragments on caller requests
     isml                         E........ Create a live smooth
streaming feed (for pushing to a publishing point)
     faststart                    E........ Run a second pass to put
the index (moov atom) at the beginning of the file
     omit_tfhd_offset              E........ Omit the base data offset
in tfhd atoms
     disable_chpl                 E........ Disable Nero chapter atom
     default_base_moof              E........ Set the
default-base-is-moof flag in tfhd atoms
     dash                         E........ Write DASH compatible fragmented MP4
     frag_discont                 E........ Signal that the next
fragment is discontinuous from earlier ones
     delay_moov                   E........ Delay writing the initial
moov until the first fragment is cut, or until the first fragment
flush
     global_sidx                  E........ Write a global sidx index
at the start of the file
     skip_sidx                    E........ Skip writing of sidx atom
     write_colr                   E........ Write colr atom
(Experimental, may be renamed or changed, do not use from scripts)
     write_gama                   E........ Write deprecated gama atom
     use_metadata_tags              E........ Use mdta atom for metadata.
     skip_trailer                 E........ Skip writing the
mfra/tfra/mfro trailer for fragmented files
     negative_cts_offsets              E........ Use negative CTS
offsets (reducing the need for edit lists)
  -moov_size         <int>        E........ maximum moov size so it
can be placed at the begin (from 0 to INT_MAX) (default 0)
  -rtpflags          <flags>      E........ RTP muxer flags (default 0)
     latm                         E........ Use MP4A-LATM
packetization instead of MPEG4-GENERIC for AAC
     rfc2190                      E........ Use RFC 2190 packetization
instead of RFC 4629 for H.263
     skip_rtcp                    E........ Don't send RTCP sender reports
     h264_mode0                   E........ Use mode 0 for H.264 in RTP
     send_bye                     E........ Send RTCP BYE packets when finishing
  -skip_iods         <boolean>    E........ Skip writing iods atom.
(default true)
  -iods_audio_profile <int>        E........ iods audio profile atom.
(from -1 to 255) (default -1)
  -iods_video_profile <int>        E........ iods video profile atom.
(from -1 to 255) (default -1)
  -frag_duration     <int>        E........ Maximum fragment duration
(from 0 to INT_MAX) (default 0)
  -min_frag_duration <int>        E........ Minimum fragment duration
(from 0 to INT_MAX) (default 0)
  -frag_size         <int>        E........ Maximum fragment size
(from 0 to INT_MAX) (default 0)
  -ism_lookahead     <int>        E........ Number of lookahead
entries for ISM files (from 0 to INT_MAX) (default 0)
  -video_track_timescale <int>        E........ set timescale of all
video tracks (from 0 to INT_MAX) (default 0)
  -brand             <string>     E........ Override major brand
  -use_editlist      <boolean>    E........ use edit list (default auto)
  -fragment_index    <int>        E........ Fragment number of the
next fragment (from 1 to INT_MAX) (default 1)
  -mov_gamma         <float>      E........ gamma value for gama atom
(from 0 to 10) (default 0)
  -frag_interleave   <int>        E........ Interleave samples within
fragments (max number of consecutive samples, lower is tighter
interleaving, but with more overhead) (from 0 to INT_MAX) (default 0)
  -encryption_scheme <string>     E........ Configures the encryption
scheme, allowed values are none, cenc-aes-ctr
  -encryption_key    <binary>     E........ The media encryption key (hex)
  -encryption_kid    <binary>     E........ The media encryption key
identifier (hex)
  -use_stream_ids_as_track_ids <boolean>    E........ use stream ids
as track ids (default false)
  -write_tmcd        <boolean>    E........ force or disable writing
tmcd (default auto)
  -write_prft        <int>        E........ Write producer reference
time box with specified time source (from 0 to 2) (default 0)
     wallclock                    E........
     pts                          E........
  -empty_hdlr_name   <boolean>    E........ write zero-length name
string in hdlr atoms within mdia and minf atoms (default false)

How would one accomplish that, in such a setup?

Thanks,

Dennis.


More information about the ffmpeg-user mailing list