[FFmpeg-user] filter_complex and map. Am i confused or bug?

Alex Molon alex.molon at vision247.com
Thu Jan 31 14:52:01 EET 2019


Hi Carl, 

My problem actually is not the order itself, but how the single tracks are actually encoded....

The complete command is:

ffmpeg -i INPUTFILE -filter_complex "[0:v]scale=720:576[vidout1];[0:v]scale=640:480[vidout2]" -c:v libx264 -c:a aac -b:v:vidout1 2M -minrate:v:vidout1 2M -maxrate:v:vidout1 2M -b:v:vidout2 1M -minrate:v:vidout2 1M -maxrate:v:vidout2 1M -map [vidout2] -map [vidout1] -map 0:a -f mpegts test.ts

And the result is that: 
instead to have a stream with one video track 720x576 at 2M/2M/2M, one video track 640x480 at 1M/1M/1m and one audio track
as a result I have a stream with one video track with one video track 640x480 at 1M/1M/1M, one video track 720x576 with no specific encoding settings and one audio track.
Or, in alternative (if I change the order of the map commands) one video track 720x576 at 1M/1M/1M, one video track 640x480 with no specific encoding settings and one audio track.

Output #0, mpegts, to 'test.ts':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: h264 (libx264), yuv420p(top coded first (swapped)), 640x480 [SAR 4:3 DAR 16:9], q=-1--1, 1000 kb/s, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.35.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 1000000/0/1000000 buffer size: 0 vbv_delay: -1
    Stream #0:1: Video: h264 (libx264), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.35.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:2: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:

Thanks in advance,
Alex

-----Original Message-----
From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On Behalf Of Carl Eugen Hoyos
Sent: 31 January 2019 12:45
To: FFmpeg user questions
Subject: Re: [FFmpeg-user] filter_complex and map. Am i confused or bug?

2019-01-31 13:41 GMT+01:00, Alex Molon <alex.molon at vision247.com>:

> Basically I have a file with a single video track and a single audio track.
>
> What I want to achieve is:
>
>
>
> a) Scale the video track to 720x576 and encode it in H264 @ 2M with 2M
> minrate and 2M maxrate
>
> b) Scale the video track to 640x480 and encode it in H264 @ 1M with 1M
> minrate and 1M maxrate
>
> c) Pick the audio track and encode it in aac

> d) Mux all the tracks together in this order: first Video 640x480, second
> Video 720x576, third Audio

Transport streams do not know about "order", this concept simply
doesn't apply.

If this does not answer your question, please provide your actual
command line (no variables) including the complete, uncut console
output if you need support here.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list