[FFmpeg-trac] #1474(FFmpeg:new): FFMPEG 2 videos (mpeg2video -> .mp4) audio fails
FFmpeg
trac at avcodec.org
Thu Jun 21 18:32:25 CEST 2012
#1474: FFMPEG 2 videos (mpeg2video -> .mp4) audio fails
-------------------------------------+----------------------------------
Reporter: dcoffey3296 | Owner:
Type: defect | Status: new
Priority: normal | Component: FFmpeg
Version: 0.11.1 | Resolution:
Keywords: libavfilter | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+----------------------------------
Comment (by dcoffey3296):
Replying to [comment:1 Cigaes]:
> Please try the following patch:
> [http://ffmpeg.org/pipermail/ffmpeg-devel/2012-June/126277.html]
> Alternatively, you could try to use {{{-filter_complex}}} rather than
{{{-f lavfi}}}.
>
> Please also note that, while your command line is, strictly speaking,
correct, it produces a file with a single-channel audio stream that is not
declared as "mono" but as "front-left"; this is rather unusual. You can
fix it using the {{{pan}}} filter: {{{pan=mono:FC=FL}}}.
Thanks for your help. I tried the patch with both FFMPEG 0.11.1 and
0.10.2.git-f77fd34
Note: my libavdevice/lavfi.c file was slightly different in both cases,
here's what it looks like after I removed the 2 lines:
{{{
enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_U8,
AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_S32,
AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_DBL, -1 };
AVABufferSinkParams *abuffersink_params =
av_abuffersink_params_al$
abuffersink_params->sample_fmts = sample_fmts;
ret = avfilter_graph_create_filter(&sink, abuffersink,
inout->name, NULL,
abuffersink_params,
lavfi->grap$
}}}
Here is the command and output from FFMPEG 0.10.2.git:
{{{
/usr/local/ffgit/bin/ffmpeg -i `pwd`/nate.mov -b 2500k -t 00:01:00 -acodec
libfaac -ab 64k -vcodec libx264 -r 29.97 -pass 1 -s 1280x720 -vf
"movie=`pwd`/tommy.mov, setpts=PTS-STARTPTS [tommyhandle]; [in]
scale=1280:720, pad=1280*2:720 [natehandle]; [tommyhandle] scale=1280:720
[tommyhandle]; [natehandle][tommyhandle] overlay=1280:0 [out]"
`pwd`/10out.mp4
ffmpeg version 0.10.2.git-f77fd34 Copyright (c) 2000-2012 the FFmpeg
developers
built on Jun 21 2012 12:18:12 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2)
configuration: --prefix=/usr/local/ffgit --enable-gpl --enable-version3
--enable-nonfree --enable-libx264 --enable-libxvid --enable-postproc
--enable-swscale --enable-avfilter --enable-pthreads --enable-yasm
--enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libvpx
libavutil 51. 59.100 / 51. 59.100
libavcodec 54. 29.100 / 54. 29.100
libavformat 54. 10.100 / 54. 10.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 82.100 / 2. 82.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/mnt/hgfs/danielpcoffey/Desktop/nate.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2012-06-19 21:13:20
Duration: 00:02:28.81, start: 0.000000, bitrate: 36378 kb/s
Stream #0:0(eng): Video: mpeg2video (Main) (xdvf / 0x66766478),
yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 35000 kb/s, 29.97 fps, 29.97 tbr,
2997 tbn, 59.94 tbc
Metadata:
creation_time : 2012-06-19 21:13:20
handler_name : Apple Alias Data Handler
timecode : 02:20:28;08
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1
channels (FL), s16, 768 kb/s
Metadata:
creation_time : 2012-06-19 21:13:20
handler_name : Apple Alias Data Handler
Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1
channels (FR), s16, 768 kb/s
Metadata:
creation_time : 2012-06-19 21:13:20
handler_name : Apple Alias Data Handler
Stream #0:3(eng): Data: none (tmcd / 0x64636D74)
Metadata:
creation_time : 2012-06-19 21:13:20
handler_name : Apple Alias Data Handler
timecode : 02:20:28;08
Please use -b:a or -b:v, -b is ambiguous
[Parsed_movie_0 @ 0xa0d9460] seek_point:0 format_name:(null)
file_name:/mnt/hgfs/danielpcoffey/Desktop/tommy.mov stream_index:0
[in @ 0xa0ba5a0] w:1920 h:1080 pixfmt:yuv420p tb:1/2997 fr:2997/100
sar:1/1 sws_param:flags=2
[ffmpeg_buffersink @ 0xa141b80] No opaque field provided
[Parsed_scale_2 @ 0xa0b9ae0] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1280
h:720 fmt:yuv420p sar:1/1 flags:0x4
[Parsed_pad_3 @ 0xa0b9e40] w:1280 h:720 -> w:2560 h:720 x:0 y:0
color:0x000000FF
[Parsed_movie_0 @ 0xa0d9460] TB:0.000334
[Parsed_scale_4 @ 0xa0ba600] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1280
h:720 fmt:yuva420p sar:1/1 flags:0x4
[Parsed_overlay_5 @ 0xa0ba9a0] main w:2560 h:720 fmt:yuv420p overlay
x:1280 y:0 w:1280 h:720 fmt:yuva420p
[Parsed_overlay_5 @ 0xa0ba9a0] main_tb:1/2997 overlay_tb:1/2997 ->
tb:1/2997 exact:1
[scale @ 0xa0bad60] w:2560 h:720 fmt:yuv420p sar:1/1 -> w:1280 h:720
fmt:yuv420p sar:2/1 flags:0x4
[aformat @ 0xa440f20] auto-inserting filter 'auto-inserted resampler 0'
between the filter 'Parsed_anull_0' and the filter 'aformat'
[auto-inserted resampler 0 @ 0xa434da0] [SWR @ 0xa434fe0] Input channel
layout '1 channels (FL)' is not supported
[auto-inserted resampler 0 @ 0xa434da0] Failed to configure output pad on
auto-inserted resampler 0
Error opening filters!
}}}
and the output from FFMPEG 0.11.1:
{{{
ffmpeg -i `pwd`/nate.mov -b 2500k -t 00:01:00 -acodec libfaac -ab 64k
-vcodec libx264 -r 29.97 -pass 1 -s 1280x720 -vf "movie=`pwd`/tommy.mov,
setpts=PTS-STARTPTS [tommyhandle]; [in] scale=1280:720, pad=1280*2:720
[natehandle]; [tommyhandle] scale=1280:720 [tommyhandle];
[natehandle][tommyhandle] overlay=1280:0 [out]"
`pwd`/sidebyside720r2500k.mp4
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Jun 21 2012 12:07:09 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2)
configuration: --prefix=/usr/local --enable-gpl --enable-version3
--enable-nonfree --enable-libx264 --enable-libxvid --enable-postproc
--enable-swscale --enable-avfilter --enable-pthreads --enable-yasm
--enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libvpx
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/mnt/hgfs/danielpcoffey/Desktop/nate.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2012-06-19 21:13:20
Duration: 00:02:28.81, start: 0.000000, bitrate: 36378 kb/s
Stream #0:0(eng): Video: mpeg2video (Main) (xdvf / 0x66766478),
yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 35000 kb/s, 29.97 fps, 29.97 tbr,
2997 tbn, 59.94 tbc
Metadata:
creation_time : 2012-06-19 21:13:20
handler_name : Apple Alias Data Handler
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1
channels (FL), s16, 768 kb/s
Metadata:
creation_time : 2012-06-19 21:13:20
handler_name : Apple Alias Data Handler
Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1
channels (FR), s16, 768 kb/s
Metadata:
creation_time : 2012-06-19 21:13:20
handler_name : Apple Alias Data Handler
Stream #0:3(eng): Data: none (tmcd / 0x64636D74)
Metadata:
creation_time : 2012-06-19 21:13:20
handler_name : Apple Alias Data Handler
timecode : 02:20:28;08
Please use -b:a or -b:v, -b is ambiguous
File '/mnt/hgfs/danielpcoffey/Desktop/sidebyside720r2500k.mp4' already
exists. Overwrite ? [y/N] y
w:1920 h:1080 pixfmt:yuv420p tb:1/2997 sar:1/1 sws_param:flags=2
[buffersink @ 0xa44cd20] No opaque field provided
[movie @ 0xa433b20] seek_point:0 format_name:(null)
file_name:/mnt/hgfs/danielpcoffey/Desktop/tommy.mov stream_index:0
[scale @ 0xa44d680] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1280 h:720
fmt:yuv420p sar:1/1 flags:0x4
[scale @ 0xa4b6520] w:1280 h:720 fmt:yuv420p sar:1/1 -> w:1280 h:720
fmt:yuv420p sar:1/1 flags:0x4
[pad @ 0xa433a80] w:1280 h:720 -> w:2560 h:720 x:0 y:0 color:0x000000FF
[movie @ 0xa433b20] TB:0.000334
[scale @ 0xa4b7040] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1280 h:720
fmt:yuva420p sar:1/1 flags:0x4
[overlay @ 0xa4b62e0] main w:2560 h:720 fmt:yuv420p overlay x:1280 y:0
w:1280 h:720 fmt:yuva420p
[overlay @ 0xa4b62e0] main_tb:1/2997 overlay_tb:1/2997 -> tb:1/2997
exact:1
[aformat @ 0xa5f7360] auto-inserting filter 'auto-inserted resampler 0'
between the filter 'src' and the filter 'aformat'
[aresample @ 0xa656ca0] [SWR @ 0xa63a2c0] Input channel layout isnt
supported
Error opening filters!
}}}
Thank you and let me know what else I can do!
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1474#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list