Programming2019. 8. 20. 03:03

아래 두가지 방법이 가장 간단한듯. 아래글중 10초씩 자르는것과 붙이는 것, 앞에 Title자동으로 넣는것까지 3가지만 있으면 될듯.

 

*concat demuxer

$ cat mylist.txt
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'

$ ffmpeg -f concat -i mylist.txt -c copy output.mp4
$ ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

Note: -safe 0 is not required if the paths are relative but it seems required.

 

*concat protocol

ffmpeg -i "concat:input1|input2" -codec copy output.mkv

 

https://superuser.com/questions/1059245/ffmpeg-join-two-mp4-files-with-ffmpeg-on-command-line

 

ffmpeg join two mp4 files with ffmpeg on command line

I can successfully join multiple files using the following command: ffmpeg -f concat -i input.txt -codec copy output.mp4 The only problem with this command is that you need to read the filepaths ...

superuser.com

https://stackoverflow.com/questions/7333232/how-to-concatenate-two-mp4-files-using-ffmpeg

 

How to concatenate two MP4 files using FFmpeg?

I'm trying to concatenate two mp4 files using ffmpeg. I need this to be an automatic process hence why I chose ffmpeg. I'm converting the two files into .ts files and then concatenating them and ...

stackoverflow.com

 

Posted by 쁘레드
Programming2019. 8. 13. 07:06

핸드폰으로 비디오 찍어서 후딱 편집해서 공유할때 좋은 tip1,

FFMPEG으로 자동으로 10초씩 짤라놓는 방법

ffmpeg -loglevel quiet -n -r 60 -ss 2 -t 10 -i 0613/20190613_000.mp4 test_10_sec.mp4
ffmpeg -loglevel quiet -n -r 60 -ss 2 -t 10 -c:v h264 -i 0613/20190613_000.mp4 test_10_sec2.mp4

ffmpeg -loglevel quiet -n -ss 2 -t 10 -i 0613/20190613_000.mp4 -c:v h264 test_10_sec3.mp4

 

h264 codec이 NVidia Card를 이용하지 않으면 최신 드라이버로 update하고 FFMPEG을 다시 빌드하면 저절로 nvenc_h264 codec을 선택하게 됨. 엄청 빠름.

 

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

-loglevel 
-n : never overwrite output file
-i : input file
-r : frame rate
-vcodec : video codec
-s : frame size WxH
-ss : start offset 00:00:30
-t : time duration 00:00:05

 

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

$ ffmpeg -hwaccels
ffmpeg version N-94455-g01994c93db Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Ubuntu 8.3.0-6ubuntu1~18.10.1)
  configuration: 
  libavutil      56. 33.100 / 56. 33.100
  libavcodec     58. 55.100 / 58. 55.100
  libavformat    58. 30.100 / 58. 30.100
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 58.100 /  7. 58.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
Hardware acceleration methods:
vdpau
cuda
vaapi
cuvid

.....

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

$ ffmpeg -codecs
ffmpeg version N-94455-g01994c93db Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Ubuntu 8.3.0-6ubuntu1~18.10.1)
  configuration: 
  libavutil      56. 33.100 / 56. 33.100
  libavcodec     58. 55.100 / 58. 55.100
  libavformat    58. 30.100 / 58. 30.100
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 58.100 /  7. 58.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
Codecs:
 D..... = Decoding supported
 .E.... = Encoding supported
 ..V... = Video codec
 ..A... = Audio codec
 ..S... = Subtitle codec
 ...I.. = Intra frame-only codec
 ....L. = Lossy compression
 .....S = Lossless compression
 -------

 D.V.L. h263i                Intel H.263
 DEV.L. h263p                H.263+ / H.263-1998 / H.263 version 2
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m h264_cuvid ) (encoders: h264_nvenc h264_v4l2m2m h264_vaapi nvenc nvenc_h264 )
 D.VIL. hap                  Vidvox Hap
 DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_v4l2m2m hevc_cuvid ) (encoders: nvenc_hevc hevc_nvenc hevc_v4l2m2m hevc_vaapi )

 D.V.L. msmpeg4v1            MPEG-4 part 2 Microsoft variant version 1
 DEV.L. msmpeg4v2            MPEG-4 part 2 Microsoft variant version 2
 DEV.L. msmpeg4v3            MPEG-4 part 2 Microsoft variant version 3 (decoders: msmpeg4 ) (encoders: msmpeg4 )

.....

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

$ ffmpeg -encoders
ffmpeg version N-94455-g01994c93db Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Ubuntu 8.3.0-6ubuntu1~18.10.1)
  configuration: 
  libavutil      56. 33.100 / 56. 33.100
  libavcodec     58. 55.100 / 58. 55.100
  libavformat    58. 30.100 / 58. 30.100
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 58.100 /  7. 58.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
Encoders:
 V..... = Video
 A..... = Audio
 S..... = Subtitle
 .F.... = Frame-level multithreading
 ..S... = Slice-level multithreading
 ...X.. = Codec is experimental
 ....B. = Supports draw_horiz_band
 .....D = Supports direct rendering method 1

....

 V..... h263                 H.263 / H.263-1996
 V..... h263_v4l2m2m         V4L2 mem2mem H.263 encoder wrapper (codec h263)
 V.S... h263p                H.263+ / H.263-1998 / H.263 version 2
 V..... h264_nvenc           NVIDIA NVENC H.264 encoder (codec h264)
 V..... h264_v4l2m2m         V4L2 mem2mem H.264 encoder wrapper (codec h264)
 V..... h264_vaapi           H.264/AVC (VAAPI) (codec h264)
 V..... nvenc                NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_h264           NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_hevc           NVIDIA NVENC hevc encoder (codec hevc)
 V..... hevc_nvenc           NVIDIA NVENC hevc encoder (codec hevc)
 V..... hevc_v4l2m2m         V4L2 mem2mem HEVC encoder wrapper (codec hevc)
 V..... hevc_vaapi           H.265/HEVC (VAAPI) (codec hevc)

.....

.....

FFMPEG으로 Rotate하기

# rotate video -filter:v transpose=1 or 2. 1=90 cw, 2=90 ccw
# -filter:v transpose=1

'Programming' 카테고리의 다른 글

Ubuntu upgrade 18.10 -> 19.04  (0) 2019.08.15
핸드폰 비디오 rotate하기  (0) 2019.08.14
linux kernel build on ubuntu  (0) 2019.03.07
MinGW-w64 install  (0) 2017.01.22
github에서 배우는 machine learning, deep learning  (0) 2017.01.07
Posted by 쁘레드
IT이야기2015. 6. 5. 02:16

IRobot Roomba(룸바)로 청소만 시켜도 가정의 청소가 엄청 쉬워지는데, 사람이 하는 이상적인 일을 로봇이 급속도로 대체해나가는 것은 기정사실이지요. 가정보다는 비용에 민감한 공장같은 곳은 이미 많이 변하고 있고 앞으로도 더 변하겠지요.


한국이 Robot Density가 제일 높네요. 노동다 10,000명당 437대나 됩니다. 앞으로 1000대를 후쩍넘기면서 빠르게 노동직업을 대체해 나가겠지요. 빨리 많은 인원들이 하이텍쪽으로 옮겨져야 할텐데, 그렇지 않아서 답답하네요. 아직까지 땅이나 파서 경기를 띄우려고 삽질해대고.

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


A new generation of robots is on the way—smarter, more mobile, more collaborative and more adaptable. They promise to bring major changes to the factory floor, as well as potentially to the global competitive landscape.

Robots deployed in manufacturing today tend to be large, dangerous to anyone who strays too close to their whirling arms, and limited to one task, like welding, painting or hoisting heavy parts.

The latest models entering factories and being developed in labs are a different breed. They can work alongside humans without endangering them and help assemble all sorts of objects, as large as aircraft engines and as small and delicate as smartphones. Soon, some should be easy enough to program and deploy that they no longer will need expert overseers.

http://www.wsj.com/articles/meet-the-new-generation-of-robots-for-manufacturing-1433300884?mod=trending_now_2






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

ABB Robot


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

Amazon warehouse robots



Posted by 쁘레드