[FFmpeg-user] pan filter confusion
Moritz Barsnick
barsnick at gmx.net
Thu Nov 23 18:29:47 EET 2017
On Thu, Nov 23, 2017 at 13:16:27 +0100, Carles Vila wrote:
> Could you please have a look at what I'm doing wrong?
> Specifically I'm not sure what the [0:1] before the pan does, but it seems
> to be necessary.
[0:1] is the input stream mapping to the complex filter chain. With
this syntax, it references the second stream from the first file. For
your particular file, it's indeed the audio stream. You could use
"[0:a]", just in case the order of video and audio streams are swapped
(or undetermined, as in VOBs).
> Carles$ ffmpeg -i MEAT01_01A_ENG_ME_DV_5.1_24HD_TC.mov -filter_complex
> "[0:1]pan=2c|c0=c0+c1|c1=c2+c3" -s 640x360 -pix_fmt yuv420p proxy_stereo.mp4
While this result looks okay:
> Stream mapping:
> Stream #0:1 (pcm_s24le) -> pan (graph 0)
> pan (graph 0) -> Stream #0:0 (aac)
> Stream #0:0 -> #0:1 (prores (native) -> h264 (libx264))
please do try changing that command line to the more specific mapping
variant:
$ ffmpeg -i MEAT01_01A_ENG_ME_DV_5.1_24HD_TC.mov -filter_complex "[0:a]pan=2c|c0=c0+c1|c1=c2+c3[a]" -s 640x360 -pix_fmt yuv420p -map 0:v -map "[a]" proxy_stereo.mp4
Additionally, if you increase the logging level with "loglevel verbose", the pan
filter should show you what it's doing.
If that command still doesn't work, can you change the filter
expression to
"[0:a]pan=2c|c0=c0+c1|c1=c2+c3[a],volumedetect"
so that we can get an impression whether something should be heard?
> ffmpeg version 3.1.4 Copyright (c) 2000-2016 the FFmpeg developers
This is a bit old. Could you kindly test a recent build from git
master, or a recent release? We don't want to help you debug
long-solved bugs, if you know what I mean. (If you can't build
yourself, binaries are available for many major platforms.)
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MEAT01_01A_ENG_ME_DV_5.1_24HD_TC.mov':
> Metadata:
> major_brand : qt
> minor_version : 537199360
> compatible_brands: qt
> creation_time : 2017-11-09 12:37:45
> Duration: 00:11:13.59, start: 0.000000, bitrate: 178829 kb/s
> Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709), 1920x1080, 164992 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc (default)
[...]
> Output #0, mp4, to 'proxy_stereo.mp4':
[...]
> Stream #0:1(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 0.04 fps, 24k tbn, 23.98 tbc (default)
Wow, why would ffmpeg output a 23.98 fps video as 0.04 fps?
(Unrelated.)
Moritz
More information about the ffmpeg-user
mailing list