●ffmpeg 활용) ● 비디오 스테이션, 트랜스코딩이 되지 않는 경우 - ffmpeg 커뮤니티용으로 파일 변경작업
♨ 카랜더 일정 :
2022년05월13일
컨텐츠 정보
- 5,247 조회
본문
● 비디오 스테이션, 트랜스코딩이 되지 않는 경우 - ffmpeg 커뮤니티용으로 파일 변경작업
및
강제적으로 ffmpeg로 mkv파일 720 mp4 비디오 변환작업
root@https11qkr:/usr/bin# ffmpeg
ffmpeg version 4.1.8 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8.5.0 (GCC)
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 --disable-stripping --enable-version3 --enable-encoders --enable-pthreads --disable-protocols --disable-protocol=rtp --enable-protocol=file --enable-protocol=pipe --disable-muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-ffplay --disable-ffprobe --disable-doc --disable-devices --disable-bzlib --disable-altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libmp3lame --disable-vaapi --disable-cuvid --disable-nvenc --disable-decoder=aac --disable-decoder=aac_fixed --disable-encoder=aac --disable-decoder=amrnb --disable-decoder=ac3 --disable-decoder=ac3_fixed --disable-encoder=zmbv --disable-encoder=dca --disable-decoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed --disable-encoder=eac3 --disable-decoder=eac3 --disable-encoder=truehd --disable-decoder=truehd --disable-encoder=hevc_vaapi --disable-decoder=hevc --disable-muxer=hevc --disable-demuxer=hevc --disable-parser=hevc --disable-bsf=hevc_mp4toannexb --x86asmexe=yasm --cc=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-wrap-gcc --enable-yasm --enable-libx264 --enable-encoder=libx264
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
root@https11qkr:/usr/bin# mv ffmpeg ffmpeg_4.1.8
root@https11qkr:/usr/bin# ln -sf /volume1/@appstore/ffmpeg/bin/ffmpeg ./ffmpeg
root@https11qkr:/usr/bin# ffmpeg
ffmpeg version 4.4.2 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 7.5.0 (GCC)
configuration: --target-os=linux --cross-prefix=/github/workspace/toolchain/syno-x64-7.0/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --prefix=/var/packages/ffmpeg/target --extra-cflags=-I/github/workspace/spk/ffmpeg/work-x64-7.0/install/var/packages/ffmpeg/target/include --extra-ldflags=-L/github/workspace/spk/ffmpeg/work-x64-7.0/install/var/packages/ffmpeg/target/lib --extra-libs='-lxml2 -ldl' --pkg-config=/usr/bin/pkg-config --ranlib=/github/workspace/toolchain/syno-x64-7.0/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ranlib --enable-cross-compile --enable-rpath --enable-pic --enable-shared --enable-gpl --enable-version3 --enable-fontconfig --enable-avresample --disable-debug --disable-static --disable-doc --extra-cflags=-DSYNO_VIDEOSTATION --extra-cflags=-fno-if-conversion --extra-cflags=-O3 --extra-cflags=-Wno-deprecated-declarations --enable-libxml2 --enable-demuxer=dash --enable-libfreetype --enable-libfribidi --enable-libopenjpeg --enable-libmp3lame --enable-libbluray --enable-libspeex --enable-libtheora --enable-libvorbis --enable-gnutls --enable-libopus --enable-libsoxr --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libzmq --enable-libzvbi --enable-libx264 --enable-libx265 --enable-libvpx --enable-libshine --enable-libdav1d --enable-librist --enable-libfdk-aac --enable-nonfree --enable-libaom --enable-libsvtav1 --enable-libsvthevc --arch=x86_64 --enable-vaapi --enable-libmfx --enable-libdrm
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
root@https11qkr:/usr/bin#
▶ 명령어 정리
#시놀로지 ffmpeg 로 이동
cd /usr/bin
#버전확인
ffmpeg
#이름변경보관
mv ffmpeg ffmpeg_4.1.8
# 커뮤니티용 ffmpeg 버전확인
/volume1/@appstore/ffmpeg/bin/ffmpeg
# 커뮤니티의ffmpeg로 마운트 변경
ln -sf /volume1/@appstore/ffmpeg/bin/ffmpeg ./ffmpeg
=================== 2줄 작업 =============
mv /usr/bin/ffmpeg /usr/bin/ffmpeg418
cp /volume1/@appstore/ffmpeg/bin/ffmpeg /usr/bin/ffmpeg
or
mv /usr/bin/ffmpeg /usr/bin/ffmpeg418
ln -sf /volume1/@appstore/ffmpeg/bin/ffmpeg /usr/bin/ffmpeg
============================
-s, --symbolic make symbolic links instead of hard links
출처: https://synology.tistory.com/47 [SYNOLOGY Manual]
=================
강제적으로 ffmpeg로 mkv파일 720 mp4 비디오 변환작업
============
nano video_auto_encoding_720p_mp4.sh
하여 아래 내용 복사 생성 ( 경로 변경)
chmod a+x video_auto_encoding_720p_mp4.sh
권한변경
./video_auto_encoding_720p_mp4.sh
root@https11qkr:/volume1/homes/shimss# cat video_auto_encoding_720p_mp4.sh
#!/bin/bash
#cd /var/services/homes/shimss
#bash ./video_auto_encoding.sh
#인코딩할 파일이 있는곳 경로
directory="/volume2/video/video_file/"
#인코딩한 파일을 저장할 경로
TRANSCODEPATH='/volume4/vol4/video_v4_encoding/'
echo
for file in $(ls $directory)
do
#인코딩 시작 알림
echo "\"$file\" 인코딩 시작."
#ffmpeg -i "$directory$file" -vcodec libx264 -acodec copy -b:a 192k -level 4.1 "$TRANSCODEPATH${file%.*}.mkv" </dev/null >>$TRANSCODEPATH${file%.*}.log 2>&1
# ok
# ffmpeg -i "$directory$file" -vf scale=1280:720 "$TRANSCODEPATH${file%.*}720p.mp4"
#
#ffmpeg -i "$directory$file" -vf scale=1280:720 "$TRANSCODEPATH${file%.*}_720p.mp4" </dev/null >>$TRANSCODEPATH${file%.*}_720p_mp4.log 2>&1
ffmpeg -i "$directory$file" -vf scale=1280:720 "$TRANSCODEPATH${file%.*}_tc_720p.mp4" </dev/null >>$TRANSCODEPATH${file%.*}_tc_720p_mp4.log 2>&1
#인코딩 종료 알림
echo "\"$file\" 인코딩 종료."
#원본파일 삭제(경우에 따라 생략해도 됩니다.)
#rm -r $directory$file
#echo "\"$file\" 삭제완료."
done
echo;
exit 0
#ls -lrt /volume4/vol4/
#ls -lrt /volume4/vol4/video_v4_encoding
ls -lrt $TRANSCODEPATH
==============
☞ https://11q.kr 에 등록된 자료 입니다. ♠ 정보찾아 공유 드리며 출처는 링크 참조 바랍니다♠
뷰PDF 1,2
office view
관련자료
-
첨부
댓글목록
등록된 댓글이 없습니다.