AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-535078

nadermx's questions

Martin Hope
nadermx
Asked: 2023-05-30 05:08:03 +0800 CST

尝试编写脚本在 cloud-int VM 上安装 qemue 代理

  • 5

我目前正在使用 Proxmox 来部署一些 VMS。我正在使用此处提供的脚本。

我当前的脚本是这样的

#!/bin/bash

#Create template
#args:
# vm_id
# vm_name
# file name in the current directory
function create_template() {
    #Print all of the configuration
    echo "Creating template $2 ($1)"

    #Create new VM 
    #Feel free to change any of these to your liking
    qm create $1 --name $2 --ostype l26 
    #Set networking to default bridge
    qm set $1 --net0 virtio,bridge=vmbr0
    #Set display to serial
    qm set $1 --serial0 socket --vga serial0
    #Set memory, cpu, type defaults
    #If you are in a cluster, you might need to change cpu type
    qm set $1 --memory 1024 --cores 4 --cpu host
    #Set boot device to new file
    qm set $1 --scsi0 ${storage}:0,import-from="$(pwd)/$3",discard=on
    #Set scsi hardware as default boot disk using virtio scsi single
    qm set $1 --boot order=scsi0 --scsihw virtio-scsi-single
    #Enable Qemu guest agent in case the guest has it available
    qm set $1 --agent enabled=1,fstrim_cloned_disks=1
    #Add cloud-init device
    qm set $1 --ide2 ${storage}:cloudinit
    #Set CI ip config
    #IP6 = auto means SLAAC (a reliable default with no bad effects on non-IPv6 networks)
    #IP = DHCP means what it says, so leave that out entirely on non-IPv4 networks to avoid DHCP delays
    qm set $1 --ipconfig0 "ip6=auto,ip=dhcp"
    #Import the ssh keyfile
    # qm set $1 --sshkeys ${ssh_keyfile}
    #If you want to do password-based auth instaed
    #Then use this option and comment out the line above
    qm set $1 --cipassword password
    #Add the user
    qm set $1 --ciuser ${username}
    #Resize the disk to 8G, a reasonable minimum. You can expand it more later.
    #If the disk is already bigger than 8G, this will fail, and that is okay.
    qm disk resize $1 scsi0 8G

    #Make it a template
    qm template $1

    #Remove file when done
    rm $3
}


#Path to your ssh authorized_keys file
#Alternatively, use /etc/pve/priv/authorized_keys if you are already authorized
#on the Proxmox system
export ssh_keyfile=/root/id_rsa.pub
#Username to create on VM template
export username=root

#Name of your storage
export storage=main

#The images that I've found premade
#Feel free to add your own

## Debian
#Buster (10)
wget "https://cloud.debian.org/images/cloud/buster/latest/debian-10-genericcloud-amd64.qcow2"
create_template 900 "temp-debian-10" "debian-10-genericcloud-amd64.qcow2"
#Bullseye (11)
wget "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-genericcloud-amd64.qcow2"
create_template 901 "temp-debian-11" "debian-11-genericcloud-amd64.qcow2" 
#Bookworm (12 dailies - not yet released)
wget "https://cloud.debian.org/images/cloud/bookworm/daily/latest/debian-12-genericcloud-amd64-daily.qcow2"
create_template 902 "temp-debian-12-daily" "debian-12-genericcloud-amd64-daily.qcow2" 

## Ubuntu
#20.04 (Focal Fossa)
wget "https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64.img"
create_template 910 "temp-ubuntu-20-04" "ubuntu-20.04-server-cloudimg-amd64.img" 
#22.04 (Jammy Jellyfish)
wget "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img"
create_template 911 "temp-ubuntu-22-04" "ubuntu-22.04-server-cloudimg-amd64.img" 
#23.04 (Lunar Lobster) - daily builds
wget "https://cloud-images.ubuntu.com/lunar/current/lunar-server-cloudimg-amd64.img"
create_template 912 "temp-ubuntu-23-04-daily" "lunar-server-cloudimg-amd64.img"

## Fedora 37
#Image is compressed, so need to uncompress first
wget https://download.fedoraproject.org/pub/fedora/linux/releases/37/Cloud/x86_64/images/Fedora-Cloud-Base-37-1.7.x86_64.raw.xz
xz -d -v Fedora-Cloud-Base-37-1.7.x86_64.raw.xz
create_template 920 "temp-fedora-37" "Fedora-Cloud-Base-37-1.7.x86_64.raw"

## CentOS Stream
#Stream 8
wget https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220913.0.x86_64.qcow2
create_template 930 "temp-centos-8-stream" "CentOS-Stream-GenericCloud-8-20220913.0.x86_64.qcow2"
#Stream 9 (daily) - they don't have a 'latest' link?
wget https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20230123.0.x86_64.qcow2
create_template 931 "temp-centos-9-stream-daily" "CentOS-Stream-GenericCloud-9-20230123.0.x86_64.qcow2"

现在,为了尝试在每台设备上安装 qemu,我在创建模板之前尝试了类似的操作,但它失败了。所以我不确定是否有更好的方法在 VM 上安装并启用 qemu-agent?

    # Install and enable qemu-guest-agent based on the distribution
    case $2 in
        temp-debian-10 | temp-debian-11 | temp-debian-12-daily)
            qm set $1 --exec "apt update && apt install -y qemu-guest-agent"
            ;;
        temp-ubuntu-20-04 | temp-ubuntu-22-04 | temp-ubuntu-23-04-daily)
            qm set $1 --exec "apt update && apt install -y qemu-guest-agent"
            ;;
        temp-fedora-37)
            qm set $1 --exec "dnf install -y qemu-guest-agent && systemctl enable --now qemu-guest-agent"
            ;;
        temp-centos-8-stream | temp-centos-9-stream-daily)
            qm set $1 --exec "dnf install -y qemu-guest-agent && systemctl enable --now qemu-guest-agent"
            ;;
        *)
            echo "Unsupported distribution: $2"
            ;;
    esac
qemu
  • 1 个回答
  • 13 Views
Martin Hope
nadermx
Asked: 2023-02-17 11:20:06 +0800 CST

使用上游时 Nginx cors 问题

  • 6

我对此感到非常沮丧,因为我似乎无法弄清楚为什么会这样。

我有一个运行良好的 Django webapp。当我尝试更改 worker_connections 时,我开始遇到 CORS 问题。我恢复了这个号码,但仍然遇到 CORS 问题。

我的 nginx 配置如下所示

upstream backend {
    #ip_hash;
    #server 38.106.79.195;
    server unix:/home/www/api.to/app.sock;
}

server {
    server_name api.pdf.to;

    client_max_body_size 10000m;
    gzip_disable "msie6";
    access_log off;
    error_log on;
    gzip_vary on;
    gzip on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_min_length 256;
    gzip_types application/javascript application/font-ttf ttf text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;

    location /word/report.html {
       alias /var/log/nginx/report.html;
    }

    location / {
          add_header 'Access-Control-Allow-Origin' '*'  always;
          add_header 'Access-Control-Max-Age' '3600'  always;
          add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
          add_header 'Access-Control-Allow-Headers' '*' always;

          if ($request_method = OPTIONS ) {
              return 200;
          }


        proxy_pass http://backend;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header REMOTE_ADDR $remote_addr;
        proxy_read_timeout 1000; # this
    }


    location /static/downloads {
        alias /home/www/api.to/static/downloads/;
   add_header Content-disposition "attachment; filename=$1";
   default_type application/octet-stream;
  }





    location /static/ {
        alias /home/www/api.to/static/;
        expires 35d;
        add_header Pragma public;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        access_log off;
    }


    location /static/downloads {
        alias /home/www/api.to/static/downloads/;
   add_header Content-disposition "attachment; filename=$1";
   default_type application/octet-stream;
  }





    location /static/ {
        alias /home/www/api.to/static/;
        expires 35d;
        add_header Pragma public;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        access_log off;
    }


    listen 443 ssl http2; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/api.pdf.to-0001/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/api.pdf.to-0001/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}

我在我的 Django 应用程序中禁用了 CORS,它工作正常,但在重新加载后它不起作用。我必须添加到我的 nginx

          add_header 'Access-Control-Allow-Origin' '*'  always;
          add_header 'Access-Control-Max-Age' '3600'  always;
          add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
          add_header 'Access-Control-Allow-Headers' '*' always;

          if ($request_method = OPTIONS ) {
              return 200;
          }

这使得它在我将它发送到本地框时有效,但如果我将它发送到上游框(具有相同的 nginx 配置),它会给我一个 404 或 CORS 错误。

nginx
  • 1 个回答
  • 15 Views
Martin Hope
nadermx
Asked: 2023-01-24 14:04:44 +0800 CST

使用ffmpeg制作视频所有帧的图像

  • 6

我目前正在尝试拍摄一段视频input.mp4并将其转换为整个视频每秒 30 帧的每一帧的图像。我有这个命令几乎可以工作,因为它制作了整个视频但最后一部分的图像

ffmpeg -i input.mp4 -vf "select='lt(n,3696)',scale=320:-1,tile=20x100" -frames:v 1 -y a.jpg

为了找到视频的总帧数,我使用了这个命令

ffprobe -v error -select_streams v:0 -count_packets -show_entries stream=nb_read_packets -of csv=p=0 input.mp4

哪些输出3696和图像输出大部分,但缺少最后的部分。

ffmpeg
  • 1 个回答
  • 38 Views
Martin Hope
nadermx
Asked: 2022-09-21 10:12:14 +0800 CST

ffmpeg 中的所有格式都允许行 mt

  • 5

我看到 FFmpeg 在 3.4 版本中增加了对基于行的多线程的支持。由于它现在达到版本 5+。我有一个问题,如果我要转换一系列不同版本的文件,我可以添加-row-mt 1到我所有的 ffmpeg 命令中以使它们成为多线程,还是会出现这个错误。

我想换句话说,这是一个特定的编码功能,还是全局的

ffmpeg
  • 2 个回答
  • 19 Views
Martin Hope
nadermx
Asked: 2022-02-25 13:51:38 +0800 CST

使用 Nginx 作为负载均衡器和随机请求挂了一段时间,然后吞吐量真的很慢

  • 5

我目前在下面有一个 Nginx 配置。它在大多数情况下都能正常工作。出于某种原因,有一定比例的请求需要很长时间,它们不会下降。也许最多说几分钟。

然后他们通过,以每秒 5-10kbs 的速度发送文件,而正常请求可能会超过每秒几兆,并在几秒钟内开始。

任何有关调试的帮助将不胜感激。

user sysadminguy;
worker_processes auto;
pid /run/nginx.pid;
worker_rlimit_nofile 25000;
events {
        worker_connections 1080;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##
        access_log off;
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;
        #limit_req_zone $binary_remote_addr zone=mylimit:100m rate=10r/m;
        ##
        # Gzip Settings
        ##

        gzip on;
        gzip_disable "msie6";
        ##
        # Virtual Host Configs
        ##
        upstream backend {
            least_conn;
            server 1.1.1.2:3292 fail_timeout=10s weight=1;
            server 1.1.1.3:3292 fail_timeout=10s weight=1;
            server 1.1.1.4:3292 fail_timeout=10s weight=1;
            server 1.1.1.5:3292 fail_timeout=10s weight=1;
            server 1.1.1.6:3292 fail_timeout=10s weight=2;
            server 1.1.1.7:3292 fail_timeout=10s weight=2;

       }
        server {
            listen      80;
            server_name server1.example.com;
            location / {
                return 301 https://$server_name$request_uri;
            }
        }
        server {
            listen 443 ssl http2 default_server;
            server_name server1.example.com;
            ssl on;
            ssl_certificate /etc/letsencrypt/live/server1.com-0001/fullchain.pem; # managed by Certbot
            ssl_certificate_key /etc/letsencrypt/live/server1.com-0001/privkey.pem; # managed by Certbot

            location = / {
                 return 301 https://example.com;
            }


            location / {
                #limit_req zone=mylimit burst=20;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_read_timeout 3600;
                proxy_request_buffering off;
                proxy_buffering off;
                proxy_pass http://backend;

             }

            location /nginx_status {
                 # Turn on stats
                 stub_status on;
                 access_log   off;
                 # only allow access from 192.168.1.5 #
                 #allow 192.168.1.5;
                 #deny all;
             }
        }
        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}
nginx
  • 1 个回答
  • 374 Views
Martin Hope
nadermx
Asked: 2022-02-13 11:17:50 +0800 CST

将透明 MOV 转换为 GIF

  • 5

我目前有一个透明的 mov 文件。我正在尝试将其转换为 GIF,并且正在使用命令

ffmpeg -i file.mov file.gif

但生成的 GIF 不是透明的。

ffmpeg
  • 1 个回答
  • 819 Views
Martin Hope
nadermx
Asked: 2021-11-04 10:26:05 +0800 CST

让 nginx 将文件作为二进制下载发送

  • 5

我目前有两个目录。 我想要完成的是让 nginx 正常工作于静态中的所有文件和文件夹,就像现在一样app/static。app/static/downloads

location /static/ {
    alias /home/www/api.to/static/;
    expires 35d;
    add_header Pragma public;
    add_header Cache-Control "public, must-revalidate, proxy-revalidate";
    access_log off;
}

但我想发送/static/downloads子目录中的所有文件,例如static/downloads/blah/blah.pdf二进制文件。

我需要为此创建一个新的服务器块吗?我将如何做到这一点?

换句话说,我有一个为用户提供文件的应用程序。但由于这是一个cdn.appURL,它会在新的浏览器选项卡中打开文件,而不是作为下载发送。

nginx
  • 1 个回答
  • 1010 Views
Martin Hope
nadermx
Asked: 2021-05-28 10:28:13 +0800 CST

ffmpeg 覆盖并在 alpha 合并另外两个视频后自动缩放视频

  • 5

我曾经问过这个问题,关于如何将一个 alphamerged 视频覆盖在另一个上,并得到了这个命令的回答。我对其进行了一些调整,以添加最短的覆盖层,使其仅与岸边部分一样长。

ffmpeg -i video.mp4 -i matte.mp4 -i background.mp4 -filter_complex '[1][0]scale2ref[mask][main];[main][mask]alphamerge[vid];[2:v][vid]overlay=shortest=1[out]' -map [out] complete.mp4

这可行,但我需要更具体一点,我将如何修改这个命令,让它自动将 alphamerged 视频缩放到其覆盖的视频的大小

video ffmpeg
  • 1 个回答
  • 437 Views
Martin Hope
nadermx
Asked: 2021-05-19 07:09:49 +0800 CST

alphamerging后ffmpeg将图像叠加到视频中

  • 5

我目前有两个视频,word.mp4和word.matte.mp4。我正在尝试alphamerge对这两个视频进行image.jpg叠加。

我试图使用的命令,我从这个问题中调整过,给了我一个错误

ffmpeg -i word.mp4 -i word.matte.mp4 -i image.jpg -filter_complex '[1][0]scale2ref[mask][main];[main][mask]alphamerge[vid];[2:v][vid]overlay=(W-w)/2:(H-h)/2[out]' -map [out] complete.mp4

但我得到这个错误

Stream mapping:
  Stream #0:0 (hevc) -> scale2ref:ref
  Stream #1:0 (mpeg4) -> scale2ref:default
  Stream #2:0 (mjpeg) -> overlay:main
  overlay -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[libx264 @ 0x560faabe37c0] width not divisible by 2 (983x1115)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

任何帮助,将不胜感激

video ffmpeg
  • 1 个回答
  • 207 Views
Martin Hope
nadermx
Asked: 2021-05-18 22:13:30 +0800 CST

ffmpeg在合并另外两个后覆盖视频

  • 5

我目前有这个命令来 alphamerge 两个视频,并升级其中一个。

ffmpeg -i video.mp4 -i matte.mp4 -filter_complex '[1][0]scale2ref[mask][main];[main][mask]alphamerge' -c:v qtrle output.mov

我也有这个命令可以将视频叠加到另一个视频之上

ffmpeg -i background.mp4 -i output.mov -filter_complex "[0:v][1:v]overlay[out]" -map [out] complete.mp4

我想要做的是将它们组合成一个命令,所以它需要video.mp4,应用matte.mp4with alphamerge,并将其放在background.mp4

但我不确定如何在命令中引用第三个输入,任何帮助将不胜感激

ffmpeg video-conversion
  • 1 个回答
  • 590 Views
Martin Hope
nadermx
Asked: 2021-05-13 10:13:22 +0800 CST

ffmpeg alphamerge 将两个视频合并为具有透明背景的 gif

  • 5

我回答了这个问题,它帮助我使用以下命令将两个 mp4 视频与 alphamerge 合并到一个 .mov 文件中

ffmpeg -i video.mp4 -i mask.mp4 -filter_complex "[1][0]scale2ref[mask][main];[main][mask]alphamerge" -c:v qtrle output.mov

现在,我想知道如何将其更改为 gif 的输出。当我尝试

ffmpeg -i word.mp4 -i word.matte.mp4 -filter_complex "[1][0]scale2ref[mask][main];[main][mask]alphamerge" -c:v qtrle output.gif

我收到了这个错误

[swscaler @ 0x5601daaa4d40] No accelerated colorspace conversion found from yuv420p to argb.
[gif @ 0x5601d9ad2d00] GIF muxer supports only a single video GIF stream.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument

我正在使用 ffmpeg 4.2.4

video ffmpeg
  • 1 个回答
  • 973 Views
Martin Hope
nadermx
Asked: 2021-05-08 21:36:36 +0800 CST

让 ffmpeg 在普通视频文件上合并一个遮罩密钥文件,删除背景

  • 7

我目前有两个 ffmpeg 视频。视频一是遮罩密钥文件,看起来像这样

输出示例

视频二,将是没有背景的普通视频,只有人物。

我将如何在 ffmpeg 中合并这两个视频使其看起来像这样

在此处输入图像描述

我试过命令

ffmpeg -i word.mp4 -i word.matte.mp4 -filter_complex "[0:v][1:v]alphamerge" -shortest -c:v qtrle -an output.mp4

但我收到以下错误

ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'word.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:06.24, start: 0.000000, bitrate: 741 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 738 kb/s, 25.79 fps, 25.79 tbr, 11040 tbn, 51.59 tbc (default)
    Metadata:
      handler_name    : VideoHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'word.matte.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:06.19, start: 0.000000, bitrate: 493 kb/s
    Stream #1:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 568x320 [SAR 1:1 DAR 71:40], 491 kb/s, 26 fps, 26 tbr, 13312 tbn, 26 tbc (default)
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 (h264) -> alphamerge:main
  Stream #1:0 (mpeg4) -> alphamerge:alpha
  alphamerge -> Stream #0:0 (qtrle)
Press [q] to stop, [?] for help
[swscaler @ 0x5619d30b9900] No accelerated colorspace conversion found from yuv420p to argb.
[Parsed_alphamerge_0 @ 0x5619d2f57700] Input frame sizes do not match (1280x720 vs 568x320).
[Parsed_alphamerge_0 @ 0x5619d2f57700] Failed to configure output pad on Parsed_alphamerge_0
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:0

任何帮助,将不胜感激。这是视频文件、蒙版文件和普通视频的链接

编辑:这是这个工作的例子。https://backgroundremover.app/video

video ffmpeg
  • 2 个回答
  • 668 Views
Martin Hope
nadermx
Asked: 2020-08-17 09:06:59 +0800 CST

在 Ubuntu 18.04 上通过 ansible-playbook 禁用 root 密码

  • 6

我目前正在尝试通过 ansible playbook 禁用 ubuntu 18.04 机器的 root 登录。

如果我 ssh in 我知道我可以输入passwd -l root来执行此操作。这是通过ansible playbook实现的方法吗?

---
- hosts: all
  become: true
  tasks:
  - name: Disable root login
    raw: passwd -l root

ansible ubuntu-18.04
  • 1 个回答
  • 3269 Views
Martin Hope
nadermx
Asked: 2020-06-16 11:21:40 +0800 CST

如何配置 nginx 以上传 100GB 的文件?

  • 5

在我的 nginx 文件中,我知道我可以设置,client_max_body_size 20000M;但我想知道是否有人知道最大文件上传限制是多少?

例如,如果我将其设置为,100000M那么我实际上可以上传 100GB 的文件吗?

nginx
  • 1 个回答
  • 299 Views
Martin Hope
nadermx
Asked: 2019-09-27 11:32:01 +0800 CST

制作每秒更改文本的 gif

  • 6

我目前正在尝试复制这样的 gif。

在此处输入图像描述

但我正在努力解决的问题是,为了制作带有文本覆盖的 gif,我会执行以下命令

ffmpeg -ss 30 -t 3 -i input.flv -i palette.png -filter_complex \
"fps=10,scale=320:-1:flags=lanczos,drawtext="fontfile=/path/to/font.ttf: \
 text='Stack Overflow': fontcolor=black: x=160: y=-1"[x];[x][1:v]paletteuse" output.gif

我知道 ffmpeg 提供字幕,但我不确定这是否会改变文本的位置以及让它每秒显示不同的文本。

我必须制作多张图像并将它们粘在一起吗?

ffmpeg
  • 1 个回答
  • 220 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve