[FFmpeg-user] No video only audio in the output file
Moritz Barsnick
barsnick at gmx.net
Wed May 10 17:01:04 EEST 2017
On Tue, May 09, 2017 at 20:59:13 +0530, richard nirmal singh wrote:
> Added -pix_fmt yuv420p but it creates video with watermarkimage and audio
> but actual video content is not available.
>
> ffmpeg.exe -y -i MHPDV000195.mpg -i DAL_WaterMark642x342_new.png
> -filter_complex "overlay=W-w-0:H-h-0" -r 1/10 -s 500x376 -f image2
> OTMM__OUTPUT__FILE%4d.jpg -s 640x352 -aspect 16:9 -r 29.97 -b:v 800000 -b:a
> 96000 -ar 48000 -pix_fmt yuv420p MHPDV000195-O.mp4
[...]
> Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bottom first), 432x324 [SAR 1:1 DAR 4:3], 3932 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
[...]
> Stream #1:0: Video: png, rgba(pc), 652x342, 25 tbr, 25 tbn, 25 tbc
You watermark image is larger than your base video. Are you sure the
watermark is in the base's visible area?
> Stream #0:0 (mpeg2video) -> overlay:main (graph 0)
> Stream #1:0 (png) -> overlay:overlay (graph 0)
> overlay (graph 0) -> Stream #0:0 (mjpeg)
> Stream #1:0 -> #1:0 (png (native) -> h264 (libx264))
> Stream #0:1 -> #1:1 (mp2 (native) -> aac (native))
Ah, you're doing it wrong. Your filter_complex needs to end in
something like "[out]". And then you add to your command line:
-map "[out]" -map 0:a
ffmpeg's defaults are taking different streams than you expect.
Moritz
More information about the ffmpeg-user
mailing list