[FFmpeg-user] Fwd: Multiple "tee"s in a single FFMPEG instance
Soner Can
soner2 at gmail.com
Mon Sep 8 11:29:36 CEST 2014
Hi,
I made it work but it doesn't work the way I expect. "tee" is used for delivering the same file to different destinations, right? We use it to prevent FFMPEG encode the same file twice. But when I try to use two tee's it needs to transcode again.
Here is the command and output which DOES NOT WORK:
ffmpeg -re -i test.mp4
-c:v libx264
-c:a libfaac
-strict experimental
-filter_complex "[0:0]scale=640x480[large];[0:0]scale=240x50[small]"
-f tee
-map "[large]"
-map 0:1
-c:a copy
"[f=flv]rtmp://RTMP_1_PRIMARIY|[f=flv]rtmp://RTMP_1_BACKUP"
-f tee
-map "[small]"
-map 0:1
-c:a copy
"[f=flv]rtmp://RTMP_2_PRIMARIY|[f=flv]rtmp://RTMP_2_BACKUP"
> ffmpeg version 2.3.3 Copyright (c) 2000-2014 the FFmpeg developers
> built on Aug 25 2014 19:47:15 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
> configuration: --prefix=/usr/local/Cellar/ffmpeg/2.3.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
> libavutil 52. 92.100 / 52. 92.100
> libavcodec 55. 69.100 / 55. 69.100
> libavformat 55. 48.100 / 55. 48.100
> libavdevice 55. 13.102 / 55. 13.102
> libavfilter 4. 11.100 / 4. 11.100
> libavresample 1. 3. 0 / 1. 3. 0
> libswscale 2. 6.100 / 2. 6.100
> libswresample 0. 19.100 / 0. 19.100
> libpostproc 52. 3.100 / 52. 3.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'polis-operasyon.mp4':
> Metadata:
> major_brand : mp42
> minor_version : 0
> compatible_brands: mp42mp41
> creation_time : 2014-08-05 05:41:20
> Duration: 00:01:22.18, start: 0.000000, bitrate: 1795 kb/s
> Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 1280x720 [SAR 1:1 DAR 16:9], 1603 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
> Metadata:
> creation_time : 2014-08-05 05:41:20
> encoder : AVC Coding
> handler_name : ?Mainconcept Video Media Handler
> Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
> Metadata:
> creation_time : 2014-08-05 05:41:20
> handler_name : #Mainconcept MP4 Sound Media Handler
> Output #0, tee, to '[f=flv]rtmp://RTMP_1_PRIMARIY|[f=flv]rtmp://RTMP_1_BACKUP':
> Metadata:
> major_brand : mp42
> minor_version : 0
> compatible_brands: mp42mp41
> Stream #0:0: Video: h264, q=2-31, 128 kb/s, SAR 4:3 DAR 0:0, 25 fps (default)
> Metadata:
> encoder : Lavc55.69.100 libx264
> Stream #0:1(eng): Audio: none, 0 channels, 128 kb/s (default)
> Metadata:
> creation_time : 2014-08-05 05:41:20
> handler_name : #Mainconcept MP4 Sound Media Handler
> Output #1, tee, to '[f=flv]rtmp://RTMP_2_PRIMARIY|[f=flv]rtmp://RTMP_2_BACKUP':
> Metadata:
> major_brand : mp42
> minor_version : 0
> compatible_brands: mp42mp41
> Stream #1:0: Video: none, q=2-31, 128 kb/s (default)
> Stream #1:1(eng): Audio: none, 0 channels, 128 kb/s
> Metadata:
> creation_time : 2014-08-05 05:41:20
> handler_name : #Mainconcept MP4 Sound Media Handler
> Stream mapping:
> Stream #0:0 (h264) -> scale
> Stream #0:0 (h264) -> scale
> scale -> Stream #0:0 (libx264)
> Stream #0:1 -> #0:1 (copy)
> scale -> Stream #1:0 (?)
> Stream #0:1 -> #1:1 (copy)
> Encoder (codec none) not found for output stream #1:0
So when I add encoder to other profile too, it works.
Is this an expected behavior or am I doing something wrong?
(By the way I can not use multiple FFMPEG instances. My source will be a stream)
Thank you
More information about the ffmpeg-user
mailing list