Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg Encode video and audio for streaming with flowplayer
2 octobre 2012, par knittledanI'm using FFmpeg version 0.6 enabled with h264 libraries and having a hard time encoding video and audio to work with flowplayer.
I have tested flowplayer with videos that have already been encoded properly and it does indeed stream them.
so my question is how would I encode videos using ffmpeg for h264 pseudo streaming with flowplayer. I do have my streaming server set up and properly streaming the test videos.
-
implemention video filter through FFMpeg in Android
2 octobre 2012, par Deepanjan DasI have a video file and am trying to scale it using -vf argument for ffmpeg "Angel" repo version used in an android project. The build through NDK is going smooth, but when I write this code, the application starts and exits. If I use any other argument other than -vf it works fine and export the video.
JNIEXPORT jint JNICALL Java_com_schemaphic_mirrorapp_jni_NativeHelper_hFlipVideoEffect( JNIEnv *env, jstring outFile ) { //ffplay -i INPUT -vf "crop=iw/2:ih:0:0,split[tmp],pad=2*iw[left]; [tmp]hflip[right]; [left][right] overlay=W/2" //fmpeg -i input -vf scale=iw/2:-1 output //ffmpeg -i input -vf yadif=0:0:0,scale=iw/2:-1 output char** arguments; int count = 6; arguments = calloc( count, sizeof( char* ) ); arguments[0] = "ffmpeg"; arguments[1] = "-i"; arguments[2] = "/sdcard/mirrorapp/cropVideo.mp4"; arguments[3] = "-vf"; arguments[4] = "scale=120:-1"; //arguments[5] = "-aspect"; //arguments[6] = "3:2"; //arguments[5] = "-vcodec"; //arguments[6] = "mpeg4"; /*arguments[9] = "-r"; arguments[10] = "19"; arguments[5] = "-cropright"; arguments[6] = "240"; arguments[7] = "-padleft"; arguments[8] = "0"; arguments[9] = "-padtop"; arguments[10] = "0"; arguments[11] = "-aspect"; arguments[12] = "3:2"; arguments[13] = "-an"; arguments[5] = "-vcodec"; arguments[6] = "mpeg4";*/ //arguments[7] = "-sameq"; arguments[5] = "/sdcard/mirrorapp/cropFlipVideo.mp4"; ffmpeg_main( count, arguments ); //free(arguments); return 1; }
This gives me an impression that the set up is correct. the argument -vf is somehow not working or am not sure of the newer syntax. Kindly help.
-
Converting Videos In the Background ROR 3
2 octobre 2012, par DragonFire353I've searched around on google and have come up with only one site that explains how to do this: http://railsonedge.blogspot.com/2009/01/flash-video-tutorial-with-rails-ffmpeg.html?m=0 I'm already using paperclip and already have everything set up with it and like using it better than the way this site is doing it. Is there a way to convert videos in the background while keeping track of the state of it using paperclip? My Video.rb currently:
class Video < ActiveRecord::Base belongs_to :user has_many :comments, dependent: :destroy attr_accessible :video, :user_id, :video_file_name, :title, :public, :description, :views has_attached_file :video, :styles => { :video => { geometry: "800x480>", format: 'webm' }, :thumb => { geometry: "200x200>", format: 'png', time: 3 }, }, processors: [:ffmpeg], url: "/users/:user_id/videos/:id/:basename_:style.:extension" #process_in_background :video #causes death validates :video, presence: true validates :description, presence: true, length: { minimum: 5, maximum: 100} validates :title, presence: true, length: { minimum: 1, maximum: 15 } validates_attachment_size :video, less_than: 1.gigabytes validates_attachment :video, presence: true default_scope order: 'created_at DESC' Paperclip.interpolates :user_id do |attachment, style|attachment.instance.user_id end def self.search(search) if search find(:all, conditions: ["public = 't' AND title LIKE ?", "%#{search}%"], order: "created_at DESC") else find(:all, conditions: ["public = 't'"], order: "created_at DESC") end end def self.admin_search(search) if search find(:all, conditions: ['title LIKE ?', "%#{search}%"], order: "created_at DESC") else find(:all, order: "created_at DESC") end end end
-
id3 reading from mp3 files
2 octobre 2012, par payali have the below script for reading mp3 files id3.i have checked manually that id3 tags are there in mp3 files but my output always returns for few files MP3 file does not have any ID3 tag!. i am converting these files from ffmpeg when i run the below code for original files it shows the id3 tags but when i run for converted files (by ffmpeg) it is not showing any id3 tags . i have downloaded both original and converted file and check and found that both files is having exactly same tags but the below code give MP3 file does not have any ID3 tag!. for converted file
here is code
<?php $mp3 = "4.mp3"; //The mp3 file. $filesize = filesize($mp3); $file = fopen("4.mp3", "r"); fseek($file, -128, SEEK_END); // It reads the $tag = fread($file, 3); if($tag == "TAG") { $data["title"] = trim(fread($file, 30)); $data["artist"] = trim(fread($file, 30)); $data["album"] = trim(fread($file, 30)); $data["year"] = trim(fread($file, 4)); $data["genre"] = trim(fread($file, 1)); } else die("MP3 file does not have any ID3 tag!"); fclose($file); while(list($key, $value) = each($data)) { print("$key: $value
\r\n"); } ?> -
experiencing memory leakage issues before doing video encoding of images
2 octobre 2012, par AndroidGeekWe are building up Android 3D Animation App. We have quite a few (close to 1000) images.
This is taking time, as we are having memory leakages and next step is to video encoding with ffpmpeg.
Steps which are taken from our side:
- Capture Images identified for encoding
- Save them in cache or buffer
- Exercise the video encoding option on these images using NDK or Command Line Arguments with
FFmpeg
- Append Audio to encoded video
We are experiencing difficulties in second step and this is becoming memory overhead issue. We are using arrays (or hash maps), as mentioned earlier there have been quite a sizable number of images for this video encoding exercise.