Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Getting metadata from a video using Paperclip-FFMPEG in Rails 3.2.6
16 novembre 2012, par GraemeWhile still a Rails newbie, I've managed to get Paperclip-FFMPEG working. However, I'd like to extract some metadata from the uploaded video, in particular the length of the video. The README suggests this is possible, but I'm struggling to understand what I need to do:
You may optionally add
_meta to your model and paperclip-ffmpeg will add information about the processed video. Let's say the Paperclip attribute I have in my model is called "sourcefile". If I'm reading these instructions correctly, does this mean I need to add an extra attribute called sourcefile_meta? Do I need to add generate a migration file to add this extra column to the model's table? How would I get access to the length of the video in my view? Should it be something like this:
Length: <%= mymodel.sourcefile_meta.length %>
Any pointers would be most useful, as I've hit a bit of a brick wall! Thanks!
-
Fetching movies' frames via ffmpeg and feed it to vlfeat's sift
16 novembre 2012, par KarlI am going to develop a program that uses ffmpeg and vlfeat on a linux server.
My task is simply: get some frames from a movie file and feed these frames to vlfeat's sift.
I am reading through some documents regarding using ffmpeg in c development, mainly here and here. As stated in the site, "There is not much "web based" official documentation for using these libraries." And some tutorials there might be a little outdated. I also read around that the API might differ from version to version. So I would like to ask for the following:
Is it safe to follow this tutorial for the current implementation?
- If so, given the impression from above, what are some of the things that should be change for the current implementation? (currently I got ffmpeg-git-c995644)
- If not, what are the functions to acquire the frames of the movie file in any format?
For vlfeat side, if I am to feed a movie's image frame from ffmpeg, what kind of conversion is required so that vlfeat's sift implementation can "digest" the movie's image frame?
-
convert avi to mp4 - centos - propper command
16 novembre 2012, par Rares Danieli need some help, please. Im strugling for a time now, with ffmpeg/mencoder/mp4box.
i need to convert videos from avi to mp4, to maintain same quality, and IF possible, to reduce size.
Im using centos 6.3 64bit
i tried several commands: ffmpeg -i input.avi -acodec libfaac -b:a 128k -vcodec mpeg4 -b:v 1200k -flags +aic+mv4 output.mp4 with: qscale 1
the commands work, but the output file cant be played via httpd, i get (media time unsuported) or the output file is too large. I need an command to convert from avi to mp4 using h264 and faac.
With windows , i have this "HandBrakeCLI.exe" -i "input" -t 1 -c 1 -o "output" -f mp4 --strict-anamorphic -e x264 -q 20 --vfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0 --gain=0 --audio-copy-mask none --audio-fallback ffac3 -x ref=1:weightp=1:subq=2:rc-lookahead=10:trellis=0:8x8dct=0 --verbose=1 And works like a charm. But not on linux
Can you please give me a command to do this? Also, if its possbile to use 2-3 core of server and 2-3 gb ram so the process would be faster.
Thank you
-
MP3 Audio requiring overlays at specific intervals to ensure I dont break copyright rules
15 novembre 2012, par user1828008I have started a project as a DJ to record my online radio shows to mp3. The station I play on is licenced so I am not breaking any copyright rules there. I have had the idea to upload the recordings onto Youtube.
Clearly that needed some form of adjustment to make a video over the top of the audio which I have achieved using ffmpeg so I have an mp4 file with a picture overlay for the duration of the audio. I did a quick test run to upload the video to Youtube and it tracked that I was playing copyrighted material. It was exactly right in its statement and yes as my own channel on youtube I am not licenced to do so. Either way I have spoke to the copyright owners and they have agreed it is fine.
However in order to not have to do this every week if I overlay a 5 second 'jingle' every 4 minutes over the audio (fading down if possible) the main volume slightly to play the jingle and fade up after (once again if possible) then I am 100% in the clear. I could do this manually but would rather something I can script in bash to do it for me.
I am using Centos 6.3 operating system and FFMPEG solved the merge of video and audio together, but I couldnt find anything to do a predefined audio overlay at specific intervals.
I have looked at programs like Avisynth and Sox but dont believe from the documentation that they have anything that can do regular interval overlays during a single track. The closest thing I could find is on this post :
Add multiple audio files to video at specific points using FFMPEG
But it would be nice to do everything in a single sweep with ffmpeg of the audio file (video and audio overlay) if thats possible somehow or any better options that are out there?
If you need any more info from me then please let me know. Thanks
-
m3u8-segmenter not compiling
15 novembre 2012, par Publiccertroot@ip-**-**-**-**:/home/jeff/m3u8-segmenter# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking whether make sets $(MAKE)... (cached) yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for sys/types.h... (cached) yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking getopt.h usability... yes checking getopt.h presence... yes checking for getopt.h... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for memmove... yes checking for memset... yes checking for strrchr... yes checking for strtol... yes ./configure: line 4160: PKG_PROG: command not found ./configure: line 4161: syntax error near unexpected token `FFMPEG,' ./configure: line 4161: `PKG_CHECK_MODULES(FFMPEG, libavformat libavcodec libavutil)'
All my dependencies are in place, including FFMPEG, PKG_PROG, etc but I'm getting these errors and at a loss. Any ideas?