Discussion:
[Libav-user] Does ffmpeg supports multiple output files?
mahesh p
2016-11-28 08:39:28 UTC
Permalink
Hello,

I am looking for a solution by which one encoder can generate
multiple output files. Can we do this with ffmpeg today?





Thanks,
Mahesh
Carl Eugen Hoyos
2016-11-28 18:50:25 UTC
Permalink
Post by mahesh p
I am looking for a solution by which one encoder can generate
multiple output files.
Encoders do not generate output files.
Encoders produce video (or audio, etc.) streams that you can
mux into as many files as you like without needing another
encoder instance.

Carl Eugen
Steven Liu
2016-11-29 02:17:58 UTC
Permalink
Post by mahesh p
Hello,
I am looking for a solution by which one encoder can generate
multiple output files. Can we do this with ffmpeg today?
Do you mean muxers: tee, tee proto
if you mean codec, you can refer to Carl's response.
Post by mahesh p
Thanks,
Mahesh
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
mahesh p
2016-11-29 05:41:26 UTC
Permalink
Actually encoder producing multiple output files but where as tee muxer can
be used to write the same data to several files So I'm looking for solution
where ffmpeg generates all output files which are produced by an encoder.
Post by Steven Liu
Post by mahesh p
Hello,
I am looking for a solution by which one encoder can generate
multiple output files. Can we do this with ffmpeg today?
Do you mean muxers: tee, tee proto
if you mean codec, you can refer to Carl's response.
Post by mahesh p
Thanks,
Mahesh
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
Steven Liu
2016-11-29 08:33:16 UTC
Permalink
Post by mahesh p
Actually encoder producing multiple output files but where as tee muxer
can be used to write the same data to several files So I'm looking for
solution where ffmpeg generates all output files which are produced by an
encoder.
if you want to use tee, the tee format is a AVFormatContext, you can use it
like write mp4, mov, flv, and so on.
tee can split multiple output file use '|'
Post by mahesh p
Post by Steven Liu
Post by mahesh p
Hello,
I am looking for a solution by which one encoder can
generate multiple output files. Can we do this with ffmpeg today?
Do you mean muxers: tee, tee proto
if you mean codec, you can refer to Carl's response.
Post by mahesh p
Thanks,
Mahesh
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
mahesh p
2016-11-29 10:44:33 UTC
Permalink
Hi,

encoder itself produces different video output files.
for ex: bitstream_1.out, bitstream_2.out, bitstream_3.out


ffmpeg -i input -filter_complex \
"[0:v]split=2[s0][s1]; \
[s0]scale=1280:-2[v0]; \
[s1]scale=640:-2[v1]" \
-map "[v0]" -map "[v1]" -map 0:a -c:v libx264 -c:a aac -f tee \
"[select=\'v:0,a\']local0.mkv| \
[select=\'v:0,a\':f=flv]rtmp://server0/app/instance/playpath| \
[select=\'v:1,a\']local1.mkv| \
[select=\'v:1,a\':f=flv]rtmp://server1/app/instance/playpath"


but In above ffmpeg example two x264 encoder instances will run in parallel
right? If one libx264 encoder produces different video output files how
ffmpeg will handle?
Post by Steven Liu
Post by mahesh p
Actually encoder producing multiple output files but where as tee muxer
can be used to write the same data to several files So I'm looking for
solution where ffmpeg generates all output files which are produced by an
encoder.
if you want to use tee, the tee format is a AVFormatContext, you can use
it like write mp4, mov, flv, and so on.
tee can split multiple output file use '|'
Post by mahesh p
Post by Steven Liu
Post by mahesh p
Hello,
I am looking for a solution by which one encoder can
generate multiple output files. Can we do this with ffmpeg today?
Do you mean muxers: tee, tee proto
if you mean codec, you can refer to Carl's response.
Post by mahesh p
Thanks,
Mahesh
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
Carl Eugen Hoyos
2016-11-29 11:08:48 UTC
Permalink
Post by mahesh p
encoder itself produces different video output files.
for ex: bitstream_1.out, bitstream_2.out, bitstream_3.out
No encoder supported by FFmpeg can produce more than
one video stream.
Post by mahesh p
ffmpeg -i input -filter_complex \
"[0:v]split=2[s0][s1]; \
[s0]scale=1280:-2[v0]; \
[s1]scale=640:-2[v1]" \
-map "[v0]" -map "[v1]" -map 0:a -c:v libx264 -c:a aac -f tee \
"[select=\'v:0,a\']local0.mkv| \
[select=\'v:0,a\':f=flv]rtmp://server0/app/instance/playpath| \
[select=\'v:1,a\']local1.mkv| \
[select=\'v:1,a\':f=flv]rtmp://server1/app/instance/playpath"
but In above ffmpeg example two x264 encoder instances will
run in parallel right?
Yes, this is because one x264 encoder instance can output exactly
one video stream (but your command line requires two different
video streams).

Do not top-post here, Carl Eugen
mahesh p
2016-11-29 11:34:14 UTC
Permalink
oh ok, Thanks all.
Post by Carl Eugen Hoyos
Post by mahesh p
encoder itself produces different video output files.
for ex: bitstream_1.out, bitstream_2.out, bitstream_3.out
No encoder supported by FFmpeg can produce more than
one video stream.
Post by mahesh p
ffmpeg -i input -filter_complex \
"[0:v]split=2[s0][s1]; \
[s0]scale=1280:-2[v0]; \
[s1]scale=640:-2[v1]" \
-map "[v0]" -map "[v1]" -map 0:a -c:v libx264 -c:a aac -f tee \
"[select=\'v:0,a\']local0.mkv| \
[select=\'v:0,a\':f=flv]rtmp://server0/app/instance/playpath| \
[select=\'v:1,a\']local1.mkv| \
[select=\'v:1,a\':f=flv]rtmp://server1/app/instance/playpath"
but In above ffmpeg example two x264 encoder instances will
run in parallel right?
Yes, this is because one x264 encoder instance can output exactly
one video stream (but your command line requires two different
video streams).
Do not top-post here, Carl Eugen
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
Steven Liu
2016-11-29 14:04:04 UTC
Permalink
Post by mahesh p
Hi,
encoder itself produces different video output files.
for ex: bitstream_1.out, bitstream_2.out, bitstream_3.out
ffmpeg -i input -filter_complex \
"[0:v]split=2[s0][s1]; \
[s0]scale=1280:-2[v0]; \
[s1]scale=640:-2[v1]" \
-map "[v0]" -map "[v1]" -map 0:a -c:v libx264 -c:a aac -f tee \
"[select=\'v:0,a\']local0.mkv| \
[select=\'v:0,a\':f=flv]rtmp://server0/app/instance/playpath| \
[select=\'v:1,a\']local1.mkv| \
[select=\'v:1,a\':f=flv]rtmp://server1/app/instance/playpath"
but In above ffmpeg example two x264 encoder instances will run in
parallel right? If one libx264 encoder produces different video output
files how ffmpeg will handle?
If you want output multiple rtmp stream, you can use like this:

ffmpeg -i input -vcodec libx264 -f flv
"tee:rtmp://server0/app/stream0|rtmp://server1/live/stream1"
Post by mahesh p
Post by Steven Liu
Post by mahesh p
Actually encoder producing multiple output files but where as tee muxer
can be used to write the same data to several files So I'm looking for
solution where ffmpeg generates all output files which are produced by an
encoder.
if you want to use tee, the tee format is a AVFormatContext, you can use
it like write mp4, mov, flv, and so on.
tee can split multiple output file use '|'
Post by mahesh p
Post by Steven Liu
Post by mahesh p
Hello,
I am looking for a solution by which one encoder can
generate multiple output files. Can we do this with ffmpeg today?
Do you mean muxers: tee, tee proto
if you mean codec, you can refer to Carl's response.
Post by mahesh p
Thanks,
Mahesh
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
mahesh p
2016-11-30 12:22:25 UTC
Permalink
Post by mahesh p
Hi,
encoder itself produces different video output files.
for ex: bitstream_1.out, bitstream_2.out, bitstream_3.out
ffmpeg -i input -filter_complex \
"[0:v]split=2[s0][s1]; \
[s0]scale=1280:-2[v0]; \
[s1]scale=640:-2[v1]" \
-map "[v0]" -map "[v1]" -map 0:a -c:v libx264 -c:a aac -f tee \
"[select=\'v:0,a\']local0.mkv| \
[select=\'v:0,a\':f=flv]rtmp://server0/app/instance/playpath| \
[select=\'v:1,a\']local1.mkv| \
[select=\'v:1,a\':f=flv]rtmp://server1/app/instance/playpath"
but In above ffmpeg example two x264 encoder instances will run in
parallel right? If one libx264 encoder produces different video output
files how ffmpeg will handle?
ffmpeg -i input -vcodec libx264 -f flv "tee:rtmp://server0/app/
stream0|rtmp://server1/live/stream1"
Thanks, Carl Eugen said 'No encoder supported by FFmpeg can produce more
than one video stream'
Post by mahesh p
Post by Steven Liu
Post by mahesh p
Actually encoder producing multiple output files but where as tee muxer
can be used to write the same data to several files So I'm looking for
solution where ffmpeg generates all output files which are produced by an
encoder.
if you want to use tee, the tee format is a AVFormatContext, you can use
it like write mp4, mov, flv, and so on.
tee can split multiple output file use '|'
Post by mahesh p
Post by Steven Liu
Post by mahesh p
Hello,
I am looking for a solution by which one encoder can
generate multiple output files. Can we do this with ffmpeg today?
Do you mean muxers: tee, tee proto
if you mean codec, you can refer to Carl's response.
Post by mahesh p
Thanks,
Mahesh
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
http://ffmpeg.org/mailman/listinfo/libav-user
Continue reading on narkive:
Loading...