2012-06-28 62 views
2

我想在OSX上用ffmpeg添加透明背景的水印。OSF錯誤Ffmpeg和PNG水印

我使用這個命令:

ffmpeg -i test.mpg -vf "movie=stuff.png, scale=100:100 [watermark]; [in][watermark] overlay=main_w-overlay_w:main_h-overlay_h-10 [out]" out.mpg 

而且我得到這個:

ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers 
    built on Jun 12 2012 21:37:10 with clang 3.1 (tags/Apple/clang-318.0.54) 
    configuration: --prefix=/usr/local/Cellar/ffmpeg/0.11.1 --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-libfreetype --cc=/usr/bin/clang --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libass --enable-libvo-aacenc --disable-ffplay 
    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, mpeg, from 'test.mpg': 
    Duration: 00:00:01.04, start: 1.000000, bitrate: 9106 kb/s 
    Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p, 640x480 [SAR 1:1 DAR 4:3], 104857 kb/s, 24 fps, 24 tbr, 90k tbn, 24 tbc 
    Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16, 128 kb/s 
File 'out.mpg' already exists. Overwrite ? [y/N] y 
w:640 h:480 pixfmt:yuv420p tb:1/90000 sar:1/1 sws_param:flags=2 
[buffersink @ 0x7ff50bc1c3e0] No opaque field provided 
[png @ 0x7ff50c038400] unsupported bit depth 16 and color type 4 
[image2 @ 0x7ff50c044800] decoding for stream 0 failed 
[image2 @ 0x7ff50c044800] Could not find codec parameters (Video: png, 640x480) 
[movie @ 0x7ff50bc17200] Failed to find stream info 
[movie @ 0x7ff50bc17200] seek_point:0 format_name:(null) file_name:stuff.png stream_index:0 
[scale @ 0x7ff50bc178c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_movie_0' and the filter 'Parsed_scale_1' 
Impossible to convert between the formats supported by the filter 'Parsed_movie_0' and the filter 'auto-inserted scaler 0' 
Error opening filters! 

我以爲我失蹤png格式的支持,我檢查自制的libpng的安裝,但它變成PNG Apple支持OSX。

而且我也

ffmpeg -codecs list | grep -i png 

,我也有ffmpeg的PNG支持:

DEV D png    PNG (Portable Network Graphics) image 
+0

yor文件16位灰度與alpha?它看起來ffmpeg不支持這種組合。嘗試將其轉換爲8位和/或RGBA。 –

+0

偉大的,實際上是這樣的。你能把它作爲答案發布,所以我可以接受它嗎? – Stpn

回答

1

是侑文件的16位灰度與阿爾法?它看起來像ffmpeg不支持這種組合。嘗試將其轉換爲8位和/或RGBA。