11.Nas_1


piwigo에서 동영상 mp4의 썸네일 만들기(만들기 실패)




컨텐츠 정보

  • 10,124 조회
  • 5 댓글
  • 0 추천
  • 목록

본문

piwigo에서 동영상 mp의 썸네일 만들기(만들기 실패) 하였습니다

기본 설치 플러그인

기본 : 
1) videojs : 기본작업 / 썸네일 만들기 플러그인 설치

2) localfiles editor : 초기 설정값 입력

3)jplayer

4) 시놀로지 패키지 센터 설정 커뮤티디  입력 ffmpeg가 나오게 하고 설치 // dsm6.1의 ds3615는 나오는데 ds3617는 나오지 않음

http://packages.synocommunity.com/

--------------

1) videojs : 기본작업 / 썸네일 만들기 플러그인 설치

3232235521_1O6WkBHS_22835dd7cba9c0b3c537292db11171e56ed2e1b2.png

videojs 환경설정

3232235521_vyPLY1JS_8657321666e5080efeddaae6a6e4f2da93fc66d6.png

videojs  플러그인 동기화 하기

3232235521_e4pKx9UO_d47a7f04a1031029be4a7572f731946b4e3502b2.png

설치 방법 확인 

3232235521_Oqf5oLGE_4f3747a2fa12657b73e255e2425b7e75569ade36.png

영상 10초 부분의 화면 썸네일 1개 생성 예 )

ffmpeg -i input.mp4 -ss 00:00:10 -vcodec png 

-vframes 1 thumbnail_%d.png


2) localfiles editor : 초기 설정값 입력 

3232235521_tR8DjOp9_e35c7dcb980e730b7b306069dc91b798ca1bf99e.png

<?php

//localfiles editor_save_config 20170501 shimss

$conf['upload_form_all_types'] = true;

$conf['sync_chars_regex'] = '/[\x{1100}-\x{11FF}\x{3130}-\x{318F}\x{AC00}-\x{D7AF}0-9a-zA-Z]+/u';

$library = $conf['graphics_library']='gd';

//$conf['show_exif'] = true; 

$conf['show_exif_fields'] = array( 

  'Make', 

  'Model', 

  'ExifVersion', 

  'Software', 

  'DateTimeOriginal', 

  'FNumber', 

  'ExposureBiasValue', 

  'FILE;FileSize', 

  'ExposureTime', 

  'Flash', 

  'ISOSpeedRatings', 

  'FocalLength', 

  'FocalLengthIn35mmFilm', 

  'WhiteBalance', 

  'ExposureMode', 

  'MeteringMode', 

  'ExposureProgram', 

  'LightSource', 

  'Contrast', 

  'Saturation', 

  'Sharpness', 

  'bitrate', 

  'channel', 

  'date_creation', 

  'display_aspect_ratio', 

  'duration', 

  'filesize', 

  'format', 

  'formatprofile', 

  'codecid', 

  'frame_rate', 

  'latitude', 

  'longitude', 

  'make', 

  'model', 

  'playtime_seconds', 

  'sampling_rate', 

  'type', 

  'resolution', 

  'rotation', 

  ); 


?>


4) 시놀로지 패키지 센터 설정 커뮤티디  입력 ffmpeg가 나오게 하고 설치 // dsm6.1의 ds3615는 나오는데 ds3617는 나오지 않음//

http://packages.synocommunity.com/

3232235521_9oVLY2cB_2772d04fd100dcdf8f4d2e5a6aac2363060c5f44.png


3232235521_ZkhbvT3g_64e4894e6c57301ab90537e0b0931c80ab679ab1.png

썸네일이 만들어지지 않는다,.,.....무엇이 문제인가요

3232235521_N0X6iozg_63da6aed3bfe5c7da880475bd2b08f08d255ce4e.png


>>> putty.exe에서도 에러

3232235521_yaqMLeE1_9e848383ace2ab041ca90600010c681d4a9741ee.png

root@ds3615_11qkr:/volume2/piwigo# ffmpeg -y -ss 5 -i "./galleries/file_uploader_free/video/ufc20140920.mp4" -vcodec png -vframes 1 -an -f rawvideo -y "./galleries/file_uploader_free/video/pwg_representative/ufc20140920.png"

ffmpeg version 2.7.1 Copyright (c) 2000-2015 the FFmpeg developers

  built with gcc 4.9.3 (crosstool-NG 1.20.0) 20150311 (prerelease)

  configuration: --prefix=/usr --incdir='${prefix}/include/ffmpeg' --arch=i686 --target-os=linux --cross-prefix=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --enable-cross-compile --enable-optimizations --enable-pic --enable-gpl --enable-shared --disable-static --enable-version3 --enable-nonfree --enable-libfaac --enable-encoders --enable-pthreads --disable-bzlib --disable-protocol=rtp --disable-muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-ffserver --disable-ffplay --disable-devices --disable-bzlib --disable-altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libmp3lame --disable-vaapi --disable-decoder=amrnb --disable-encoder=zmbv --disable-encoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed --disable-encoder=eac3 --disable-decoder=dca --disable-decoder=eac3 --disable-decoder=truehd --cc=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ccache-gcc --enable-yasm --enable-libx264 --enable-encoder=libx264

  libavutil      54. 27.100 / 54. 27.100

  libavcodec     56. 41.100 / 56. 41.100

  libavformat    56. 36.100 / 56. 36.100

  libavdevice    56.  4.100 / 56.  4.100

  libavfilter     5. 16.101 /  5. 16.101

  libswscale      3.  1.101 /  3.  1.101

  libswresample   1.  2.100 /  1.  2.100

  libpostproc    53.  3.100 / 53.  3.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './galleries/file_uploader_free/video/ufc20140920.mp4':

  Metadata:

    major_brand     : mp42

    minor_version   : 0

    compatible_brands: mp41isom

    creation_time   : 2014-09-20 14:54:05

  Duration: 00:21:33.76, start: 0.000000, bitrate: 7875 kb/s

    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 7698 kb/s, 29.97 fps, 29.97 tbr, 29970 tbn, 59.94 tbc (default)

    Metadata:

      creation_time   : 2014-09-20 14:54:05

      handler_name    : VideoHandler

      encoder         : AVC Coding

    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 174 kb/s (default)

    Metadata:

      creation_time   : 2014-09-20 14:54:05

      handler_name    : SoundHandler

Output #0, rawvideo, to './galleries/file_uploader_free/video/pwg_representative/ufc20140920.png':

  Metadata:

    major_brand     : mp42

    minor_version   : 0

    compatible_brands: mp41isom

    Stream #0:0(und): Video: png, rgb24, 1280x720, q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)

    Metadata:

      creation_time   : 2014-09-20 14:54:05

      handler_name    : VideoHandler

      encoder         : Lavc56.41.100 png

Stream mapping:

  Stream #0:0 -> #0:0 (h264 (native) -> png (native))

Error while opening decoder for input stream #0:0 : Operation not permitted

root@ds3615_11qkr:/volume2/piwigo#

=================
에러.....

>\r\n>\r\n>\r\n♠ 출처는 링크 참조 바랍니다. https://11q.kr ♠ \r\n

뷰PDF add1,add2



관련자료

댓글 5

shimss11q님의 댓글

ffmpeg -i "spl.mp4" -ss 00:00:10 -vcodec png -vframes 1 "spl.png"\r\nffmpeg -i spl.mp4 -ss 00:00:10 -vcodec jpg -vframes 1 spl.jpg\r\n...실패

shimss11q님의 댓글

동영상 썸네일 - FFMpeg
http://paulownia.egloos.com/3090816FFMpeg-PHP
동영상 썸네일 추출Linux 환경에서 php에 ffmpeg 모듈을 설치하여 동영상에서 썸네일(thumbnail)을 추출하는 방법입니다.
제가 테스트한 환경은 SULinux 1.5 Server 에서 APM을 설치하여 테스트 하였습니다.
그리고 제가 필요한 솔루션은 ffmpeg-php 를 이용하여
.wmv 파일을 이미지(image)로 변환하는 것이었기 때문에다른 변환은 테스트 해보지 않았음을 미리 명시합니다.
먼저, FFMPEG 에 가서 [Download and SVN] 페이지로 가서 full checkout 을 다운받으세요.
이 파일은 FFMpeg의 구버전 또는 기본 베이스 파일이라고 생각하시면 될 것 같습니다.
그 다음엔 SourceForge에 가서 FFMpeg 최신 파일을 다운받습니다.
그 후에 두 파일을 /usr/local/폴더에 복사하여 압축을 풀어줍니다.
압축풀기의 경우 확장자가 대부분 tar, tbz2, bz 로 나옵니다.
tar -xvjf xxx.tartar -xvjpf xxx.tbz2tar -xvzf xxx.bz보통 tar
 옵션을 보면 x는 압축풀기, v는 압축푸는거 보여주기, f의 경우 물어보지 않기 정도 일까요?자세히는 모르겠네요.
 ㅎㅎ압축풀기가 끝나면 먼저 구버전을 설치합니다.구버전 폴더 내에서.
 /configure --enable-sharedmakemake install순으로 명령어를 내려줍니다.
 두번째로 최신 파일의 폴더 내에서/usr/local/php/bin/phpize여기서 경로는 다를 수 있습니다.
 중요한건 phpize 를 실행한다는 겁니다.현재 폴더 내에서 phpize를 실행해주세요.
 ./configure --enable-shared --with-php-config=/usr/local/php/bin/php-config
 여기서 뒤에 --with~ 부분은 실행과정에서 에러가 나오길래 제가 추가한 부분입니다.
 자세히 보면 그냥 php-config 파일의 경로를 적어주었을 뿐입니다.make clean && makemake clean 명령어는 글쎄요.
 자세히는 모르겠지만,
 이전 make 내용을 없애는 걸까요?make install순으로 명령어를 다 내리고 나면 php 의 extension 폴더 안에 ffmpeg.so 파일이 생성됩니다
 .원래 정상적으로 하면 여기까지만 하면 완료됩니다.
 그러나 저같은 경우 ffmpeg test 파일을 웹페이지로 봤을경우
 ffmpeg.so 파일을 읽어들이지 못했습니다.그래서 저는 ffmpeg.so 파일만 복사하여
 소스파일이 있는 폴더내에 같이 놔두고,소스코드 내에 ffmpeg.so 파일을 읽어오는 코드를 넣어서 사용했더니,
 성공적으로 변환이 되었습니다.FFMpeg 설치소스(구버전 및 현재 최신 파일)
 및ffmpeg.so 파일을 읽어와서 테스트(.wmv -> .jpg)하는 소스코드를 첨부합니다.부디 성공하시기를...
 <-- 영어 솔루션 보시느라 고생하셨습니다.
 ;ㅁ;#1. ffmpeg-checkout-snapshot.tar.tar#2. ffmpeg-php-0.5.0.tbz2#3. ffmpeg_process.phpps.
 눈깔 빠지는 줄 알았습니다. OTL

shimss11q님의 댓글

synology 나스의 경우에 ffmpeg 가 설치 되어 있어서 별다른 셋팅은 필요없는거 같습니다. (단 제어판>웹서비스>PHP설정에서 EXEC옵션을 끄셔야 가능합니다. *중요*) \r\n삽질만 엄청 한거 같네요 ;;;;;;; \r\n\r\ndata/게시판이름/파일이름.mp4.jpg 로 저장이 되네요.. \r\n\r\n이제 썸네일은 어떻게 연개 시킬껀지 고민을 ;;;

shimss11q님의 댓글

라즈베리 파이(Ubuntu)에 설치된 piwigo에서 동영상 업로드(upload) 와 재생하기
http://www.spacek.xyz/mle/?p=386

shimss11q님의 댓글

<?php
 
/* locfiledit_newfile */
 
$conf['upload_form_all_types'] = true;
$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';
 
 
$conf['show_exif'] = true;
$conf['show_exif_fields'] = array(
  'Make',
  'Model',
  'ExifVersion',
  'Software',
  'DateTimeOriginal',
  'FNumber',
  'ExposureBiasValue',
  'FILE;FileSize',
  'ExposureTime',
  'Flash',
  'ISOSpeedRatings',
  'FocalLength',
  'FocalLengthIn35mmFilm',
  'WhiteBalance',
  'ExposureMode',
  'MeteringMode',
  'ExposureProgram',
  'LightSource',
  'Contrast',
  'Saturation',
  'Sharpness',
  'bitrate',
  'channel',
  'date_creation',
  'display_aspect_ratio',
  'duration',
  'filesize',
  'format',
  'formatprofile',
  'codecid',
  'frame_rate',
  'latitude',
  'longitude',
  'make',
  'model',
  'playtime_seconds',
  'sampling_rate',
  'type',
  'resolution',
  'rotation',
  );
 
 
?>


전체 1,749 / 54 페이지
전체 1,749 / 54 페이지



♥간단_메모글♥


최근글


새댓글



PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
▶ 2024-05-10 03:16:25

오늘의 홈 현황


  • 현재 접속자♨ 279 명
  • 오늘 가입자※ 0 명
  • 어제 가입자※ 6 명
  • 주간 가입자※ 14 명
  • 오늘 방문자 827 명
  • 어제 방문자 1,918 명
  • 최대 방문자 13,042 명
  • 전체 방문자 4,314,309 명
  • 전체 게시물※ 8,561 개
  • 전체 댓글수※ 24,586 개
  • 전체 회원수 10,959 명

QR코드


☞ QR코드 스캔은 kakao앱 자체 QR코드

알림 0








최신글↑