Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • converting .mov wrapper with amr_nb audio codec to aac/mp4a codec

    9 janvier 2012, par Wonjoon Lee

    I am trying to implement a video messaging feature for cross platform(Android/iPhone) app. Currently, the app on Android records the video with AMR narrowband in .mov wrapper and iPhone cannot play this video. The backend is centos 5.5 and I am wondering if ffmpeg is useful for transcoding this.

  • FFMPEG in android issue

    9 janvier 2012, par Antu

    I have successfully compiled the FFMPEG library to android using NDK. (using Rock Player FFMPEG implementation)http://www.rockplayer.com/download/rockplayer_ffmpeg_git_20100418.zip

    I know that FFMPEG supports .avi, divX, mov ect. But I created a mediaplayer and tried to run them but I was not able to play them. I is this the right way to use the FFMPEG library. Can Any one Help.I am able to play defaut video, mp4, 3gp etc. Here is the code for mediaplayer

       public native String  stringFromJNI();
          static {
             System.loadLibrary("ffmpeg");
             System.loadLibrary("ffmpeg-test-jni");
                 }
        @Override
          public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
    
    
        setContentView(R.layout.main);
    
        TextView  tv =(TextView) findViewById(R.id.textView1);
        tv.setText( stringFromJNI() );
    
    
        System.gc();
    
        Log.d("Video FFmpeg ", "**");
    
        getWindow().setFormat(PixelFormat.TRANSLUCENT);
        String filepath = Environment.getExternalStorageDirectory()+"/simple.avi";
    
        Log.d("File path", filepath);
    
        MediaController mc = new MediaController(this); 
    
        VideoView video=(VideoView) findViewById(R.id.video);
        mc.setMediaPlayer(video);
        video.setVideoPath(filepath);
        video.setMediaController(mc);
        mc.show();
        //video.setVideoPath("/mnt/sdcard/Movies/Ishq-Hothon-Se.3gp");
    
        video.start();     
        View nextButton = findViewById(R.id.button1);
        nextButton.setOnClickListener(this);
        }
    
    
    
      @Override
      public void onClick(View v) {
      // TODO Auto-generated method stub
      Intent i=new Intent(this,NextVideo.class);
       startActivity(i);
    
      }
    
      }
    
  • playing .avi,divx,mov video formats in android

    9 janvier 2012, par John

    I am developing an android project in which i need to play .avi,mov,divx format videos.I think android doesn't support these formats.

    I have downloaded ffmpeg codec and loaded the library "libffmpeg.so" in my project using android ndk and JNI.

    Now,how can i use this "libffmpeg.so" to play those video formats.
    

    My project directory structure is like this.

    enter image description here

    Any one please help.

  • Why Recode Video FFMPEG on windows Allway Error ?

    9 janvier 2012, par ALexF

    i download ffmpeg in: http://ramiro.arrozcru.org/ffmpeg-vfwcap-noflip.7z

    and run it with commanline: ffmpeg -r 25 -f vfwcap -i 0 output.avi

    but allway error is

    ffmpeg -r 25 -f vfwcap -i 0 output.avi FFmpeg version SVN-r22915, Copyright (c) 2000-2010 the FFmpeg developers built on Apr 20 2010 00:09:08 with gcc 4.4.2 configuration: --enable-memalign-hack --cross-prefix=i686-mingw32- --cc=ccach -i686-mingw32-gcc --arch=i686 --target-os=mingw32 --enable-gpl --enable-libx264 --enable-pthreads libavutil 50.14. 0 / 50.14. 0 libavcodec 52.66. 0 / 52.66. 0 libavformat 52.61. 0 / 52.61. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0.10. 0 / 0.10. 0 [vfwcap @ 012eba60]Could not connect to device. 0: Error number -19 occurred

    Link Image:http://nh8.upanh.com/b2.s8.d2/9b09371490590cdabef397ea7705b304_39810848.programmanager20120109110016.png

    why it error, can you fix my commnaline

  • ffmpeg creates empty flv files

    8 janvier 2012, par user1136924

    I'm trying to build avi to flv converter with c#. i'm using this code below (taken from here) but it produces empty flv files. please help figure this this out.

    on an button click the program takes the uploaded file from the upload box and creates a new flv file from it.

    thanks!

    protected void btn_Submit_Click(object sender, EventArgs e)
    {
        ReturnVideo(this.fileuploadImageVideo.FileName);
    }
    private bool ReturnVideo(string fileName)
    {
        string html = string.Empty;
        //rename if file already exists
    
        int j = 0;
        string AppPath;
        string inputPath;
        string outputPath;
        string imgpath;
        AppPath = Request.PhysicalApplicationPath;
        //Get the application path 
        inputPath = AppPath + "OriginalVideo";
        //Path of the original file 
        outputPath = AppPath + "ConvertVideo";
        //Path of the converted file 
        imgpath = AppPath + "Thumbs";
        //Path of the preview file 
        string filepath = Server.MapPath("~/OriginalVideo/" + fileName);
        while (File.Exists(filepath))
        {
            j = j + 1;
            int dotPos = fileName.LastIndexOf(".");
            string namewithoutext = fileName.Substring(0, dotPos);
            string ext = fileName.Substring(dotPos + 1);
            fileName = namewithoutext + j + "." + ext;
            filepath = Server.MapPath("~/OriginalVideo/" + fileName);
        }
        try
        {
            this.fileuploadImageVideo.SaveAs(filepath);
        }
        catch
        {
            return false;
        }
        string outPutFile;
        outPutFile = "~/OriginalVideo/" + fileName;
        int i = this.fileuploadImageVideo.PostedFile.ContentLength;
        System.IO.FileInfo a = new System.IO.FileInfo(Server.MapPath(outPutFile));
        while (a.Exists == false)
        {
    
        }
        long b = a.Length;
        while (i != b)
        {
    
        }
    
    
        string cmd = " -i \"" + inputPath + "\\" + fileName + "\" \"" + outputPath + "\\" + fileName.Remove(fileName.IndexOf(".")) + ".flv" + "\"";
        ConvertNow(cmd);
       string imgargs = " -i \"" + outputPath + "\\" + fileName.Remove(fileName.IndexOf(".")) + ".flv" + "\" -f image2 -ss 1 -vframes 1 -s 280x200 -an \"" + imgpath + "\\" + fileName.Remove(fileName.IndexOf(".")) + ".jpg" + "\"";
       ConvertNow(imgargs);
    
    
        return true;
    }
    private void ConvertNow(string cmd)
    {
        string exepath;
        string AppPath = Request.PhysicalApplicationPath;
        //Get the application path 
        exepath = AppPath + "ffmpeg.exe";
        System.Diagnostics.Process proc = new System.Diagnostics.Process();
        proc.StartInfo.FileName = exepath;
        //Path of exe that will be executed, only for "filebuffer" it will be "flvtool2.exe" 
        proc.StartInfo.Arguments = cmd;
        //The command which will be executed 
        proc.StartInfo.UseShellExecute = false;
        proc.StartInfo.CreateNoWindow = true;
        proc.StartInfo.RedirectStandardOutput = false;
        proc.Start();
    
        while (proc.HasExited == false)
        {
    
        }
    }