分类 后端 下的文章

package com.journaldev.cloning;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class Employee implements Cloneable {

    private int id;

    private String name;

    private Map<String, String> props;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Map<String, String> getProps() {
        return props;
    }

    public void setProps(Map<String, String> p) {
        this.props = p;
    }

     @Override
     public Object clone() throws CloneNotSupportedException {
     return super.clone();
     }

}
Employee a = new Employee()
Employee b = a.clone()

需要先安装ffmpeg

sudo apt install ffmpeg
def to_m3u8(input_file, output_file):
    import subprocess
    # checkout output_file parent dir exist,if not create it
    output_dir = os.path.dirname(output_file)
    if not os.path.exists(output_dir):
        os.makedirs(output_dir)

    cmd = f'ffmpeg -i {input_file} -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls {output_file}'
    subprocess.call(cmd, shell=True)

to_m3u8('input.mp4','output.m3u8')

server {
  listen 80;
  server_name luntan;
  root /var/www/html;
  index index.php index.html;

  location / {
    try_files $uri $uri/ /index.php?$query_string;
  }

  location ~ \.php$ {
    fastcgi_pass unix:/run/php/php7.4-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }

  location ~ /\.ht {
    deny all;
  }
}