목록2022/11 (3)
둘에서 하나로....
usb 카메라를 udp로 송출하여 다른곳에서 볼 수 있게 할 수 있다. 내 아이피가 192.168.100.13일때 239.0.0.2의 1234로 영상을 송출하는 내용이다. ffmpeg -f dshow -i video="USB Camera" -vf scale=1280:720 -vcodec libx264 -tune zerolatency -f mpegts "udp://239.0.0.2:1234?pkt_size=1316&localaddr=192.168.100.13" 장치의 정확한 이름은 ffmpeg -list_devices true -f dshow -i dummy 명령어로 확인 가능하다.
import ftplib import os # ftp 정보 host = 'server' user = 'id' passwd = 'pw' try: # ftp 연결 with ftplib.FTP() as ftp: ftp.connect(host=host,port=21) print(ftp.getwelcome()) # 접속 메세지 출력 ftp.encoding = 'utf-8' ftp.sendcmd('OPTS UTF8 ON') # 이 문구를 넣어줘야 한글 사용이 가능함 s = ftp.login(user=user,passwd=passwd) ftp.cwd('/테스트폴더A') dirlist = ftp.nlst() print(dirlist) ftp.cwd('테스트폴더B') dirlist = ftp.nlst() print(di..
$url = "https://oauth.codef.io/oauth/token?grant_type=client_credentials&scope=read"; $clientId = "클라이언트ID"; $clientSecret = "클라이언트시크릿키"; $credentials = base64_encode($clientId.":".$clientSecret); $headers = []; $headers[] = "Authorization: Basic {$credentials}"; $headers[] = 'Content-Type: application/json'; $headers[] = 'Cache-Control: no-cache'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL..