Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg filters image processing
15 décembre 2017, par Ja_cppffmpeg
is applying some filters to the images before constructing the video. Is there any way to know those filters?I'm using this command (so every parameters are kept by default):
ffmpeg -framerate 12 -i frame%02d.jpg out.mp4
Example of one frame:
Image file:
I'm working on image processing with c++ and I'm interested in the way
ffmpeg
filtering the imagesEDIT
When I launch the command line, that what I get in the terminal:
ffmpeg -framerate 5 -i frame%02d.jpg output.mp4 ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 [mjpeg @ 0x23e8600] Changeing bps to 8 Input #0, image2, from 'frame%02d.jpg': Duration: 00:01:40.20, start: 0.000000, bitrate: N/A Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 2576x1456 [SAR 1:1 DAR 23:13], 5 fps, 5 tbr, 5 tbn, 5 tbc No pixel format specified, yuvj420p for H.264 encoding chosen. Use -pix_fmt yuv420p for compatibility with outdated media players. [libx264 @ 0x23ec680] using SAR=1/1 [libx264 @ 0x23ec680] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x23ec680] profile High, level 5.0 [libx264 @ 0x23ec680] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=5 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to 'output.mp4': Metadata: encoder : Lavf56.40.101 Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p(pc), 2576x1456 [SAR 1:1 DAR 23:13], q=-1--1, 5 fps, 10240 tbn, 5 tbc Metadata: encoder : Lavc56.60.100 libx264 Stream mapping: Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264)) Press [q] to stop, [?] for help frame= 501 fps=3.8 q=-1.0 Lsize= 154288kB time=00:01:39.80 bitrate=12664.6kbits/s video:154284kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.002771% [libx264 @ 0x23ec680] frame I:3 Avg QP:17.31 size:564506 [libx264 @ 0x23ec680] frame P:498 Avg QP:19.27 size:313841 [libx264 @ 0x23ec680] mb I I16..4: 0.2% 97.1% 2.7% [libx264 @ 0x23ec680] mb P I16..4: 0.0% 46.3% 0.5% P16..4: 12.5% 13.0% 7.7% 0.0% 0.0% skip:20.1% [libx264 @ 0x23ec680] 8x8 transform intra:98.9% inter:73.3% [libx264 @ 0x23ec680] coded y,uvDC,uvAC intra: 99.0% 99.7% 96.0% inter: 52.0% 57.7% 37.0% [libx264 @ 0x23ec680] i16 v,h,dc,p: 17% 16% 13% 54% [libx264 @ 0x23ec680] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 12% 33% 6% 7% 6% 8% 7% 10% [libx264 @ 0x23ec680] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 13% 14% 10% 13% 9% 11% 8% 10% [libx264 @ 0x23ec680] i8c dc,h,v,p: 66% 14% 14% 5% [libx264 @ 0x23ec680] Weighted P-Frames: Y:2.0% UV:1.2% [libx264 @ 0x23ec680] ref P L0: 45.6% 16.0% 20.4% 17.6% 0.5% [libx264 @ 0x23ec680] kb/s:12613.66
-
FFMPEG udp input stream and input stream play local file
15 décembre 2017, par liewjlsHoping someone can guide me to the right place. I have a application is being the "middle man" receiving a video stream from a source via UDP and passing this video stream to a ffmpeg instance on a server and record a certain period of the video (without audio), on a certain occasion it will need to play the video from recorded video instead of passing the live video stream to the ffmepg instance on the server.
/ffmpeg -an -f mpegts -i udp://@:7100/?fifo_size=2000&overrun_nonfatal=1 -analyzeduration 150 -f rawvideo -map 0:0 -vcodec rawvideo -pix_fmt bgra - -af volumedetect -vn -sn -dn -map 0:1 -f mpegts -y -flush_packets 0 udp://127.0.0.1:7208?pkt_size=1316
I managed to record the video without audio frm Extracting the h264 part of a video file (demuxing)
The difference is i save the recorded file as "mpegts"
avformat_alloc_output_context2(&ofmt_ctx_a, NULL, "mpegts", out_filename_a);
As soon i need to play from this recorded file, i read every 1316 packets from this file and pass it to the ffmpeg via the localhost port.
The problem is the ffmpeg seems doesn't like my recorded file and i noticed it has error msg "DTS 18635855 < 24133055 out of order"
How do i resolve this issue?
Thanks.
-
Overlap segments of videos in FFmpeg [duplicate]
15 décembre 2017, par Spandan ThakurThis question already has an answer here:
I am able to segment a video using the below command.
ffmpeg -i Sample.mp4 -c copy -map 0 -segment_list sample.csv -segment_time 10 -f segment -reset_timestamps 1 output%03d.mp4
This command segments the videos in approximately 10 second splits without any overlap.
Is there anyway though to have an overlap between the split videos? Ideally, I want a 10 seconds overlap between each output video.
-
bash ffmpeg command not found
15 décembre 2017, par Sunil GargI have a CentOS machine on which I want to install ffmpeg. I tried
yum install ffmpeg
but unable to install and showing errors on the console
Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libtheoradec.so.1()(64bit) Error: Package: libavdevice-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libSDL-1.2.so.0()(64bit) Error: Package: ffmpeg-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libSDL-1.2.so.0()(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libhogweed.so.2()(64bit) Error: Package: libavdevice-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libv4l2.so.0()(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libgnutls.so.28()(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libass.so.5()(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libopenjpeg.so.1()(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libgsm.so.1()(64bit) Error: Package: libavdevice-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libcdio_paranoia.so.1(CDIO_PARANOIA_1)(64bit) Error: Package: libavdevice-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libpulse.so.0(PULSE_0)(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libva.so.1()(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libgnutls.so.28(GNUTLS_3_0_0)(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libschroedinger-1.0.so.0()(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop) Requires: libtheoraenc.so.1(libtheoraenc_1.0)(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
then I followed this link this created a bin folder having
-rwxr-xr-x 1 root root 21545536 Dec 14 19:38 ffmpeg -rwxr-xr-x 1 root root 21452512 Dec 14 19:38 ffprobe -rwxr-xr-x 1 root root 19227136 Dec 14 19:38 ffserver -rwxr-xr-x 1 root root 505728 Dec 14 19:11 lame -rwxr-xr-x 1 root root 2779368 Dec 14 18:51 nasm -rwxr-xr-x 1 root root 1078048 Dec 14 18:51 ndisasm -rwxr-xr-x 1 root root 2550848 Dec 14 18:54 vsyasm -rwxr-xr-x 1 root root 2548168 Dec 14 18:54 yasm -rwxr-xr-x 1 root root 2526096 Dec 14 18:54 ytasm
and when I try to run
[root@ip-XXX-XX-XX-XXX bin]# ffmpeg
it shows
bash: ffmpeg: command not found
Am I missing something?
-
About objective metrics : Is the SSIM can be predicted by PSNR ? (PSNR vs SSIM)
15 décembre 2017, par roberutsuI read some people saying that if you have a study that involve conclusion regarding PSNR you must repeat all again considering also SSIM.
Since this meaning double work, time (and why not money), doing all simulations again (that already got using PSNR) using the SSIM parameter now ?
Are SSIM and PSNR independent?