나는 한동안 비디오 프로젝트를 진행했고 마침내 벽에 부딪쳤다. VLC . VLC는 베스트 비디오 플레이어. 비디오 생성 도구로도 사용할 수 있지만 출력 파일의 FPS와 관련된 몇 가지 단점이 있습니다. 재조사를 하기로 했습니다 FFmpeg 대체품으로. 나는 오래 전에 모든 문서를 실제로 읽지 않고 FFmpeg를 사용했고 그것이 복잡하다는 것을 기억했습니다. 글쎄요. 나는 오늘 문서를 읽는 데 보냈다. 수많은 문서가 포함된 명령줄 도구입니다(링크 참조). . 나는 이것을 개념 증명으로 모았습니다. 더 많은 일을 할 수 있습니다.
아래의 JSL은 비디오 시퀀스에 대한 이미지를 생성하는 사용자 정의 함수와 FFmpeg를 실행하여 비디오를 만드는 RunProgram 호출로 구성됩니다. FFmpeg는 stdin을 통해 이미지를 가져오라고 지시하고 RunProgram은 사용자 정의 함수를 호출하여 이미지를 제공합니다. Windows에서만 실행했지만 Mac에서도 실행하려면 약간의 변경만 필요하다고 생각합니다.
실행하려면 FFmpeg를 다운로드해야 합니다. 그들의 웹 사이트는 당신이 그것을 얻을 수 있는 다른 사이트를 가리킵니다. 공식 Windows 버전이 없는 이유를 잘 모르겠습니다. 일단 설치되면 이 스크립트는 약 30초 안에 실행되어 8초짜리 비디오를 만든 다음 기본 플레이어에서 비디오를 엽니다. VLC에서 더 잘 보이거나 YouTube에 업로드하여 다음과 같이 볼 수 있습니다.
읽기 법적 물건 그것으로 상업적인 작업을 할 예정이라면 신중하게.
// generate images for ffmpeg stdin on the fly to make a video
// using https://ffmpeg.org/download.html#build-windows
//
// You could make a somewhat simpler version, maybe, by writing
// the files to disk and telling ffmpeg to re-read them. I wanted
// to use the stdin pipe, and didn't try a file. I hope this pipe is
// at least as fast as writing and reading the files.
//
// you can't make a 2nd, parallel stream of audio data using RunProgram,
// so you'll need a disk file for audio. Or http as shown...
outputmp4 = ConvertFilePath("$desktop/VideoMadeByJMPandFFMPEG.mp4", "windows");
nrows = 1080 / 2;// keep the image buffer even in both dimensions
ncols = 1920 / 2;// and maybe a multiple of 16 as well
Open Log( 1 ); // where the action is (may need this window open for the text box to work)
imagex = J( nrows, ncols, RGB Color( 1, 1, 1 ) ); // buffer of JSL color values, updated by getNextImage...
// credit the CC music...write this once, into the buffer
musicCredit = Text Box(
"\!"Pump Sting\!" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
http://creativecommons.org/licenses/by/4.0/
"||char(asdate(today())),
<<SETWRAP></SETWRAP>