Extra Form
PHP PHP 7.2
CMS Rhymix

https://m.blog.naver.com/chandong83/221165275268

윗 링크 게시글에 있는데로 했지만

첨부파일 모듈에서는 여전히

ffmpeg를 인식못하네요..

cmd로 테스트할때는 분명히 설치가 됬는데 말이죠

뭐가 문제일까용?

  • profile
    라이믹스는 윈도우 환경보다는 리눅스의 환경에 맞춰져 있습니다.
    따라서 리눅스에서 사용가능한 명령어를 사용할 수 있어야 ffmpeg를 실행할 수 있습니다.

    exec function을 이용해서 SSH터미널에서 ffmpeg를 리눅스에서 실행하는 명령어로 구성되어있어서 윈도우환경에서 리눅스터미널으로 접속한 환경에서 사용하는 방식과 동일하게 실행할 수 있어야 하며 exe파일로 설치되는 윈도우 특성상 실행이 어려워 보입니다..

    그리고 파일권한 문제 등등의 이유가 더 있을 듯 합니다.
  • profile

    php.ini 에서 특별히 제한둔 function이 없다면 윈도우에서 ffmpeg의 활용이 가능합니다.

    GIF Convert PRO의 경우 윈도우 환경에서도 ffmpeg로 mp4 변환에 문제가 없습니다.

    반면, 파일 모듈은 같은 경로를 입력해도 GIF 변환이 활성화 되지 않더군요.

     

    gifcs.png

  • profile ?
    윈도우라는게 윈도우서버도 포함인가요?
  • ? profile

    네, 윈도우 서버도 해당됩니다.

    간단하게 php 파일을 생성하셔서 윈도우에서 php를 이용해 ffmpeg가 잘 실행되는지 테스트해보세요.

     

    <?php
    header('Content-Type: text/html; charset=UTF-8');
    $runCmd = 'c:\util\ffmpeg\bin\ffmpeg.exe 2>&1'; //경로는 환경에 맞게 수정
    exec($runCmd, $output, $return_var);
    $rt = print_r($output,true);
    $rt = iconv("EUC-KR","UTF-8", $rt);
    echo nl2br($rt);
    ?>

     

     

    // 아래는 출력 결과

    Array
    (
    [0] => ffmpeg version N-95015-gba24b24aab Copyright (c) 2000-2019 the FFmpeg developers
    [1] => built with gcc 9.2.1 (GCC) 20190918
    [2] => configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
    [3] => libavutil 56. 35.100 / 56. 35.100
    [4] => libavcodec 58. 58.101 / 58. 58.101
    [5] => libavformat 58. 33.100 / 58. 33.100
    [6] => libavdevice 58. 9.100 / 58. 9.100
    [7] => libavfilter 7. 58.102 / 7. 58.102
    [8] => libswscale 5. 6.100 / 5. 6.100
    [9] => libswresample 3. 6.100 / 3. 6.100
    [10] => libpostproc 55. 6.100 / 55. 6.100
    [11] => Hyper fast Audio and Video encoder
    [12] => usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
    [13] =>
    [14] => Use -h to get full help or, even better, run 'man ffmpeg'
    )

  • profile ?
    혹시 FFprobe 경로도 찍어서 보여주실수 있나요?
  • profile ?
    + ffmprobe
    가 없어서 그런지
    경로대로
    ffmpeg를 설치해도
    rhymix 첨부파일 설정에서는
    아직 안되네요.
  • profile ?
    분명 php에서는

    Array
    (
    [0] => ffmpeg version git-2020-02-05-e6891d1 Copyright (c) 2000-2020 the FFmpeg developers
    [1] => built with gcc 9.2.1 (GCC) 20200122
    [2] => configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
    [3] => libavutil 56. 39.100 / 56. 39.100
    [4] => libavcodec 58. 67.101 / 58. 67.101
    [5] => libavformat 58. 37.100 / 58. 37.100
    [6] => libavdevice 58. 9.103 / 58. 9.103
    [7] => libavfilter 7. 74.100 / 7. 74.100
    [8] => libswscale 5. 6.100 / 5. 6.100
    [9] => libswresample 3. 6.100 / 3. 6.100
    [10] => libpostproc 55. 6.100 / 55. 6.100
    [11] => Hyper fast Audio and Video encoder
    [12] => usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
    [13] =>
    [14] => Use -h to get full help or, even better, run 'man ffmpeg'
    )

    잘 뜨는데 말이죵
  • profile
    https://github.com/rhymix/rhymix/blob/master/common/framework/storage.php#L155
    부분을
    if (function_exists('exec') && !starts_with('win', \PHP_OS, false))
    이렇게 수정해보세요.
  • profile ?

    1313.PNG

  • profile ?
    이렇게 뜨네용 ㅠㅠㅠ
  • ? profile

    ffmpg&ffprobe 경로 설정이 이상하네요. ffmpeg.exe 실행파일의 경로(드라이브 문자 포함)를 입력해야 합니다.
    예) c:\util\ffmpeg\bin\ffmpeg.exe

  • profile ?
    아...
    경로 설정을 이상하게 했네요
    감사합니다 드디어 되네용