
Recherche avancée
Autres articles (92)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (7059)
-
Errors in compiling FFmpeg for windows10/aarch64 using Microsoft Visual Studio 2017 Preview edition
29 octobre 2018, par NarsingaI am trying to compile FFmpeg (the Chromium version) for Windows10/Aarch64 configuration using Microsoft Visual Studio 2017 Preview community edition. I am running into errors in the assembly files as copied below (highlighted few errors). I believe FFmpeg is working for Linux/Aarch64 configuration (probably using GNU assembler) already in which case the same assembly code should also work for Microsoft ARM Macro Assembler as well. Please let me know if I am missing anything here and any pointers to help resolve the errors.
D :\Work\Chromium_FFmpeg\chromium\src>ninja -C out\ARM64V8 third_party\ffmpeg
ninja : Entering directory `out\ARM64V8’
[2/9] ASM obj/third_party/ffmpeg/ffmpeg_internal/autorename_libavcodec_aarch64_fft_neon.obj
FAILED : obj/third_party/ffmpeg/ffmpeg_internal/autorename_libavcodec_aarch64_fft_neon.obj
D :/Work/Chromium_FFmpeg/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py asm-wrapper environment.arm64 armasm64.exe /Foobj/third_party/ffmpeg/ffmpeg_internal/autorename_libavcodec_aarch64_fft_neon.obj ../../third_party/ffmpeg/libavcodec/aarch64/autorename_libavcodec_aarch64_fft_neon.S
Microsoft (R) ARM Macro Assembler Version 14.16.26926.0 for 64 bits
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\autorename_libavcodec_aarch64_fft_neon.S(1) : error A2003 : improper line syntax : /
// File automatically generated. See crbug.com/495833.
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\autorename_libavcodec_aarch64_fft_neon.S(2) : error A2230 : Illegal preprocessor directive ; only "#line [filename]" is recognized
include "fft_neon.S"
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\autorename_libavcodec_aarch64_fft_neon.S(3) : warning A4045 : missing END directive
include "fft_neon.S"
.
.
.
[6/9] ASM obj/third_party/ffmpeg/ffmpeg_internal/mpegaudiodsp_neon.obj
FAILED : obj/third_party/ffmpeg/ffmpeg_internal/mpegaudiodsp_neon.obj
D :/Work/Chromium_FFmpeg/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py asm-wrapper environment.arm64 armasm64.exe /Foobj/third_party/ffmpeg/ffmpeg_internal/mpegaudiodsp_neon.obj ../../third_party/ffmpeg/libavcodec/aarch64/mpegaudiodsp_neon.S
Microsoft (R) ARM Macro Assembler Version 14.16.26926.0 for 64 bits
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(1) : error A2003 : improper line syntax : /
/*
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(2) : error A2079 : improper line syntax ; symbol expected
* Copyright (c) 2014 Janne Grunau
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(3) : error A2079 : improper line syntax ; symbol expected
*
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(4) : error A2079 : improper line syntax ; symbol expected
* This file is part of FFmpeg.
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(5) : error A2079 : improper line syntax ; symbol expected
*
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(6) : error A2079 : improper line syntax ; symbol expected
* FFmpeg is free software ; you can redistribute it and/or
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(7) : error A2079 : improper line syntax ; symbol expected
* modify it under the terms of the GNU Lesser General Public
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(8) : error A2079 : improper line syntax ; symbol expected
* License as published by the Free Software Foundation ; either
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(9) : error A2079 : improper line syntax ; symbol expected
* version 2.1 of the License, or (at your option) any later version.
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(10) : error A2079 : improper line syntax ; symbol expected
*
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(11) : error A2079 : improper line syntax ; symbol expected
* FFmpeg is distributed in the hope that it will be useful,
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(12) : error A2079 : improper line syntax ; symbol expected
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(13) : error A2079 : improper line syntax ; symbol expected
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(14) : error A2079 : improper line syntax ; symbol expected
* Lesser General Public License for more details.
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(15) : error A2079 : improper line syntax ; symbol expected
*
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(16) : error A2079 : improper line syntax ; symbol expected
* You should have received a copy of the GNU Lesser General Public
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(17) : error A2079 : improper line syntax ; symbol expected
* License along with FFmpeg ; if not, write to the Free Software
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(18) : error A2079 : improper line syntax ; symbol expected
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(19) : error A2079 : improper line syntax ; symbol expected
*/
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(21) : error A2230 : Illegal preprocessor directive ; only "#line [filename]" is recognized
include "libavutil/aarch64/asm.S"
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(23) : error A2230 : Illegal preprocessor directive ; only "#line [filename]" is recognized
define FRAC_BITS 23 // fractional bits for sb_samples and dct
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(24) : error A2230 : Illegal preprocessor directive ; only "#line [filename]" is recognized
define WFRAC_BITS 16 // fractional bits for window
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(25) : error A2230 : Illegal preprocessor directive ; only "#line [filename]" is recognized
define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 15)
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(27) : error A2034 : unknown opcode : tbl_rev128_s
const tbl_rev128_s, align=4
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(28) : error A2034 : unknown opcode : .
.byte 12, 13, 14, 15
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(29) : error A2034 : unknown opcode : .
.byte 8, 9, 10, 11
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(30) : error A2034 : unknown opcode : .
.byte 4, 5, 6, 7
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(31) : error A2034 : unknown opcode : .
.byte 0, 1, 2, 3
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(34) : error A2003 : improper line syntax : .
.macro apply_window type, st
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(35) : error A2034 : unknown opcode : ff_mpadsp_apply_window_
function ff_mpadsp_apply_window_\type()_neon, export=1
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(42) : error A2034 : unknown opcode : movrel
movrel x15, tbl_rev128_s
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(44) : error A2003 : improper line syntax : .
.ifc \type, fixed
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(46) : error A2003 : improper line syntax : .
.else
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(48) : error A2003 : improper line syntax : .
.endif
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(53) : error A2173 : syntax error in expression
sub x5, x5, x4 // samples2
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(53) : error A2003 : improper line syntax : Trouble parsing operands
sub x5, x5, x4 // samples2
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(54) : error A2173 : syntax error in expression
neg x13, x4 // -incr
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(54) : error A2003 : improper line syntax : Trouble parsing operands
neg x13, x4 // -incr
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(56) : error A2003 : improper line syntax : .
.ifc \type, fixed
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(57) : error A2173 : syntax error in expression
ld1r v16.2s, [x2] // dither_state
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(57) : error A2003 : improper line syntax : Trouble parsing operands
ld1r v16.2s, [x2] // dither_state
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(60) : error A2061 : illegal expression type ; expected absolute numeric
movi v30.2d, #(1/ 64 * 8 * sizeof(int32_t)
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(101) : error A2003 : improper line syntax : Trouble parsing operands
sub x10, x10, #64<<5 // 64 * 8 * sizeof(int32_t)
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(103) : error A2003 : improper line syntax : .
.ifc \type, fixed
D :\Work\Chromium_FFmpeg\chromium\src\third_party\ffmpeg\libavcodec\aarch64\mpegaudiodsp_neon.S(105) : error A2034 : unknown opcode : ext
ext v28.16b, v29.16b, v28.16b, #8
.
.
. -
OpenCV VideoWriter using ffmpeg with "Could not open codec 'libx264'" Error
19 avril, par user2262504I am new to OpenCV, and I want write Mat images into video using VideoWriter on Ubuntu 12.04. But when constructing VideoWriter, errors came out.



It seems that OpenCV invoke ffmpeg API using default parameters and ffmpeg invoke x264 using its default parameters. Then these setting is broken for libx264. Thus the "Could not open codec 'libx264'" error.



Anyone has ideas to solve this problem ?



More specifically :



- 

- anyone knows where and how OpenCV invoke ffmpeg API ?
- how to change ffmpeg default settings using code, hopefull, can be easily embeded into OpenCV ?
- will changes of default in ffmpeg be carried to libx264 ?









Errors :



1. Uising CV_FOURCC('H', '2', '6', '4')
[libx264 @ 0x255de40] broken ffmpeg default settings detected
[libx264 @ 0x255de40] use an encoding preset (e.g. -vpre medium)
[libx264 @ 0x255de40] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 0x255de40] speed presets are listed in x264 --help
[libx264 @ 0x255de40] profile is optional; x264 defaults to high
Could not open codec 'libx264': Unspecified error

2. Using FOURCC = -1 to invoke user customized codec
OpenCV Error: Unsupported format or combination of formats (Gstreamer Opencv 
backend doesn't support this codec acutally.) in CvVideoWriter_GStreamer::open, 
file /home/XXX/Downloads/opencv-2.4.8/modules/highgui/src/cap_gstreamer.cpp, 
line 505 terminate called after throwing an instance of 'cv::Exception'
what(): /home/XXX/Downloads/opencv-2.4.8/modules/highgui/src/cap_gstreamer.cpp:
505: error: (-210) Gstreamer Opencv backend doesn't support this codec acutally.
in function CvVideoWriter_GStreamer::open
</profile></speed>



Codes :



int main(int argc, char *argv[])
{
 VideoWriter outputVideo;
 bool fourcc_on = true; //switch on / off different error
 if (fourcc_on)
 outputVideo.open("outVideo.avi", CV_FOURCC('H', '2', '6', '4'), 25, Size(100, 100), true);
 else
 outputVideo.open("outVideo.avi", -1, 25, Size(100, 100), true);

 if (!outputVideo.isOpened())
 {
 cout << "Could not open the output video for write" << endl;
 return -1;
 }
 return 0;
}




OpenCV Configuration :



-- Detected version of GNU GCC: 46 (406)
-- Found OpenEXR: /usr/lib/libIlmImf.so
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
-- 
-- General configuration for OpenCV 2.4.8 =====================================
-- Version control: unknown
-- 
-- Platform:
-- Host: Linux 3.8.0-38-generic x86_64
-- CMake: 2.8.7
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: RELEASE
-- 
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /usr/bin/c++ (ver 4.6)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/bin/gcc
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release): 
-- Linker flags (Debug): 
-- Precompiled headers: YES
-- 
-- OpenCV modules:
-- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib python stitching superres ts videostab
-- Disabled: world
-- Disabled by dependency: -
-- Unavailable: androidcamera dynamicuda java
-- 
-- GUI: 
-- QT: NO
-- GTK+ 2.x: YES (ver 2.24.10)
-- GThread : YES (ver 2.32.4)
-- GtkGlExt: NO
-- OpenGL support: NO
-- 
-- Media I/O: 
-- ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.3.4)
-- JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )
-- PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.46)
-- TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 3.9.5)
-- JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
-- OpenEXR: /usr/lib/libImath.so /usr/lib/libIlmImf.so /usr/lib/libIex.so /usr/lib/libHalf.so /usr/lib/libIlmThread.so (ver 1.6.1)
-- 
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: YES (ver 2.2.0)
-- FFMPEG: YES
-- codec: YES (ver 55.58.105)
-- format: YES (ver 55.37.101)
-- util: YES (ver 52.78.100)
-- swscale: YES (ver 2.6.100)
-- gentoo-style: YES
-- GStreamer: 
-- base: YES (ver 0.10.36)
-- app: YES (ver 0.10.36)
-- video: YES (ver 0.10.36)
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: Using libv4l (ver 1.0.1)
-- XIMEA: NO
-- Xine: NO
-- 
-- Other third-party libraries:
-- Use IPP: NO
-- Use Eigen: NO
-- Use TBB: NO
-- Use OpenMP: NO
-- Use GCD NO
-- Use Concurrency NO
-- Use C=: NO
-- Use Cuda: NO
-- Use OpenCL: YES
-- 
-- OpenCL:
-- Version: dynamic
-- Include path: /home/shixudongleo/Downloads/opencv-2.4.8/3rdparty/include/opencl/1.2
-- Use AMD FFT: NO
-- Use AMD BLAS: NO
-- 
-- Python:
-- Interpreter: /usr/bin/python (ver 2.7.3)
-- Libraries: /usr/lib/libpython2.7.so
-- numpy: /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.6.1)
-- packages path: lib/python2.7/dist-packages
-- 
-- Java:
-- ant: NO
-- JNI: NO
-- Java tests: NO
-- 
-- Documentation:
-- Build Documentation: NO
-- Sphinx: NO
-- PdfLaTeX compiler: /usr/bin/pdflatex
-- 
-- Tests and samples:
-- Tests: YES
-- Performance tests: YES
-- C/C++ Examples: NO
-- 
-- Install path: /usr/local
-- 
-- cvconfig.h is in: /home/shixudongleo/Downloads/opencv-2.4.8/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/XXX/Downloads/opencv-2.4.8/build




FFMPEG



ffmpeg is enable to support OpenCV and libx264 is enabled when compiling ffmpeg.
By using ffmpeg command line, libx264 is running normally.



$ ffmpeg -i test.avi -vcodec libx264 test.mp4
ffmpeg -i test.avi -vcodec libx264 test.mp4 > ~/Downloads/ffmpeg_log.txt
ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
 built on Apr 24 2014 16:39:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
 configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-shared --enable-pic
 libavutil 52. 78.100 / 52. 78.100
 libavcodec 55. 58.105 / 55. 58.105
 libavformat 55. 37.101 / 55. 37.101
 libavdevice 55. 13.100 / 55. 13.100
 libavfilter 4. 4.100 / 4. 4.100
 libswscale 2. 6.100 / 2. 6.100
 libswresample 0. 18.100 / 0. 18.100
 libpostproc 52. 3.100 / 52. 3.100
Input #0, avi, from 'test.avi':
 Duration: 00:00:03.73, start: 0.000000, bitrate: 1757 kb/s
 Stream #0:0: Video: msvideo1 (CRAM / 0x4D415243), rgb555le, 320x240, 1781 kb/s, 15 tbr, 15 tbn, 15 tbc
 Metadata:
 title : julius.avi Video #1
File 'test.mp4' already exists. Overwrite ? [y/N] y
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x25d08e0] using cpu capabilities: none!
[libx264 @ 0x25d08e0] profile High 4:4:4 Predictive, level 1.2, 4:4:4 8-bit
[libx264 @ 0x25d08e0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=4 threads=12 lookahead_threads=1 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=15 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 'test.mp4':
 Metadata:
 encoder : Lavf55.37.101
 Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 320x240, q=-1--1, 15360 tbn, 15 tbc
 Metadata:
 title : julius.avi Video #1
Stream mapping:
 Stream #0:0 -> #0:0 (msvideo1 -> libx264)
Press [q] to stop, [?] for help
frame= 56 fps=0.0 q=-1.0 Lsize= 321kB time=00:00:03.60 bitrate= 731.0kbits/s 
video:320kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.409949%
[libx264 @ 0x25d08e0] frame I:3 Avg QP:15.36 size: 7975
[libx264 @ 0x25d08e0] frame P:38 Avg QP:26.05 size: 6230
[libx264 @ 0x25d08e0] frame B:15 Avg QP:28.25 size: 4418
[libx264 @ 0x25d08e0] consecutive B-frames: 46.4% 53.6% 0.0% 0.0%
[libx264 @ 0x25d08e0] mb I I16..4: 1.4% 72.8% 25.8%
[libx264 @ 0x25d08e0] mb P I16..4: 1.6% 5.7% 15.1% P16..4: 7.6% 6.3% 7.4% 0.0% 0.0% skip:56.3%
[libx264 @ 0x25d08e0] mb B I16..4: 0.2% 1.0% 2.0% B16..8: 13.3% 7.8% 8.7% direct: 8.3% skip:58.8% L0:34.9% L1:36.6% BI:28.5%
[libx264 @ 0x25d08e0] 8x8 transform intra:37.7% inter:2.3%
[libx264 @ 0x25d08e0] coded y,u,v intra: 52.1% 42.1% 30.1% inter: 19.6% 9.2% 5.2%
[libx264 @ 0x25d08e0] i16 v,h,dc,p: 56% 17% 24% 2%
[libx264 @ 0x25d08e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 16% 68% 1% 1% 1% 1% 1% 1%
[libx264 @ 0x25d08e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 18% 28% 5% 6% 5% 7% 5% 6%
[libx264 @ 0x25d08e0] Weighted P-Frames: Y:31.6% UV:21.1%
[libx264 @ 0x25d08e0] ref P L0: 70.5% 9.0% 12.1% 6.5% 2.0%
[libx264 @ 0x25d08e0] ref B L0: 91.3% 8.7%
[libx264 @ 0x25d08e0] kb/s:700.56



-
ffmpeg conversion of jpg to mp4 fails due to to jpg frames change
14 janvier 2019, par Sebastien DamayeI’m trying to compile a set of jpg (camera screenshots taken every 5 seconds) to a mp4. The ffmpeg command works fine but the resulting mp4 is missing some images. I noticed that the "holes" are created when the jpg "frames" is changing from 1 to 3 in the jpg sequence (see below result of
file
that showsframes 1
for the 1st jpg andframes 3
for the 2nd one) :$ file 20190110060113.jpg
20190110060113.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 1280x720, frames 1
$ file 20190110060119.jpg
20190110060119.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 1280x720, frames 3And with
ffmpeg
, it sows :ffmpeg -i 20190110060113.jpg -i 20190110060119.jpg
ffmpeg version 3.2.10-1~deb9u1~bpo8+1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10)
configuration: --prefix=/usr --extra-version='1~deb9u1~bpo8+1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --disable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, image2, from '20190110060113.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 13395 kb/s
Stream #0:0: Video: mjpeg, gray(bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Input #1, image2, from '20190110060119.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 21463 kb/s
Stream #1:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
At least one output file must be specifiedBelow is the command I’m using to compile the mp4 from the jpg :
ffmpeg -r 25 -f image2 -s 1280x720 -i /data/camipjpg/%*.jpg -vcodec libx264 -crf 25 -pix_fmt yuv420p /data/camipmgpg/20190110.mp4
For the sake of curiosity, I investigated and noticed that the camera actually has 2 modes (day and night). Images taken during the night have
frames 1
while images taken on the "day" mode haveframes 3
.Is there a way ffmpeg can handle that kind of jpg changes to combine these different types of jpg ?
Here is the output :
ffmpeg version 3.2.10-1~deb9u1~bpo8+1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10)
configuration: --prefix=/usr --extra-version='1~deb9u1~bpo8+1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --disable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[image2 @ 0x55aed5072ba0] Pattern type 'glob_sequence' is deprecated: use pattern_type 'glob' instead
Input #0, image2, from 'bcp/%*.jpg':
Duration: 00:09:07.24, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, gray(bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0x55aed50b8300] using SAR=1/1
[libx264 @ 0x55aed50b8300] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x55aed50b8300] profile High, level 3.1
[libx264 @ 0x55aed50b8300] 264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=6 lookahead_threads=1 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=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'test.mp4':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc57.64.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
Input stream #0:0 frame changed from size:1280x720 fmt:gray to size:1280x720 fmt:yuvj422p.937x
[swscaler @ 0x55aed5b56e80] deprecated pixel format used, make sure you did set range correctly
Input stream #0:0 frame changed from size:1280x720 fmt:yuvj422p to size:1280x720 fmt:grayrop=3023 speed=0.717x
Input stream #0:0 frame changed from size:1280x720 fmt:gray to size:1280x720 fmt:yuvj422p
[swscaler @ 0x55aed550fc20] deprecated pixel format used, make sure you did set range correctly
Input stream #0:0 frame changed from size:1280x720 fmt:yuvj422p to size:1280x720 fmt:grayrop=6171 speed=0.625x
frame= 7156 fps= 16 q=-1.0 Lsize= 80319kB time=00:04:46.12 bitrate=2299.6kbits/s dup=0 drop=6525 speed=0.621x
video:80233kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.107008%
[libx264 @ 0x55aed50b8300] frame I:30 Avg QP:23.39 size: 82468
[libx264 @ 0x55aed50b8300] frame P:2917 Avg QP:26.31 size: 21742
[libx264 @ 0x55aed50b8300] frame B:4209 Avg QP:28.37 size: 3864
[libx264 @ 0x55aed50b8300] consecutive B-frames: 0.9% 49.6% 37.1% 12.4%
[libx264 @ 0x55aed50b8300] mb I I16..4: 7.3% 88.2% 4.6%
[libx264 @ 0x55aed50b8300] mb P I16..4: 2.7% 4.6% 0.4% P16..4: 37.5% 12.7% 10.4% 0.0% 0.0% skip:31.7%
[libx264 @ 0x55aed50b8300] mb B I16..4: 0.7% 1.1% 0.1% B16..8: 33.4% 2.7% 0.3% direct: 1.0% skip:60.5% L0:58.0% L1:37.1% BI: 4.9%
[libx264 @ 0x55aed50b8300] 8x8 transform intra:61.4% inter:88.3%
[libx264 @ 0x55aed50b8300] coded y,uvDC,uvAC intra: 34.6% 27.8% 4.0% inter: 16.8% 5.4% 0.1%
[libx264 @ 0x55aed50b8300] i16 v,h,dc,p: 36% 21% 17% 27%
[libx264 @ 0x55aed50b8300] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 13% 42% 3% 4% 4% 5% 3% 4%
[libx264 @ 0x55aed50b8300] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 12% 19% 6% 8% 9% 7% 6% 5%
[libx264 @ 0x55aed50b8300] i8c dc,h,v,p: 75% 11% 13% 1%
[libx264 @ 0x55aed50b8300] Weighted P-Frames: Y:34.5% UV:6.4%
[libx264 @ 0x55aed50b8300] ref P L0: 41.0% 13.8% 22.0% 17.7% 5.5%
[libx264 @ 0x55aed50b8300] ref B L0: 39.0% 50.9% 10.1%
[libx264 @ 0x55aed50b8300] ref B L1: 84.5% 15.5%
[libx264 @ 0x55aed50b8300] kb/s:2296.19Thx in advance for your help.