- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 ffmpeg 通过使用以下命令来缩放我的 WEBM 文件:
ffmpeg -i in.webm -c:v libvpx -vf scale=100:100 out.webm
正如我所料,输出具有正确的分辨率,但问题是透明度变成黑色背景。
有人可以给我一个解决方案。
太感谢了。
以下是操作日志:
ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '56'.
Reading option '-i' ... matched as input url with argument 'in.webm'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'libvpx'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'scale=320:240'.
Reading option 'out.webm' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 56.
Successfully parsed a group of options.
Parsing a group of options: input url in.webm.
Successfully parsed a group of options.
Opening an input file: in.webm.
[NULL @ 000002387e6322a0] Opening 'in.webm' for reading
[file @ 000002387e632ea0] Setting default whitelist 'file,crypto'
Probing matroska,webm score:100 size:2048
Probing mp3 score:1 size:2048
[matroska,webm @ 000002387e6322a0] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
[matroska,webm @ 000002387e6322a0] Before avformat_find_stream_info() pos: 634 bytes read:32768 seeks:0 nb_streams:1
[matroska,webm @ 000002387e6322a0] All info found
[matroska,webm @ 000002387e6322a0] stream 0: start_time: 0.000 duration: -9223372036854776.000
[matroska,webm @ 000002387e6322a0] format: start_time: 0.000 duration: 0.400 bitrate=1432 kb/s
[matroska,webm @ 000002387e6322a0] After avformat_find_stream_info() pos: 34843 bytes read:65536 seeks:0 frames:1
Input #0, matroska,webm, from 'in.webm':
Metadata:
ENCODER : Lavf57.83.100
Duration: 00:00:00.40, start: 0.000000, bitrate: 1432 kb/s
Stream #0:0, 1, 1/1000: Video: vp8, 1 reference frame, yuv420p(progressive), 640x480, 0/1, SAR 1:1 DAR 4:3, 10 fps, 10 tbr, 1k tbn, 1k tbc (default)
Metadata:
alpha_mode : 1
ENCODER : Lavc57.107.100 libvpx
DURATION : 00:00:00.400000000
Successfully opened the file.
Parsing a group of options: output url out.webm.
Applying option c:v (codec name) with argument libvpx.
Applying option vf (set video filters) with argument scale=320:240.
Successfully parsed a group of options.
Opening an output file: out.webm.
[file @ 000002387e658b40] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 4 logical cores
Stream mapping:
Stream #0:0 -> #0:0 (vp8 (native) -> vp8 (libvpx))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Last message repeated 4 times
[Parsed_scale_0 @ 000002387e718a60] Setting 'w' to value '320'
[Parsed_scale_0 @ 000002387e718a60] Setting 'h' to value '240'
[Parsed_scale_0 @ 000002387e718a60] Setting 'flags' to value 'bicubic'
[Parsed_scale_0 @ 000002387e718a60] w:320 h:240 flags:'bicubic' interl:0
[graph 0 input from stream 0:0 @ 000002387e743b00] Setting 'video_size' to value '640x480'
[graph 0 input from stream 0:0 @ 000002387e743b00] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 000002387e743b00] Setting 'time_base' to value '1/1000'
[graph 0 input from stream 0:0 @ 000002387e743b00] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 000002387e743b00] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 000002387e743b00] Setting 'frame_rate' to value '10/1'
[graph 0 input from stream 0:0 @ 000002387e743b00] w:640 h:480 pixfmt:yuv420p tb:1/1000 fr:10/1 sar:1/1 sws_param:flags=2
[format @ 000002387e7fe1e0] compat: called with args=[yuv420p|yuva420p]
[format @ 000002387e7fe1e0] Setting 'pix_fmts' to value 'yuv420p|yuva420p'
[AVFilterGraph @ 000002387e634e60] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[Parsed_scale_0 @ 000002387e718a60] w:640 h:480 fmt:yuv420p sar:1/1 -> w:320 h:240 fmt:yuv420p sar:1/1 flags:0x4
[libvpx @ 000002387e657fe0] v1.6.1
[libvpx @ 000002387e657fe0] --prefix=/Users/kyle/software/libvpx/win64/libvpx-1.6.1-win64 --target=x86_64-win64-gcc
[libvpx @ 000002387e657fe0] vpx_codec_enc_cfg
[libvpx @ 000002387e657fe0] generic settings
g_usage: 0
g_threads: 0
g_profile: 0
g_w: 320
g_h: 240
g_bit_depth: 8
g_input_bit_depth: 8
g_timebase: {1/30}
g_error_resilient: 0
g_pass: 0
g_lag_in_frames: 0
[libvpx @ 000002387e657fe0] rate control settings
rc_dropframe_thresh: 0
rc_resize_allowed: 0
rc_resize_up_thresh: 60
rc_resize_down_thresh: 30
rc_end_usage: 0
rc_twopass_stats_in: 0000000000000000(0)
rc_target_bitrate: 256
[libvpx @ 000002387e657fe0] quantizer settings
rc_min_quantizer: 4
rc_max_quantizer: 63
[libvpx @ 000002387e657fe0] bitrate tolerance
rc_undershoot_pct: 100
rc_overshoot_pct: 100
[libvpx @ 000002387e657fe0] decoder buffer model
rc_buf_sz: 6000
rc_buf_initial_sz: 4000
rc_buf_optimal_sz: 5000
[libvpx @ 000002387e657fe0] 2 pass rate control settings
rc_2pass_vbr_bias_pct: 50
rc_2pass_vbr_minsection_pct: 0
rc_2pass_vbr_maxsection_pct: 400
[libvpx @ 000002387e657fe0] keyframing settings
kf_mode: 1
kf_min_dist: 0
kf_max_dist: 128
[libvpx @ 000002387e657fe0]
[libvpx @ 000002387e657fe0] vpx_codec_enc_cfg
[libvpx @ 000002387e657fe0] generic settings
g_usage: 0
g_threads: 0
g_profile: 0
g_w: 320
g_h: 240
g_bit_depth: 8
g_input_bit_depth: 8
g_timebase: {1/10}
g_error_resilient: 0
g_pass: 0
g_lag_in_frames: 25
[libvpx @ 000002387e657fe0] rate control settings
rc_dropframe_thresh: 0
rc_resize_allowed: 0
rc_resize_up_thresh: 60
rc_resize_down_thresh: 30
rc_end_usage: 0
rc_twopass_stats_in: 0000000000000000(0)
rc_target_bitrate: 200
[libvpx @ 000002387e657fe0] quantizer settings
rc_min_quantizer: 4
rc_max_quantizer: 63
[libvpx @ 000002387e657fe0] bitrate tolerance
rc_undershoot_pct: 100
rc_overshoot_pct: 100
[libvpx @ 000002387e657fe0] decoder buffer model
rc_buf_sz: 6000
rc_buf_initial_sz: 4000
rc_buf_optimal_sz: 5000
[libvpx @ 000002387e657fe0] 2 pass rate control settings
rc_2pass_vbr_bias_pct: 50
rc_2pass_vbr_minsection_pct: 0
rc_2pass_vbr_maxsection_pct: 400
[libvpx @ 000002387e657fe0] keyframing settings
kf_mode: 1
kf_min_dist: 0
kf_max_dist: 128
[libvpx @ 000002387e657fe0]
[libvpx @ 000002387e657fe0] vpx_codec_control
[libvpx @ 000002387e657fe0] VP8E_SET_CPUUSED: 1
[libvpx @ 000002387e657fe0] VP8E_SET_ARNR_MAXFRAMES: 0
[libvpx @ 000002387e657fe0] VP8E_SET_ARNR_STRENGTH: 3
[libvpx @ 000002387e657fe0] VP8E_SET_ARNR_TYPE: 3
[libvpx @ 000002387e657fe0] VP8E_SET_NOISE_SENSITIVITY: 0
[libvpx @ 000002387e657fe0] VP8E_SET_TOKEN_PARTITIONS: 0
[libvpx @ 000002387e657fe0] VP8E_SET_STATIC_THRESHOLD: 0
[libvpx @ 000002387e657fe0] Using deadline: 1000000
Output #0, webm, to 'out.webm':
Metadata:
encoder : Lavf57.83.100
Stream #0:0, 0, 1/1000: Video: vp8 (libvpx), 1 reference frame, yuv420p, 320x240 [SAR 1:1 DAR 4:3], 0/1, q=-1--1, 200 kb/s, 10 fps, 1k tbn, 10 tbc (default)
Metadata:
alpha_mode : 1
DURATION : 00:00:00.400000000
encoder : Lavc57.107.100 libvpx
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Clipping frame in rate conversion by 0.000008
[webm @ 000002387e656880] get_metadata_duration returned: 400000
[webm @ 000002387e656880] Write early duration from metadata = 400
[webm @ 000002387e656880] Writing block at offset 3, size 11223, pts 0, dts 0, duration 100, keyframe 1
[webm @ 000002387e656880] Writing block at offset 11233, size 1288, pts 100, dts 100, duration 100, keyframe 0
[webm @ 000002387e656880] Writing block at offset 12528, size 1504, pts 200, dts 200, duration 100, keyframe 0
[webm @ 000002387e656880] Writing block at offset 14039, size 2481, pts 300, dts 300, duration 100, keyframe 0
[out_0_0 @ 000002387e743d60] EOF on sink link out_0_0:default.
No more output streams to write to, finishing.
[webm @ 000002387e656880] end duration = 400
[webm @ 000002387e656880] stream 0 end duration = 400
frame= 4 fps=0.0 q=0.0 Lsize= 17kB time=00:00:00.30 bitrate= 457.8kbits/s speed=4.45x
video:16kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.413191%
Input file #0 (in.webm):
Input stream #0:0 (video): 4 packets read (34992 bytes); 4 frames decoded;
Total: 4 packets (34992 bytes) demuxed
Output file #0 (out.webm):
Output stream #0:0 (video): 4 frames encoded; 4 packets muxed (16496 bytes);
Total: 4 packets (16496 bytes) muxed
4 frames successfully decoded, 0 decoding errors
[AVIOContext @ 000002387e698c20] Statistics: 14 seeks, 10 writeouts
[AVIOContext @ 000002387cc773e0] Statistics: 71649 bytes read, 0 seeks
最佳答案
尝试
ffmpeg -c:v libvpx -i in.webm -c:v libvpx -vf scale=100:100 -auto-alt-ref 0 out.webm
关于ffmpeg - 使用ffmpeg缩放webm文件时如何保持透明度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48840816/
我正在制作一个应用程序,我需要使用 ffmpeg 将两个视频文件叠加在另一个之上。 .我尝试了各种命令,但它所做的只是合并视频。 最佳答案 基本方法是 ffmpeg -i in1 -i in2 -fi
我将 Qt3D 与 offscreen renderer 结合使用并修改框架图以包含背景图像,例如 here . 不幸的是,使用 QPhongAlphaMaterial 为绘制在背景图像上的对象添加透
我正在开发的这个组件有视觉问题。它是带有 2 个 JTextField 和 2 个 JLabel 的 JPanel。我不能做坚实的背景。我尝试了几种不透明/背景颜色组合但没有成功。 我不允许附加图像,
我正在使用 Gnuplot 成功绘制一些时间序列数据。然而,该系列相当密集(大约 5 英寸空间中有 10,000 个样本),当我绘制多个系列时,很难看到绘制在顶部的系列下方。 有什么方法可以使线条具有
我正在尝试设置一个自定义拖动图标以在 NSTableView 中使用。一切似乎都正常,但由于我对 Quartz 缺乏经验,我遇到了问题。 - (NSImage *)dragImageForRowsWi
是否可以制作例如 20% 透明的 TMemo 或其他 vcl 组件?像 TButton 或 TEdit 吗? 在谷歌搜索解决方案时,我发现了这个: From Here ,然后我想,如果我在窗体上绘制图
我目前正在学习如何使用 Scenekit,并且遇到了透明对象的问题。我写了一个着色器来增加正面看脸时的透明度,当我选择白色背景时,一切都按预期工作...... transparency with wh
我对 openGL 中的 alpha 混合有疑问... 我尝试了一些绘制透明对象的方法...通过在绘制透明面之前禁用 GL_DEPTH_TEST 并在绘制透明面后再次重新启用 GL_DEPTH_TES
我正试图让我的背景 webView 像那样透明: webView.setBackgroundColor(0x00000000); 但它不起作用,如果我添加这一行,一切都是透明的(我看不到我的 html
我目前正在创建一个应用程序并且出现了这个问题,我想让 TabLayout 透明。当我使用 RelativeLayout TabLayout 覆盖内容时,当我使用 LinearLayout TabLay
我有一个 UINavigationItem(不是 UINavigationBar),我想使其透明或不透明。这是在我建立从导航 Controller 到我的 UIViewController 子类的关系
是否可以让您的 android Activity 以透明模式在当前正在运行的 Activity 之上运行,以便您可以通过它看到它下面的 Activity ?如果可能,您可以设置不同级别的透明度吗? 最
我正在使用 noUiSlider 范围 slider 。这是 jsfiddle: https://jsfiddle.net/oun5p1xz/ behaviourSlider = document.g
有没有办法改变控制台的不透明度使其半透明? 还有办法将控制台的背景颜色更改为自定义颜色吗? 最佳答案 快速谷歌显示 this site其中包含用于具有透明窗口的控制台应用程序的代码。 本质上,您必须获
主.xml: 这是我的 main.xml,我试图使按钮最透明,但我仍然想看到它们,但我不知道要添加什么以及在哪里添加,请用低不透明度更正我的 xml在按钮
如何将实际内容 Pane 的背景设置为不透明,我添加到其中的面板我已经设置为不透明,但即使我这样做,选项卡 Pane 的主要区域仍显示为蓝色 JTabbedPane tabbedPane = new
是否可以继承颜色但覆盖不透明度值?以下是伪 CSS 中的示例: .color-class { background-color: rgba(255, 0, 0, 0); } .lighten
我正在尝试让我的导航栏变得 100% 透明,以便 UINavigationButtonItems 只可见并且背景(通常为白色)应该显示背景图像。 我试过了 HomeNavigationControll
RGBA 非常有趣,-webkit-gradient、-moz-gradient 和呃... progid:DXImageTransform.Microsoft.gradient 也是如此...是的。
我一直在尝试使用 AppBarLayout,但找不到使它的背景透明的方法。 我的意思是: 这是我的 XML: 如您所见,我使用的是颜色 #8000
我是一名优秀的程序员,十分优秀!