-ss와 -t 조합으로 가능한데, -to 로는 잘안되서 쓰는법을 모르겠다.

-codec copy는 코덱변경없이 단순하게 원본을 자르는거라 속도도 빠르고 화질 저하도 없게 하는 옵션이다.

$ ./ffmpeg -ss 00:39:05 -i input.mkv -codec copy -t 00:03:03 out.mkv

[링크 : https://superuser.com/questions/742434/use-ffmpeg-to-cut-mkv-file]

[링크 : https://trac.ffmpeg.org/wiki/Seeking]


$ ffmpeg -ss 00:01:00 -to 00:02:00  -i input.mp4 -c copy output.mp4

-i: This specifies the input file. In that case, it is (input.mp4).
-ss: Used with -i, this seeks in the input file (input.mp4) to position.
00:01:00: This is the time your trimmed video will start with.
-to: This specifies duration from start (00:01:40) to end (00:02:12).
00:02:00: This is the time your trimmed video will end with.
-c copy: This is an option to trim via stream copy. (NB: Very fast)

[링크 : https://stackoverflow.com/questions/18444194/cutting-the-videos-based-on-start-and-end-time-using-ffmpeg]


[링크 : https://hi098123.tistory.com/141]

Posted by 구차니

댓글을 달아 주세요


ffmpeg -framerate 30 -i Image%08d.jpg -crf 23 Output.mp4

[링크 : https://stackoverflow.com/questions/3002601/converting-avi-frames-to-jpgs-on-linux]


ffmpeg -i in.avi -vsync cfr -r 1 -f image2 'img-%03d.jpeg'

[링크 : https://ffmpeg.org/ffmpeg-formats.html#Examples-8]

'프로그램 사용 > ffmpeg & ffserver' 카테고리의 다른 글

ffmpeg을 이용한 원하는 동영상 구간 자르기  (0) 2022.07.28
mp4 복구 시도  (0) 2022.01.24
ffmpeg을 이용한 rgb565 to bmp  (0) 2021.10.18
ffmpeg 재생 어렵다 -_ㅠ  (0) 2021.02.22
ffmpeg fbdev  (0) 2021.02.09
Posted by 구차니

댓글을 달아 주세요

h.264 코덱으로 된 녀석이라 데이터 부분만 빼내서 ffmpeg 거치면 재생이 가능할줄 알았는데 무리인가?


[링크 : https://video.stackexchange.com/questions/29073]

[링크 : https://codecpack.co/download/recover-mp4.html]

[링크 : https://stackoverflow.com/questions/19300350]




복구 성공!


동일 기기에서 촬영된 정상 동영상과 복구할 동영상이 필요함

1. 정상 동영상에서 부터 무언가를 추출

C:\> recover_mp4.exe good.mp4 --analyze
/// 중략
Now run the following command to start recovering:
recover_mp4.exe corrupted_file result.h264 --noaudio --ext

Then use ffmpeg to mux the final file:
ffmpeg.exe -r 12.097 -i result.h264 -c:v copy result.mp4


2. 비정상 동영상으로 부터 h264 만 추출

위에서 알려준 옵션대로 처리해야 복구가 진행된다.

C:\> recover_mp4.exe corrupted_file result.h264 --noaudio --ext
// 중략
skip: 0x001C02C5 [0x       6] ???           {00 00 00 02 09 F0}
H264: 0x001C02CB [0x    15CA] -> 0x  1BF903 {41 9B A0 14} P frame
H264 non-IDR NAL unit size: Min 0x4, Avg 0x1289, Max 0x366C
'result.h264' created, size 1838797 (99.864%)


3. 복구 데이터를 이용해서(아마도 h.264 스트림?) mp4로 변환

-r 뒤의 숫자는 framerate 니까 굳이 안 넣어 주면 원본의 속도로 복구 된다. (안되면 넣어주는게 좋을 듯)

C:\> ffmpeg.exe -r 30 -i result.h264 -c:v copy recovered.mp4
Input #0, h264, from 'result.h264':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 800x480, 25 fps, 25 tbr, 1200k tbn
Output #0, mp4, to 'recovered.mp4':
    encoder         : Lavf59.16.100
  Stream #0:0: Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(progressive), 800x480, q=2-31, 25 fps, 25 tbr, 15360 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0000020bce548780] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame=  363 fps=0.0 q=-1.0 Lsize=    1798kB time=00:00:12.06 bitrate=1220.7kbits/s speed=2.16e+03x
video:1796kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.130085%

[링크 : https://blog.naver.com/winsweet/222340783544]

[링크 : http://slydiman.me/eng/mmedia/recover_mp4.htm]

[링크 : https://restore.media/blog/how-to-fix-corrupted-mp4-files]

Posted by 구차니

댓글을 달아 주세요

ffmpeg 옵션 순서가 은근히 까다로운가 보네 -_-

아래처럼 입력하면 이미지가 깨져서 변환된다.

$ ffmpeg -vcodec rawvideo -s 480x800 -f rawvideo -i fb1.cap_date -pix_fmt rgb565 -vf "transpose=2" output_1.png


이렇게 입력 코덱, 입력 비디오 포맷, 포맷에 따른 비디오 크기, 입력 파일 명 순서로 받고

출력시 회전, 출력 파일 명으로 넣어주어야 정상적으로 되는 듯.

$ ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb565 -s 480x800 -i fb1.cap_date -vf "transpose=2" output_1.png



// List available formats for ffmpeg
ffmpeg -pix_fmts

// Convert raw rgb565 image to png
ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb565 -s 1024x768 -i freescale_1024x768.raw -f image2 -vcodec png screen.png

[링크 : https://github-wiki-see.page/m/rogeriorps/ipu-examples/wiki/Converting-image-format-on-PC]


2번은 counter니까 반시계 90도(-=270도 회전)

ffmpeg -i in.mov -vf "transpose=1" out.mov
For the transpose parameter you can pass:

0 = 90CounterCLockwise and Vertical Flip (default)
1 = 90Clockwise
2 = 90CounterClockwise
3 = 90Clockwise and Vertical Flip

Use -vf "transpose=2,transpose=2" for 180 degrees.

[링크 : https://stackoverflow.com/questions/3937387/rotating-videos-with-ffmpeg

'프로그램 사용 > ffmpeg & ffserver' 카테고리의 다른 글

ffmpeg을 이용하여 동영상을 프레임 별로 jpeg 로 변환하기  (0) 2022.04.15
mp4 복구 시도  (0) 2022.01.24
ffmpeg 재생 어렵다 -_ㅠ  (0) 2021.02.22
ffmpeg fbdev  (0) 2021.02.09
ffmpeg build  (0) 2020.11.25
Posted by 구차니

댓글을 달아 주세요

재생하려니 안되고...

Pixel format yuv420p is not supported, use bgr24


pix_fmt 로 바꾸려고 하니 안되네.. -_-

Incompatible pixel format 'bgr24' for codec 'mpeg4', auto-selecting format 'yuv420p'



-pix_fmts           show available pixel formats
-sample_fmts        show available audio sample formats
-f fmt              force format




하드웨어 가속을 못 받아서 그런가 무지 힘들어 하네


$ ffmpeg -re -i INPUT -c:v rawvideo -pix_fmt bgra -f fbdev /dev/fb0

[swscaler @ 0x2020050] No accelerated colorspace conversion found from yuv420p to rgb24.

[링크 : https://ffmpeg.org/ffmpeg-devices.html#Examples-12]

'프로그램 사용 > ffmpeg & ffserver' 카테고리의 다른 글

mp4 복구 시도  (0) 2022.01.24
ffmpeg을 이용한 rgb565 to bmp  (0) 2021.10.18
ffmpeg fbdev  (0) 2021.02.09
ffmpeg build  (0) 2020.11.25
webm을 mp3로 변환하기  (0) 2020.04.01
Posted by 구차니

댓글을 달아 주세요



[링크 : https://unix.stackexchange.com/questions/342815/how-to-send-ffmpeg-output-to-framebuffer]


Pixel formats:
I.... = Supported Input  format for conversion
.O... = Supported Output format for conversion
..H.. = Hardware accelerated format
...P. = Paletted format
....B = Bitstream format
IO... yuv420p                3            12
IO... yuyv422                3            16
IO... rgb24                  3            24
IO... bgr24                  3            24
IO... yuv422p                3            16
IO... yuv444p                3            24
IO... yuv410p                3             9
IO... yuv411p                3            12
IO... gray                   1             8

[링크 : https://ffmpeg.org/ffmpeg-devices.html]

'프로그램 사용 > ffmpeg & ffserver' 카테고리의 다른 글

ffmpeg을 이용한 rgb565 to bmp  (0) 2021.10.18
ffmpeg 재생 어렵다 -_ㅠ  (0) 2021.02.22
ffmpeg build  (0) 2020.11.25
webm을 mp3로 변환하기  (0) 2020.04.01
ffmpeg h264 encoding 옵션  (0) 2019.02.22
Posted by 구차니

댓글을 달아 주세요


~/src/ffmpeg$ ./configure 
nasm/yasm not found or too old. Use --disable-x86asm for a crippled build.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
minimonk@mini2760p:~/src/ffmpeg$ nasm

Command 'nasm' not found, but can be installed with:

sudo apt install nasm


$ ./configure 

install prefix            /usr/local
source path               .
C compiler                gcc
C library                 glibc
ARCH                      x86 (generic)
big-endian                no
runtime cpu detection     yes
standalone assembly       yes
x86 assembler             nasm
MMX enabled               yes
MMXEXT enabled            yes
3DNow! enabled            yes
3DNow! extended enabled   yes
SSE enabled               yes
SSSE3 enabled             yes
AESNI enabled             yes
AVX enabled               yes
AVX2 enabled              yes
AVX-512 enabled           yes
XOP enabled               yes
FMA3 enabled              yes
FMA4 enabled              yes
i686 features enabled     yes
CMOV is fast              yes
EBX available             yes
EBP available             yes
debug symbols             yes
strip symbols             yes
optimize for size         no
optimizations             yes
static                    yes
shared                    no
postprocessing support    no
network support           yes
threading support         pthreads
safe bitstream reader     yes
texi2html enabled         no
perl enabled              yes
pod2man enabled           yes
makeinfo enabled          no
makeinfo supports HTML    no

External libraries:
iconv                   libxcb_shape            libxcb_xfixes
libxcb                  libxcb_shm              zlib

External libraries providing hardware acceleration:

avcodec                 avformat                swscale
avdevice                avutil
avfilter                swresample

ffmpeg                  ffprobe

Enabled decoders:
aac                     fic                     pfm
aac_fixed               fits                    pgm
aac_latm                flac                    pgmyuv
aasc                    flashsv                 pgssub
ac3                     flashsv2                pgx
ac3_fixed               flic                    photocd
acelp_kelvin            flv                     pictor
adpcm_4xm               fmvc                    pixlet
adpcm_adx               fourxm                  pjs
adpcm_afc               fraps                   png
adpcm_agm               frwu                    ppm
adpcm_aica              g2m                     prores
adpcm_argo              g723_1                  prosumer
adpcm_ct                g729                    psd
adpcm_dtk               gdv                     ptx
adpcm_ea                gif                     qcelp
adpcm_ea_maxis_xa       gremlin_dpcm            qdm2
adpcm_ea_r1             gsm                     qdmc
adpcm_ea_r2             gsm_ms                  qdraw
adpcm_ea_r3             h261                    qpeg
adpcm_ea_xas            h263                    qtrle
adpcm_g722              h263_v4l2m2m            r10k
adpcm_g726              h263i                   r210
adpcm_g726le            h263p                   ra_144
adpcm_ima_alp           h264                    ra_288
adpcm_ima_amv           h264_v4l2m2m            ralf
adpcm_ima_apc           hap                     rasc
adpcm_ima_apm           hca                     rawvideo
adpcm_ima_cunning       hcom                    realtext
adpcm_ima_dat4          hevc                    rl2
adpcm_ima_dk3           hevc_v4l2m2m            roq
adpcm_ima_dk4           hnm4_video              roq_dpcm
adpcm_ima_ea_eacs       hq_hqa                  rpza
adpcm_ima_ea_sead       hqx                     rscc
adpcm_ima_iss           huffyuv                 rv10
adpcm_ima_moflex        hymt                    rv20
adpcm_ima_mtf           iac                     rv30
adpcm_ima_oki           idcin                   rv40
adpcm_ima_qt            idf                     s302m
adpcm_ima_rad           iff_ilbm                sami
adpcm_ima_smjpeg        ilbc                    sanm
adpcm_ima_ssi           imc                     sbc
adpcm_ima_wav           imm4                    scpr
adpcm_ima_ws            imm5                    screenpresso
adpcm_ms                indeo2                  sdx2_dpcm
adpcm_mtaf              indeo3                  sgi
adpcm_psx               indeo4                  sgirle
adpcm_sbpro_2           indeo5                  sheervideo
adpcm_sbpro_3           interplay_acm           shorten
adpcm_sbpro_4           interplay_dpcm          sipr
adpcm_swf               interplay_video         siren
adpcm_thp               ipu                     smackaud
adpcm_thp_le            jacosub                 smacker
adpcm_vima              jpeg2000                smc
adpcm_xa                jpegls                  smvjpeg
adpcm_yamaha            jv                      snow
adpcm_zork              kgv1                    sol_dpcm
agm                     kmvc                    sonic
aic                     lagarith                sp5x
alac                    loco                    speedhq
alias_pix               lscr                    srgc
als                     m101                    srt
amrnb                   mace3                   ssa
amrwb                   mace6                   stl
amv                     magicyuv                subrip
anm                     mdec                    subviewer
ansi                    metasound               subviewer1
ape                     microdvd                sunrast
apng                    mimic                   svq1
aptx                    mjpeg                   svq3
aptx_hd                 mjpegb                  tak
arbc                    mlp                     targa
argo                    mmvideo                 targa_y216
ass                     mobiclip                tdsc
asv1                    motionpixels            text
asv2                    movtext                 theora
atrac1                  mp1                     thp
atrac3                  mp1float                tiertexseqvideo
atrac3al                mp2                     tiff
atrac3p                 mp2float                tmv
atrac3pal               mp3                     truehd
atrac9                  mp3adu                  truemotion1
aura                    mp3adufloat             truemotion2
aura2                   mp3float                truemotion2rt
av1                     mp3on4                  truespeech
avrn                    mp3on4float             tscc
avrp                    mpc7                    tscc2
avs                     mpc8                    tta
avui                    mpeg1_v4l2m2m           twinvq
ayuv                    mpeg1video              txd
bethsoftvid             mpeg2_v4l2m2m           ulti
bfi                     mpeg2video              utvideo
bink                    mpeg4                   v210
binkaudio_dct           mpeg4_v4l2m2m           v210x
binkaudio_rdft          mpegvideo               v308
bintext                 mpl2                    v408
bitpacked               msa1                    v410
bmp                     mscc                    vb
bmv_audio               msmpeg4v1               vble
bmv_video               msmpeg4v2               vc1
brender_pix             msmpeg4v3               vc1_v4l2m2m
c93                     msrle                   vc1image
cavs                    mss1                    vcr1
ccaption                mss2                    vmdaudio
cdgraphics              msvideo1                vmdvideo
cdtoons                 mszh                    vmnc
cdxl                    mts2                    vorbis
cfhd                    mv30                    vp3
cinepak                 mvc1                    vp4
clearvideo              mvc2                    vp5
cljr                    mvdv                    vp6
cllc                    mvha                    vp6a
comfortnoise            mwsc                    vp6f
cook                    mxpeg                   vp7
cpia                    nellymoser              vp8
cri                     notchlc                 vp8_v4l2m2m
cscd                    nuv                     vp9
cyuv                    on2avc                  vp9_v4l2m2m
dca                     opus                    vplayer
dds                     paf_audio               vqa
derf_dpcm               paf_video               wavpack
dfa                     pam                     wcmv
dirac                   pbm                     webp
dnxhd                   pcm_alaw                webvtt
dolby_e                 pcm_bluray              wmalossless
dpx                     pcm_dvd                 wmapro
dsd_lsbf                pcm_f16le               wmav1
dsd_lsbf_planar         pcm_f24le               wmav2
dsd_msbf                pcm_f32be               wmavoice
dsd_msbf_planar         pcm_f32le               wmv1
dsicinaudio             pcm_f64be               wmv2
dsicinvideo             pcm_f64le               wmv3
dss_sp                  pcm_lxf                 wmv3image
dst                     pcm_mulaw               wnv1
dvaudio                 pcm_s16be               wrapped_avframe
dvbsub                  pcm_s16be_planar        ws_snd1
dvdsub                  pcm_s16le               xan_dpcm
dvvideo                 pcm_s16le_planar        xan_wc3
dxa                     pcm_s24be               xan_wc4
dxtory                  pcm_s24daud             xbin
dxv                     pcm_s24le               xbm
eac3                    pcm_s24le_planar        xface
eacmv                   pcm_s32be               xl
eamad                   pcm_s32le               xma1
eatgq                   pcm_s32le_planar        xma2
eatgv                   pcm_s64be               xpm
eatqi                   pcm_s64le               xsub
eightbps                pcm_s8                  xwd
eightsvx_exp            pcm_s8_planar           y41p
eightsvx_fib            pcm_u16be               ylc
escape124               pcm_u16le               yop
escape130               pcm_u24be               yuv4
evrc                    pcm_u24le               zero12v
exr                     pcm_u32be               zerocodec
fastaudio               pcm_u32le               zlib
ffv1                    pcm_u8                  zmbv
ffvhuff                 pcm_vidc
ffwavesynth             pcx

Enabled encoders:
a64multi                h264_v4l2m2m            png
a64multi5               hevc_v4l2m2m            ppm
aac                     huffyuv                 prores
ac3                     jpeg2000                prores_aw
ac3_fixed               jpegls                  prores_ks
adpcm_adx               ljpeg                   qtrle
adpcm_argo              magicyuv                r10k
adpcm_g722              mjpeg                   r210
adpcm_g726              mlp                     ra_144
adpcm_g726le            movtext                 rawvideo
adpcm_ima_alp           mp2                     roq
adpcm_ima_amv           mp2fixed                roq_dpcm
adpcm_ima_apm           mpeg1video              rpza
adpcm_ima_qt            mpeg2video              rv10
adpcm_ima_ssi           mpeg4                   rv20
adpcm_ima_wav           mpeg4_v4l2m2m           s302m
adpcm_ms                msmpeg4v2               sbc
adpcm_swf               msmpeg4v3               sgi
adpcm_yamaha            msvideo1                snow
alac                    nellymoser              sonic
alias_pix               opus                    sonic_ls
amv                     pam                     speedhq
apng                    pbm                     srt
aptx                    pcm_alaw                ssa
aptx_hd                 pcm_dvd                 subrip
ass                     pcm_f32be               sunrast
asv1                    pcm_f32le               svq1
asv2                    pcm_f64be               targa
avrp                    pcm_f64le               text
avui                    pcm_mulaw               tiff
ayuv                    pcm_s16be               truehd
bmp                     pcm_s16be_planar        tta
cfhd                    pcm_s16le               utvideo
cinepak                 pcm_s16le_planar        v210
cljr                    pcm_s24be               v308
comfortnoise            pcm_s24daud             v408
dca                     pcm_s24le               v410
dnxhd                   pcm_s24le_planar        vc2
dpx                     pcm_s32be               vorbis
dvbsub                  pcm_s32le               vp8_v4l2m2m
dvdsub                  pcm_s32le_planar        wavpack
dvvideo                 pcm_s64be               webvtt
eac3                    pcm_s64le               wmav1
ffv1                    pcm_s8                  wmav2
ffvhuff                 pcm_s8_planar           wmv1
fits                    pcm_u16be               wmv2
flac                    pcm_u16le               wrapped_avframe
flashsv                 pcm_u24be               xbm
flashsv2                pcm_u24le               xface
flv                     pcm_u32be               xsub
g723_1                  pcm_u32le               xwd
gif                     pcm_u8                  y41p
h261                    pcm_vidc                yuv4
h263                    pcx                     zlib
h263_v4l2m2m            pgm                     zmbv
h263p                   pgmyuv

Enabled hwaccels:

Enabled parsers:
aac                     dvdsub                  opus
aac_latm                flac                    png
ac3                     g723_1                  pnm
adx                     g729                    rv30
av1                     gif                     rv40
avs2                    gsm                     sbc
avs3                    h261                    sipr
bmp                     h263                    tak
cavsvideo               h264                    vc1
cook                    hevc                    vorbis
dca                     ipu                     vp3
dirac                   jpeg2000                vp8
dnxhd                   mjpeg                   vp9
dpx                     mlp                     webp
dvaudio                 mpeg4video              xma
dvbsub                  mpegaudio
dvd_nav                 mpegvideo

Enabled demuxers:
aa                      ico                     pcm_s16be
aac                     idcin                   pcm_s16le
aax                     idf                     pcm_s24be
ac3                     iff                     pcm_s24le
ace                     ifv                     pcm_s32be
acm                     ilbc                    pcm_s32le
act                     image2                  pcm_s8
adf                     image2_alias_pix        pcm_u16be
adp                     image2_brender_pix      pcm_u16le
ads                     image2pipe              pcm_u24be
adx                     image_bmp_pipe          pcm_u24le
aea                     image_cri_pipe          pcm_u32be
afc                     image_dds_pipe          pcm_u32le
aiff                    image_dpx_pipe          pcm_u8
aix                     image_exr_pipe          pcm_vidc
alp                     image_gif_pipe          pjs
amr                     image_j2k_pipe          pmp
amrnb                   image_jpeg_pipe         pp_bnk
amrwb                   image_jpegls_pipe       pva
anm                     image_pam_pipe          pvf
apc                     image_pbm_pipe          qcp
ape                     image_pcx_pipe          r3d
apm                     image_pgm_pipe          rawvideo
apng                    image_pgmyuv_pipe       realtext
aptx                    image_pgx_pipe          redspark
aptx_hd                 image_photocd_pipe      rl2
aqtitle                 image_pictor_pipe       rm
argo_asf                image_png_pipe          roq
argo_brp                image_ppm_pipe          rpl
asf                     image_psd_pipe          rsd
asf_o                   image_qdraw_pipe        rso
ass                     image_sgi_pipe          rtp
ast                     image_sunrast_pipe      rtsp
au                      image_svg_pipe          s337m
av1                     image_tiff_pipe         sami
avi                     image_webp_pipe         sap
avr                     image_xpm_pipe          sbc
avs                     image_xwd_pipe          sbg
avs2                    ingenient               scc
avs3                    ipmovie                 sdp
bethsoftvid             ipu                     sdr2
bfi                     ircam                   sds
bfstm                   iss                     sdx
bink                    iv8                     segafilm
bintext                 ivf                     ser
bit                     ivr                     shorten
bmv                     jacosub                 siff
boa                     jv                      sln
brstm                   kux                     smacker
c93                     kvag                    smjpeg
caf                     live_flv                smush
cavsvideo               lmlm4                   sol
cdg                     loas                    sox
cdxl                    lrc                     spdif
cine                    luodat                  srt
codec2                  lvf                     stl
codec2raw               lxf                     str
concat                  m4v                     subviewer
data                    matroska                subviewer1
daud                    mca                     sup
dcstr                   mcc                     svag
derf                    mgsts                   svs
dfa                     microdvd                swf
dhav                    mjpeg                   tak
dirac                   mjpeg_2000              tedcaptions
dnxhd                   mlp                     thp
dsf                     mlv                     threedostr
dsicin                  mm                      tiertexseq
dss                     mmf                     tmv
dts                     mods                    truehd
dtshd                   moflex                  tta
dv                      mov                     tty
dvbsub                  mp3                     txd
dvbtxt                  mpc                     ty
dxa                     mpc8                    v210
ea                      mpegps                  v210x
ea_cdata                mpegts                  vag
eac3                    mpegtsraw               vc1
epaf                    mpegvideo               vc1t
ffmetadata              mpjpeg                  vividas
filmstrip               mpl2                    vivo
fits                    mpsub                   vmd
flac                    msf                     vobsub
flic                    msnwc_tcp               voc
flv                     mtaf                    vpk
fourxm                  mtv                     vplayer
frm                     musx                    vqf
fsb                     mv                      w64
fwse                    mvi                     wav
g722                    mxf                     wc3
g723_1                  mxg                     webm_dash_manifest
g726                    nc                      webvtt
g726le                  nistsphere              wsaud
g729                    nsp                     wsd
gdv                     nsv                     wsvqa
genh                    nut                     wtv
gif                     nuv                     wv
gsm                     obu                     wve
gxf                     ogg                     xa
h261                    oma                     xbin
h263                    paf                     xmv
h264                    pcm_alaw                xvag
hca                     pcm_f32be               xwma
hcom                    pcm_f32le               yop
hevc                    pcm_f64be               yuv4mpegpipe
hls                     pcm_f64le
hnm                     pcm_mulaw

Enabled muxers:
a64                     hash                    pcm_s24be
ac3                     hds                     pcm_s24le
adts                    hevc                    pcm_s32be
adx                     hls                     pcm_s32le
aiff                    ico                     pcm_s8
alp                     ilbc                    pcm_u16be
amr                     image2                  pcm_u16le
amv                     image2pipe              pcm_u24be
apm                     ipod                    pcm_u24le
apng                    ircam                   pcm_u32be
aptx                    ismv                    pcm_u32le
aptx_hd                 ivf                     pcm_u8
argo_asf                jacosub                 pcm_vidc
asf                     kvag                    psp
asf_stream              latm                    rawvideo
ass                     lrc                     rm
ast                     m4v                     roq
au                      matroska                rso
avi                     matroska_audio          rtp
avm2                    md5                     rtp_mpegts
avs2                    microdvd                rtsp
bit                     mjpeg                   sap
caf                     mkvtimestamp_v2         sbc
cavsvideo               mlp                     scc
codec2                  mmf                     segafilm
codec2raw               mov                     segment
crc                     mp2                     singlejpeg
dash                    mp3                     smjpeg
data                    mp4                     smoothstreaming
daud                    mpeg1system             sox
dirac                   mpeg1vcd                spdif
dnxhd                   mpeg1video              spx
dts                     mpeg2dvd                srt
dv                      mpeg2svcd               stream_segment
eac3                    mpeg2video              streamhash
f4v                     mpeg2vob                sup
ffmetadata              mpegts                  swf
fifo                    mpjpeg                  tee
fifo_test               mxf                     tg2
filmstrip               mxf_d10                 tgp
fits                    mxf_opatom              truehd
flac                    null                    tta
flv                     nut                     uncodedframecrc
framecrc                oga                     vc1
framehash               ogg                     vc1t
framemd5                ogv                     voc
g722                    oma                     w64
g723_1                  opus                    wav
g726                    pcm_alaw                webm
g726le                  pcm_f32be               webm_chunk
gif                     pcm_f32le               webm_dash_manifest
gsm                     pcm_f64be               webp
gxf                     pcm_f64le               webvtt
h261                    pcm_mulaw               wtv
h263                    pcm_s16be               wv
h264                    pcm_s16le               yuv4mpegpipe

Enabled protocols:
async                   http                    rtp
cache                   httpproxy               srtp
concat                  icecast                 subfile
crypto                  md5                     tcp
data                    mmsh                    tee
ffrtmphttp              mmst                    udp
file                    pipe                    udplite
ftp                     prompeg                 unix
gopher                  rtmp
hls                     rtmpt

Enabled filters:
abench                  curves                  overlay
abitscope               datascope               pad
acompressor             dblur                   pal100bars
acontrast               dcshift                 pal75bars
acopy                   dctdnoiz                palettegen
acrossfade              deband                  paletteuse
acrossover              deblock                 pan
acrusher                decimate                perms
acue                    deconvolve              photosensitivity
addroi                  dedot                   pixdesctest
adeclick                deesser                 pixscope
adeclip                 deflate                 premultiply
adelay                  deflicker               prewitt
adenorm                 dejudder                pseudocolor
aderivative             derain                  psnr
adrawgraph              deshake                 qp
aecho                   despill                 random
aemphasis               detelecine              readeia608
aeval                   dilation                readvitc
aevalsrc                displace                realtime
afade                   dnn_processing          remap
afftdn                  doubleweave             removegrain
afftfilt                drawbox                 removelogo
afifo                   drawgraph               replaygain
afir                    drawgrid                reverse
afirsrc                 drmeter                 rgbashift
aformat                 dynaudnorm              rgbtestsrc
afreqshift              earwax                  roberts
agate                   ebur128                 rotate
agraphmonitor           edgedetect              scale
ahistogram              elbg                    scale2ref
aiir                    entropy                 scdet
aintegral               equalizer               scroll
ainterleave             erosion                 select
alimiter                extractplanes           selectivecolor
allpass                 extrastereo             sendcmd
allrgb                  fade                    separatefields
allyuv                  fftdnoiz                setdar
aloop                   fftfilt                 setfield
alphaextract            field                   setparams
alphamerge              fieldhint               setpts
amerge                  fieldmatch              setrange
ametadata               fieldorder              setsar
amix                    fifo                    settb
amovie                  fillborders             showcqt
amplify                 firequalizer            showfreqs
amultiply               flanger                 showinfo
anequalizer             floodfill               showpalette
anlmdn                  format                  showspatial
anlms                   fps                     showspectrum
anoisesrc               framepack               showspectrumpic
anull                   framerate               showvolume
anullsink               framestep               showwaves
anullsrc                freezedetect            showwavespic
apad                    freezeframes            shuffleframes
aperms                  gblur                   shuffleplanes
aphasemeter             geq                     sidechaincompress
aphaser                 gradfun                 sidechaingate
aphaseshift             gradients               sidedata
apulsator               graphmonitor            sierpinski
arealtime               greyedge                signalstats
aresample               haas                    silencedetect
areverse                haldclut                silenceremove
arnndn                  haldclutsrc             sinc
aselect                 hdcd                    sine
asendcmd                headphone               smptebars
asetnsamples            hflip                   smptehdbars
asetpts                 highpass                sobel
asetrate                highshelf               spectrumsynth
asettb                  hilbert                 speechnorm
ashowinfo               histogram               split
asidedata               hqx                     sr
asoftclip               hstack                  ssim
asplit                  hue                     stereotools
astats                  hwdownload              stereowiden
astreamselect           hwmap                   streamselect
asubboost               hwupload                superequalizer
atadenoise              hysteresis              surround
atempo                  idet                    swaprect
atrim                   il                      swapuv
avectorscope            inflate                 tblend
avgblur                 interleave              telecine
axcorrelate             join                    testsrc
bandpass                lagfun                  testsrc2
bandreject              lenscorrection          thistogram
bass                    life                    threshold
bbox                    limiter                 thumbnail
bench                   loop                    tile
bilateral               loudnorm                tlut2
biquad                  lowpass                 tmedian
bitplanenoise           lowshelf                tmix
blackdetect             lumakey                 tonemap
blend                   lut                     tpad
bm3d                    lut1d                   transpose
bwdif                   lut2                    treble
cas                     lut3d                   tremolo
cellauto                lutrgb                  trim
channelmap              lutyuv                  unpremultiply
channelsplit            mandelbrot              unsharp
chorus                  maskedclamp             untile
chromahold              maskedmax               v360
chromakey               maskedmerge             vectorscope
chromanr                maskedmin               vflip
chromashift             maskedthreshold         vfrdet
ciescope                maskfun                 vibrance
codecview               mcompand                vibrato
color                   median                  vignette
colorbalance            mergeplanes             vmafmotion
colorchannelmixer       mestimate               volume
colorhold               metadata                volumedetect
colorkey                midequalizer            vstack
colorlevels             minterpolate            w3fdif
colorspace              mix                     waveform
compand                 movie                   weave
compensationdelay       negate                  xbr
concat                  nlmeans                 xfade
convolution             noformat                xmedian
convolve                noise                   xstack
copy                    normalize               yadif
crop                    null                    yaepblur
crossfeed               nullsink                yuvtestsrc
crystalizer             nullsrc                 zoompan
cue                     oscilloscope

Enabled bsfs:
aac_adtstoasc           h264_redundant_pps      null
av1_frame_merge         hapqa_extract           opus_metadata
av1_frame_split         hevc_metadata           pcm_rechunk
av1_metadata            hevc_mp4toannexb        prores_metadata
chomp                   imx_dump_header         remove_extradata
dca_core                mjpeg2jpeg              text2movsub
dump_extradata          mjpega_dump_header      trace_headers
eac3_core               mov2textsub             truehd_core
extract_extradata       mp3_header_decompress   vp9_metadata
filter_units            mpeg2_metadata          vp9_raw_reorder
h264_metadata           mpeg4_unpack_bframes    vp9_superframe
h264_mp4toannexb        noise                   vp9_superframe_split

Enabled indevs:
fbdev                   oss                     xcbgrab
lavfi                   v4l2

Enabled outdevs:
fbdev                   oss                     v4l2

License: LGPL version 2.1 or later

'프로그램 사용 > ffmpeg & ffserver' 카테고리의 다른 글

ffmpeg 재생 어렵다 -_ㅠ  (0) 2021.02.22
ffmpeg fbdev  (0) 2021.02.09
webm을 mp3로 변환하기  (0) 2020.04.01
ffmpeg h264 encoding 옵션  (0) 2019.02.22
ffmpeg으로 비디오 비트레이트 바꾸기  (0) 2019.02.22
Posted by 구차니

댓글을 달아 주세요

리눅스에서 하니 잘되네

그나저나.. odroid xu4 에서 돌리는데 ffmpeg 변환은 neon을 써서 그런지

cpu 클럭과 상관없이(300Mhz / 1.5Ghz) 변환 속도가 13.0x 정도로 나온다.

size=     256kB time=00:00:19.85 bitrate= 105.6kbits/s speed=13.2x


find . -type f -iname "*.webm" -exec bash -c 'FILE="$1"; ffmpeg -i "${FILE}" -vn -ab 128k -ar 44100 -y "${FILE%.webm}.mp3";' _ '{}' \;

[링크 : https://bytefreaks.net/gnulinux/bash/ffmpeg-extract-audio-from-webm-to-mp3]

'프로그램 사용 > ffmpeg & ffserver' 카테고리의 다른 글

ffmpeg fbdev  (0) 2021.02.09
ffmpeg build  (0) 2020.11.25
ffmpeg h264 encoding 옵션  (0) 2019.02.22
ffmpeg으로 비디오 비트레이트 바꾸기  (0) 2019.02.22
ffmpeg 레이턴시 관련 옵션 조사  (0) 2018.12.16
Posted by 구차니

댓글을 달아 주세요

다음 인코더 등에서 2PASS , 1PASS 설정하는게 있었는데

특별한게 아니라(?) H.264 인코더에서 제공하는 기본적인 기능이었네?

아무튼 2PASS의 경우 1PASS에서는 비트레이트를 어떻게 할지 분석하고(아마도 화면 바뀌는 순간 등을 확인하는 듯)

2PASS에서 실질적인 인코딩을 진행한다고 한다.

ffmpeg -y -i input -c:v libx264 -b:v 2600k -pass 1 -an -f mp4 /dev/null && \

ffmpeg -i input -c:v libx264 -b:v 2600k -pass 2 -c:a aac -b:a 128k output.mp4

[링크 : https://trac.ffmpeg.org/wiki/Encode/H.264]

Posted by 구차니

댓글을 달아 주세요

-c:a copy를 통해 오디오는 손대지 않고(AAC 같은건 못 건드리네.)

비디오만 비트레이트 변경할 수 있다.

$ ffmpeg -i viedeo.mp4 -b:v 2M -maxrate 2M -bufsize 1M  -c:a copy video_low.mp4 

[링크 : https://trac.ffmpeg.org/wiki/Limiting%20the%20output%20bitrate]

[링크 : https://opensource.com/article/17/6/ffmpeg-convert-media-file-formats]

'프로그램 사용 > ffmpeg & ffserver' 카테고리의 다른 글

webm을 mp3로 변환하기  (0) 2020.04.01
ffmpeg h264 encoding 옵션  (0) 2019.02.22
ffmpeg 레이턴시 관련 옵션 조사  (0) 2018.12.16
ffmpeg / ffplay cli interactive interface  (0) 2018.11.30
ffmpeg concat  (0) 2018.11.05
Posted by 구차니

댓글을 달아 주세요