'컴퓨터 이야기~/소프트웨어'에 해당되는 글 118건

  1. 2024.01.28 API / WEB 해외 배포
  2. 2024.01.25 DUR 자동으로 닫기
  3. 2023.12.28 Retro Pie / Rasberrypie 에 retro 게임
  4. 2023.12.09 AWS Polly
  5. 2023.12.09 odp -> jpg + txt
  6. 2023.12.08 ffmpeg 로 더빙넣기.
  7. 2023.12.08 AWS Polly API
  8. 2023.12.03 Sendmail error log 가 쌓이는 문제
  9. 2023.12.03 CURLOPT_MUTE deprecated
  10. 2023.06.25 구글에서 피부질환검색 AI

website/app 를 전세계에 배포할때, 해외에서 느린 부분에 대한 고민이 있다. 여러시행착오와 많은 비용을 들인 끝에 아래가 제일 낫다는 결론. 수십시간과 수백만원 쓰고 내린 결론인데 좀 더 미리 찾아보았으면 덜 고생했을듯.

html = AWS CloudFront
api = AWS API gateway (REST API)
proxy = AWS (5$) + VULTR (6$ intel high-frequency) 

ip = AWS router 53 (multi-value proxing)

 

비슷한 효과를 내려면 해외 30개에 proxy 를 깔아야 한다.

'컴퓨터 이야기~ > 소프트웨어' 카테고리의 다른 글

DUR 자동으로 닫기  (0) 2024.01.25
Retro Pie / Rasberrypie 에 retro 게임  (0) 2023.12.28
AWS Polly  (0) 2023.12.09
odp -> jpg + txt  (0) 2023.12.09
ffmpeg 로 더빙넣기.  (0) 2023.12.08
,

우측 아래에 나타나는 DUR 팝업을 5분에 한번씩 체크해서 닫아줍니다. close.zip 을 풀고 close.exe 를 실행하면 됩니다.

close.zip
0.53MB

 

실행하면 우측 아래 트레이 영역에 방패가 보입니다.

DUR 뿐 아니라 이것도 덤으로 닫아 줍니다.

 

시작프로그램으로 등록하고 싶다면,

(1) close.exe 를 우측 클릭해서 "바탕 화면에 바로 가기 만들기" 를 해서 "close.exe 바로가기"를 하나 만듭니다.

(2) <윈도우키> + R 을 누르면 실행창이 아래처럼 띄워집니다. "shell:startup" 을 타이핑해서 시작프로그램 폴더를 엽니다.

(3) "close.exe 바로가기" 를 시작프로그램 폴더에 카피하면 윈도우 시작시 같이 실행이 됩니다. 

 

Reference>

https://learn.microsoft.com/ko-kr/windows/win32/api/winuser/nf-winuser-getshellwindow?redirectedfrom=MSDN

https://learn.microsoft.com/ko-kr/windows/win32/api/winuser/nf-winuser-getdesktopwindow?redirectedfrom=MSDN

https://learn.microsoft.com/ko-kr/windows/win32/api/winuser/nf-winuser-findwindowexa?redirectedfrom=MSDN

'컴퓨터 이야기~ > 소프트웨어' 카테고리의 다른 글

API / WEB 해외 배포  (0) 2024.01.28
Retro Pie / Rasberrypie 에 retro 게임  (0) 2023.12.28
AWS Polly  (0) 2023.12.09
odp -> jpg + txt  (0) 2023.12.09
ffmpeg 로 더빙넣기.  (0) 2023.12.08
,

https://retropie.org.uk/

 

RetroPie

Retro-gaming on the Raspberry Pi

retropie.org.uk

 

Rasberrypie 에 retro 게임을 설치해주는 ROM 들을 모아 놓은듯.

'컴퓨터 이야기~ > 소프트웨어' 카테고리의 다른 글

API / WEB 해외 배포  (0) 2024.01.28
DUR 자동으로 닫기  (0) 2024.01.25
AWS Polly  (0) 2023.12.09
odp -> jpg + txt  (0) 2023.12.09
ffmpeg 로 더빙넣기.  (0) 2023.12.08
,

,

import uno
import os

def export_slide_to_jpg_and_notes(input_file, output_dir, slide_number):
    # Start LibreOffice process
    localContext = uno.getComponentContext()
    resolver = localContext.ServiceManager.createInstanceWithContext("cohttp://m.sun.star.bridge.UnoUrlResolver", localContext)
    context = resolver.resolve("uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext")
    desktop = context.ServiceManager.createInstanceWithContext("cohttp://m.sun.star.frame.Desktop", context)
    
    # Load the presentation file
    file_url = uno.systemPathToFileUrl(os.path.abspath(input_file))
    document = desktop.loadComponentFromURL(file_url, "_blank", 0, ())

    if document:
        try:
            # Get slide count
            slide_count = document.getDrawPages().getCount()
            
            if slide_number > slide_count or slide_number < 1:
                print("Invalid slide number")
            else:
                # Get the slide
                slide = document.getDrawPages().getByIndex(slide_number - 1)
                
                # Export the slide as JPG
                output_file = os.path.join(output_dir, f"slide_{slide_number}.jpg")
                export_slide_as_jpg(slide, output_file)
                
                # Extract slide notes
                notes_text = extract_slide_notes(slide)
                notes_output_file = os.path.join(output_dir, f"slide_{slide_number}_notes.txt")
                save_notes_to_file(notes_text, notes_output_file)
                print(f"Slide {slide_number} exported as {output_file}")
                print(f"Slide {slide_number} notes exported as {notes_output_file}")
        finally:
            document.close(True)

def export_slide_as_jpg(slide, output_file):
    export_props = (
        ("FilterName", "impress_jpg_Export"),
        ("URL", uno.systemPathToFileUrl(output_file)),
        ("Quality", 90),
    )
    slide.exportToURL(*export_props)

def extract_slide_notes(slide):
    notes = slide.getNotes()
    if notes:
        return notes.PresentationNotes
    return ""

def save_notes_to_file(notes_text, output_file):
    with open(output_file, "w", encoding="utf-8") as file:
        file.write(notes_text)

# Usage
input_presentation = "path_to_your_presentation.odp"  # Replace with your presentation file path
output_directory = "output_folder"  # Replace with your desired output directory
slide_to_export = 1  # Replace with the slide number you want to export

export_slide_to_jpg_and_notes(input_presentation, output_directory, slide_to_export)

'컴퓨터 이야기~ > 소프트웨어' 카테고리의 다른 글

Retro Pie / Rasberrypie 에 retro 게임  (0) 2023.12.28
AWS Polly  (0) 2023.12.09
ffmpeg 로 더빙넣기.  (0) 2023.12.08
AWS Polly API  (0) 2023.12.08
Sendmail error log 가 쌓이는 문제  (0) 2023.12.03
,

동영상에 더빙을 넣을 수 있나?
 
ChatGPT
ChatGPT

네, 동영상에 더빙을 넣을 수 있어요! 더빙을 하기 위해서는 보통 특수한 소프트웨어나 앱을 사용하거나 전문적인 작업이 필요하죠. 일부 온라인 플랫폼은 텍스트를 음성으로 변환해주는 기능을 제공하기도 해요. 동영상 더빙을 원한다면 음성 녹음 후 이를 편집 프로그램으로 동영상에 추가하는 방법을 사용할 수 있어요. 필요한 경우 전문가의 도움을 받는 것도 좋아요!

 
You
ffmpeg 로 가능한가?
 
ChatGPT
ChatGPT

네, FFmpeg을 사용하여 동영상에 더빙을 추가할 수 있어요. FFmpeg은 강력한 도구로 동영상 및 오디오를 처리하는 데 사용되는 오픈 소스 멀티미디어 프레임워크입니다. 이를 이용하여 동영상에 음성을 추가하거나 교체할 수 있어요.

일반적으로 FFmpeg을 사용하여 오디오를 동영상에 추가하는 방법은 다음과 같습니다.

bashCopy code
ffmpeg -i input_video.mp4 -i input_audio.mp3 -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a:0 output_video.mp4

위 명령은 input_video.mp4에 input_audio.mp3를 추가하여 output_video.mp4를 만듭니다. -i 옵션은 입력 파일을 나타내며, -c:v copy는 비디오를 그대로 복사하고, -c:a aac -strict experimental -map 0:v:0 -map 1:a:0는 오디오를 AAC 형식으로 인코딩하여 비디오에 추가합니다.

더빙을 위해서는 원하는 더빙 오디오 파일을 준비하고, 이를 -i input_audio.mp3 부분에 지정하여 사용할 수 있어요. 옵션을 조정하여 원하는 형식과 설정에 맞게 수정할 수 있습니다. FFmpeg을 사용할 때 주의할 점은 올바른 옵션 및 형식을 사용하는 것이 중요하며, 필요에 따라 추가적인 설정이 필요할 수 있습니다.

 
You
ffmpeg 로 영어 한국어 더빙을 둘다 넣는 방법은?
 
ChatGPT
ChatGPT

FFmpeg을 사용하여 동영상에 영어와 한국어 더빙을 모두 추가하는 방법은 가능합니다. 이를 위해서는 먼저 각 언어의 오디오 파일을 준비해야 합니다. 그리고 더빙되어야 하는 각 부분의 시간을 정확히 파악하여 이를 영상에 맞추어 조정해야 합니다.

아래는 예시로 영어와 한국어 더빙을 추가하는 방법입니다. 이는 각각 english_audio.mp3와 korean_audio.mp3라는 이름으로 각각의 더빙된 오디오 파일이 있다고 가정한 것입니다. 영상의 어느 부분에 어떤 언어의 더빙을 넣어야 하는지에 대한 타임코드도 필요합니다.

bashCopy code
ffmpeg -i input_video.mp4 -i english_audio.mp3 -i korean_audio.mp3 -filter_complex "[0:v]setpts=PTS-STARTPTS[v];[1:a]adelay=5000|5000[a1];[2:a]adelay=10000|10000[a2];[v][a1][a2]overlay=shortest=1:eof_action=pass" -c:v libx264 -c:a aac -strict experimental output_video.mp4

이 명령은 input_video.mp4에 영어 더빙을 english_audio.mp3로, 한국어 더빙을 korean_audio.mp3로 추가합니다. adelay 필터는 오디오의 시간을 조정하는 데 사용되며, 여기서 5000과 10000은 각각 영어와 한국어 더빙이 시작해야 하는 시간을 밀리초 단위로 나타냅니다. 필터 복합체(filter_complex)를 사용하여 영상과 오디오를 조합하고, overlay 필터를 통해 오디오를 영상에 오버레이합니다.

실제 사용할 때는 더빙이 들어갈 타임코드, 오디오 길이, 오디오 파일명 등을 적절히 조정해야 합니다. 또한, 각 언어의 오디오와 동기화된 더빙을 위해 정확한 타이밍과 오디오 파일의 길이가 중요합니다.

 
You
ffmpeg 로 1개의 jpg 파일을 가지고 그대로 나오는 3분짜리 동영상을 만들수 있나?
 
ChatGPT
ChatGPT

네, FFmpeg을 사용하여 1개의 JPG 파일을 사용하여 일정 시간 동안 지속되는 동영상을 만들 수 있습니다. 아래는 해당 작업을 수행할 수 있는 FFmpeg 명령어입니다.

bashCopy code
ffmpeg -loop 1 -i your_image.jpg -c:v libx264 -t 180 -pix_fmt yuv420p output_video.mp4

이 명령어는 your_image.jpg라는 JPG 파일을 무한히 반복(-loop 1)하여 output_video.mp4라는 파일로 3분(-t 180) 동안 만들어냅니다. -c:v libx264는 H.264 코덱을 사용하여 비디오를 인코딩하고, -pix_fmt yuv420p는 픽셀 형식을 지정합니다.

이렇게 하면 입력된 이미지가 3분 동안 유지되는 동영상이 생성됩니다. 원하는 길이나 형식으로 수정하고 싶다면, -t 옵션으로 동영상의 길이를 조정할 수 있습니다.

 
You
ffmpeg 로 2개의 동영상을 합칠 수 있나?
 
ChatGPT
ChatGPT

네, FFmpeg을 사용하여 두 개의 동영상을 합칠 수 있습니다. 다음은 두 동영상을 연결하여 하나의 파일로 만드는 예제 명령어입니다.

bashCopy code
ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex "[0:v][0:a][1:v][1:a]concat=n=2:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" output.mp4

여기서 input1.mp4와 input2.mp4는 합쳐야 할 두 동영상 파일을 나타냅니다. concat 필터는 두 동영상을 연결하며, n=2는 합쳐야 하는 동영상의 개수를 의미하고, v=1:a=1은 비디오 스트림과 오디오 스트림의 개수를 지정합니다.

마지막 부분에서 -map "[outv]" -map "[outa]"는 출력 파일의 비디오 스트림과 오디오 스트림을 지정합니다.

이 명령어를 사용하여 두 동영상을 순서대로 합쳐서 output.mp4로 저장할 수 있습니다. 필요에 따라 추가 옵션을 사용하여 비디오 및 오디오 코덱을 지정하거나 원하는 형식으로 조정할 수 있습니다.

'컴퓨터 이야기~ > 소프트웨어' 카테고리의 다른 글

AWS Polly  (0) 2023.12.09
odp -> jpg + txt  (0) 2023.12.09
AWS Polly API  (0) 2023.12.08
Sendmail error log 가 쌓이는 문제  (0) 2023.12.03
CURLOPT_MUTE deprecated  (0) 2023.12.03
,

https://docs.aws.amazon.com/polly/latest/dg/SynthesizeSpeechSamplePython.html

 

SynthesizeSpeech - Amazon Polly

SynthesizeSpeech The following Python code example uses the AWS SDK for Python (Boto) synthesize speech with shorter texts for near real-time processing. For more information, see the reference for the SynthesizeSpeech operation. This example uses a short

docs.aws.amazon.com

 

This example uses a short string of plain text. You can use SSML text for more control over the output. For more information, see Generating Speech from SSML Documents.

 
import boto3

polly_client = boto3.Session(
                aws_access_key_id=,                     
    aws_secret_access_key=,
    region_name='us-west-2').client('polly')

response = polly_client.synthesize_speech(VoiceId='Joanna',
                OutputFormat='mp3', 
                Text = 'This is a sample text to be synthesized.',
                Engine = 'neural')

file = open('speech.mp3', 'wb')
file.write(response['AudioStream'].read())
file.close()

'컴퓨터 이야기~ > 소프트웨어' 카테고리의 다른 글

odp -> jpg + txt  (0) 2023.12.09
ffmpeg 로 더빙넣기.  (0) 2023.12.08
Sendmail error log 가 쌓이는 문제  (0) 2023.12.03
CURLOPT_MUTE deprecated  (0) 2023.12.03
구글에서 피부질환검색 AI  (0) 2023.06.25
,

/etc/mail/sendmail.cf

 

O MinQueueAge = 1h

에러가 나더라도 1시간 간격으로만 다시 보냄.

 

make

service sendmail restart

 

'컴퓨터 이야기~ > 소프트웨어' 카테고리의 다른 글

ffmpeg 로 더빙넣기.  (0) 2023.12.08
AWS Polly API  (0) 2023.12.08
CURLOPT_MUTE deprecated  (0) 2023.12.03
구글에서 피부질환검색 AI  (0) 2023.06.25
Bard AI V2  (0) 2023.06.13
,

예를 들어, 기존의 curl_setopt와 CURLOPT_MUTE를 사용한 코드가 있다면:

phpCopy code
curl_setopt($ch, CURLOPT_MUTE, 1);

이를 대체할 수 있는 방법은 새로운 옵션을 사용하는 것입니다. 예를 들어, 요청 시 응답 데이터를 무시하고자 한다면 CURLOPT_RETURNTRANSFER을 true로 설정할 수 있습니다.

phpCopy code
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

'컴퓨터 이야기~ > 소프트웨어' 카테고리의 다른 글

AWS Polly API  (0) 2023.12.08
Sendmail error log 가 쌓이는 문제  (0) 2023.12.03
구글에서 피부질환검색 AI  (0) 2023.06.25
Bard AI V2  (0) 2023.06.13
ChatGPT 통계  (0) 2023.06.06
,

 

구글에서 피부질환검색 #AI 기능을 #Lens 에 추가. 앞으로 정확도에 대한 비교 연구가 쏟아질듯.

 

현재 피부질환 multi-class 만든 곳은 Google / ModelDerm / Skin Image Search / Aysa / Medgic / AI dermatologist 요렇게 6군데만 있음.

 

이중에서 Google 과 ModelDerm (https://app.skindx.net) 만 100 disease class 이상 validation 되었음.

 

https://www.cnet.com/health/google-lens-now-lets-you-search-for-a-skin-condition-heres-how/

 

 

Google Lens Now Lets You Search for a Skin Condition. Here's How

Worried about a rash or mole? You can find visual matches online and gather more information with Google's image-recognition technology.

www.cnet.com

 

 

'컴퓨터 이야기~ > 소프트웨어' 카테고리의 다른 글

Sendmail error log 가 쌓이는 문제  (0) 2023.12.03
CURLOPT_MUTE deprecated  (0) 2023.12.03
Bard AI V2  (0) 2023.06.13
ChatGPT 통계  (0) 2023.06.06
CUDA programming 책  (0) 2023.05.28
,