Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg "select" filter not working with MPEG-4 and "-vcodec copy"
5 novembre 2013, par Simone PalazzoI have an MPEG-4 video, which
mediainfo
describes as:Format : MPEG-4 Format profile : Base Media Codec ID : isom Overall bit rate : 6 772 Kbps Writing application : Lavf54.6.100 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Bit rate : 25.0 Mbps Frame rate mode : Constant Frame rate : 29.000 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.554 Stream size : 500 MiB (98%) Writing library : x264 core 125 Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / nalyse=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=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=25000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
(I removed some useless information)
What I'd like to do is remove the first, say, 200 frames from the video.
However, if I try with
ffmpeg
(version 0.11.1, compiled from source)ffmpeg -i video.mp4 -vf select='gte(n\,200)' -vcodec copy -strict -2 out.mp4
it doesn't work, the frames are exactly the same. If I remove the
-vcodec copy
part, what happens is that the first 190 frames are all the same (equal to the 190th one); so, they're not removed, but replaced with the 190th one.If I try the
select
filter to extract single images from the video, withffmpeg -i video.mp4 -vf "select=gte(n\,200)" %d.jpg
it works alright.
Does anybody have an idea why this happens?
Thank you!
-
Unrecognized option 'preset' with ubuntu 12.04 and ffmpeg
5 novembre 2013, par hyperrjasI have compiled ffmpeg with the guide How To Compile FFmpeg and x264 on Ubuntu.
Now I'm trying upload a .mp4 file to encode. However I get this error now:
ffmpeg version git-2013-11-05-934e489 Copyright (c) 2000-2013 the FFmpeg developers built on Nov 5 2013 13:58:43 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5) configuration: --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-nonfree --enable-version3 libavutil 52. 51.100 / 52. 51.100 libavcodec 55. 41.100 / 55. 41.100 libavformat 55. 21.100 / 55. 21.100 libavdevice 55. 5.100 / 55. 5.100 libavfilter 3. 90.101 / 3. 90.101 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100 Unrecognized option 'preset'. Error splitting the argument list: Option not found Errors: no output file created.
This is the ruby methods to encode:
case format when 'mp4' h[:video_codec] = 'libx264' h[:audio_codec] = 'libfaac' h[:custom] = '-qscale 0 -preset slow -g 30' when 'ogv' h[:video_codec] = 'libtheora' h[:audio_codec] = 'libvorbis' h[:custom] = '-b 1500k -ab 160000 -g 30' when 'webm' h[:video_codec] = 'libvpx' h[:audio_codec] = 'libvorbis' h[:custom] = '-b 1500k -ab 160000 -f webm -g 30' end
-
Unknown encoder 'libfaac' ubuntu 12.04 and ruby on rails 3
5 novembre 2013, par hyperrjasI'm using carrierwave-video to upload video with my ruby on rails app. But I have this problem when try enconde the video:
Unknown encoder 'libfaac' Errors: no output file created.
I have tried with:
sudo apt-get install libfaac-dev
but I get the same error.
Updated:
After compile ffmpeg, I get the same error:
Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42isomavc1 creation_time : 2011-10-13 18:54:50 encoder : HandBrake 0.9.5 2011010300 Duration: 00:06:43.28, start: 0.000000, bitrate: 380 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x600 [SAR 1:1 DAR 8:5], 279 kb/s, 9.25 fps, 25 tbr, 90k tbn, 180k tbc Metadata: creation_time : 2011-10-13 18:54:50 handler_name : Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, s16, 97 kb/s Metadata: creation_time : 2011-10-13 18:54:50 handler_name : Please use -q:a or -q:v, -qscale is ambiguous Unknown encoder 'libfaac' Errors: no output file created.
-
FFMpeg build -lavdevice error on mac [on hold]
5 novembre 2013, par Ilya KharlamovI'm trying to build ffmpeg for kxmovie, but in the end I get the message here is:
Build settings from command line: ARCHS = armv7s SDKROOT = iphoneos7.0 SYMROOT = tmp/build === BUILD TARGET kxmovie OF PROJECT kxmovie WITH CONFIGURATION Release === Check dependencies Libtool tmp/build/Release-iphoneos/libkxmovie.a normal armv7s cd /Volumes/Files/Kharlamov/Desktop/kxtorrent/submodules/kxmovie setenv IPHONEOS_DEPLOYMENT_TARGET 7.0 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only armv7s -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Volumes/Files/Kharlamov/Desktop/kxtorrent/submodules/kxmovie/tmp/build/Release-iphoneos -L/Volumes/Files/Kharlamov/Desktop/kxtorrent/submodules/kxmovie/libs -filelist /Volumes/Files/Kharlamov/Desktop/kxtorrent/submodules/kxmovie/tmp/build/kxmovie.build/Release-iphoneos/kxmovie.build/Objects-normal/armv7s/kxmovie.LinkFileList -ObjC -all_load -framework Foundation -framework CoreGraphics -lavcodec -lavdevice -lavformat -lavutil -lswresample -lswscale /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/libz.dylib -framework MediaPlayer -framework CoreAudio -framework AudioToolbox -framework Accelerate -framework QuartzCore -framework OpenGLES -o /Volumes/Files/Kharlamov/Desktop/kxtorrent/submodules/kxmovie/tmp/build/Release-iphoneos/libkxmovie.a /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified, -all_load invalid /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lavdevice /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lavdevice is not an object file (not allowed in a library) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/libz.dylib is a dynamic library, not added to the static library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/libz.dylib is a dynamic library, not added to the static library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/libz.dylib is a dynamic library, not added to the static library Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1 ** BUILD FAILED ** The following build commands failed: Libtool tmp/build/Release-iphoneos/libkxmovie.a normal armv7s (1 failure) rake aborted! ******** Build failed ********
Help please, what is the problem and how to fix it? P.S. I'm sorry for my english, I'm just learning :)
-
ffmpeg unique frames only
5 novembre 2013, par WilliamI have a video sequence (MPEG1) of 30 fps that is decoded in two ways:
opencv_ffmpeg returns 30 images per second, but only 5 of them are unique, while all others are clones of the unique ones.
proprietary players (MediaPlayer) returns only the 5 unique frames and "holds" them for (1/5) sec each.
Is there a way to grab only the unique frames that the coder knows and not the total amount the ffmpeg decoder produces to fulfill the fps rate?
I'm developing a tracker and my tracker is forced to run 6 times slower and do many mistakes due to these "cloned frames".
Does anyone know any technical term to the problem? Unfortunately, ffmpeg is a black box for an opencv user and the documentation is sparse.