Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Access each Pixel of AVFrame
9 novembre 2011, par EBAGI need to access each pixel informations of an AVFrame object of FFMPEG ( If it's in RGB then each color, R and G and B of each Pixel )
How can I achieve that?
-
Transcoding to webm with ffmpeg audio problems
9 novembre 2011, par Max A.For the past few days, I have been trying to get my lossless .mov video(that has an audio track) to a .webm format.
Some info on the video & audio is that the fps is 30. Also the audio track has about 3-5 seconds of silence/blank audio before you start hearing some music.
My problem is that is seems during the transcoding to webm, it strips away this blank audio because when I go to play the video, the audio starts right away.I've also notice that it jumps right away to ~4 seconds in the video. When i play it on the browser, it jumps to that moment in the timeline. If I try to scrub to the beginning, the video ends.
I've have figured somethings out.
- This is just a webm problem. This does not happen with ogv or mp4
- It only happens if they is blank audio in the beginning of the audio track.
I am using ffmpeg with the libvpx and libvorbis librarys and I am doing just the basic command line setup
ffmpeg -i "infile" "outfile.webm"
-
Rails 3 : How can I make Paperclip-FFMPEG work ?
9 novembre 2011, par reminoI have Rails 3.0.3 with these gems:
- delayed_job 2.1.4
- delayed_paperclip 0.7.1
- paperclip 2.3.16
- paperclip-ffmpeg 0.7.0
(This combination is very specific. Some newer gems will not work with others.)
Here's my Video model:
class Video < Upload has_attached_file :file, :default_style => :view, :processors => [:ffmpeg], :url => '/system/:class/:attachment/:id/:style/:basename.:extension', :path => ':rails_root/public/system/:class/:attachment/:id/:style' \ + '/:basename.:extension', :default_url => '/images/en/processing.png', :styles => { :mp4video => { :geometry => '520x390', :format => 'mp4', :convert_options => { :output => { :vcodec => 'libx264', :vpre => 'ipod640', :b => '250k', :bt => '50k', :acodec => 'libfaac', :ab => '56k', :ac => 2 } } }, :oggvideo => { :geometry => '520x390', :format => 'ogg', :convert_options => { :output => { :vcodec => 'libtheora', :b => '250k', :bt => '50k', :acodec => 'libvorbis', :ab => '56k', :ac => 2 } } }, :view => { :geometry => '520x390', :format => 'jpg', :time => 1 }, :preview => { :geometry => '160x120', :format => 'jpg', :time => 1 } } validates_attachment_content_type :file, :content_type => VIDEOTYPES, :if => Proc.new { |upload| upload.file.file? } process_in_background :file end
When creating a new Video object with attachment, the original is saved, but no conversion will be done. Even calling
Video.last.file.reprocess!
won't to a thing except returningtrue
. (Not sure what "true" means in this case as it didn't work.)I tried hardcoding the path to ffmpeg in
Paperclip::options[:command_path]
. I even tried deleting the paperclip-ffmpeg.rb file and replacing it with a blank file. Really thinking I'd get an exception by doing the later, instead, I simply got "true" again.It feels like the paperclip-ffmpeg.rb is being loaded, because it is required by
config/application.rb
, but nothing is called in it when trying to generate a thumbnail or convert a video.Can anyone help me with this? Thanks in advance!
-
Good library for encoding videos in a dynamic language ?
8 novembre 2011, par RyanI'm looking for an effective library for encoding videos. I would prefer something in one of the Ruby/Python ilk type languages, but I'd use libraries in C or PHP that were good. Essentially, I'm looking for something that wraps ffmpeg, and would allow me to convert H.264 .mp4's into .theora.ogv, .webm, and (this would be nice) .flv files.
Worst case, I could always just use any language to natively execute ffmpeg, using something like command("ffmpeg -i ...etc."), but I'd prefer something a bit higher level/in-language if possible.
I've already looked at RVideo, but couldn't get it to work correctly.
-
Merge two .m4a files or convert .wav file to m4a
8 novembre 2011, par PannuI was looking for a way to record in mpeg-4 with the ability to pause and resume but it seemed like there isn't one. So I decided to record in raw
wave
format and convert to.m4a
. Is there a way I can convert.wav
file to.m4a
in android. I've looked around formencoder
port for android but found none, there were some post's about portingffmpeg
to android onlinux
but its not quite clear how i can use it in android to merge two.m4a
files or convert.wav
file to.m4a
.