Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • encoding .avi file from bytearray using ffmpeg in javacv or java

    24 janvier 2012, par Ashwin Yakkundi

    I have converted an .avi file into byte[]. What I need to do is to convert the byte[] back to the original .avi file in java or javacv preferably using ffmpeg.

    The following is the code I used for conversion from .avi into byte[]

    import com.googlecode.javacv.cpp.opencv_core.IplImage;
    import com.googlecode.javacv.CanvasFrame;
    import com.googlecode.javacv.FFmpegFrameGrabber;
    
    import java.io.BufferedInputStream;
    import java.io.DataInputStream;
    import java.io.File;
    import java.io.FileInputStream;
    
    public class VideoDemoTest1{
    
        public static void main(String[] args) throws Exception {
            String filename = "/home/ashwin/Desktop/cow.avi";
    
            FileInputStream fis = new FileInputStream (filename);
            DataInputStream dis = new DataInputStream(fis);
            int length = dis.available();
            System.out.println("length of InputStream = " + length);
    
            byte[] videoByteArray = new byte[(int) length];
    
            // Read in the bytes
            int offset = 0;
            int numRead = 0;
            while (offset < videoByteArray.length
                   && (numRead = dis.read(videoByteArray, offset, videoByteArray.length - offset)) >= 0) {
                        offset += numRead;
            }
    
            System.out.println("length of videoByteArray is " + videoByteArray.length);
        }
    }
    
  • How do i install ffmpeg on windows 7 [migrated]

    24 janvier 2012, par ubercooluk

    Im using windows 7 and Zend server for my php.I have fed up completely searching and trying every methods of installation found on internet.luckly i installed it well on my ubuntu machine at my home.Hoping to find a good solution i mean clear way of installing ffmpeg in windows 7

  • HTTP Live Streaming MPEG TS segment

    23 janvier 2012, par user1069624

    I'm using FFMPEG and a free segmenter (Carson Mcdonald's) to produce my ts segments which i later save to a web server and play with Quicktime by playing the .m3u8

    If I have segments 1,2,3,4 and another stream with segments 1,2,3,4 and would like to interleave them what should I do. If i do as follows: 1,2, other stream's 3, 4 It works fine. However, If i want to do as follows: 1,2, other stream's 4, 4 it doesn't work.

    In other words the segment to be added must have the same number as the one I'm replacing. Why is that? Does it have to do with PCR? I would like to be able to interleave any segment anywhere.. How can I do that?

    Thank you,

    The M3U8 file is

    #EXTM3U 
    #EXT-X-TARGETDURATION:10 
    #EXT-X-MEDIA-SEQUENCE:21 
    #EXTINF:10, sample_ep_386k-00021.ts 
    #EXTINF:10, media_2.ts 
    #EXTINF:10, sample_ep_386k-00023.ts
    
  • Best Overall FFMPEG FLV Quality

    23 janvier 2012, par dcolumbus

    First of all, FFMPEG has the worst documentation of all time... secondly, the syntax is so trivial that it's hard to understand what some lines are doing.

    What I'm looking to accomplish is the best quality FLV with the lowest file size. After all, isn't that everyone's goal? These video will be streamed if that makes a difference.

    Perhaps some of you have command lines that do just this... for now, my video are no wider than 320... some are widescreen and so their heights are little smaller than 240.

    As it stands, the quality of the converted FLV's are quite poor...

    -i video.mov -ar 22050 -ab 32 -f flv -s 320x240 -aspect 4:3 video.flv

  • PHP ffmeg - ffmpeg_animated_gif err

    22 janvier 2012, par Oleg Beat

    I have a code

    $movie = new ffmpeg_movie($_SERVER["DOCUMENT_ROOT"].'/file.mp4'); 
    $gif=new ffmpeg_animated_gif("gif_pre.gif",100 ,100 ,24); 
    
    for ($frame = 150; $frame <= 200; $frame++) 
    {
       $image = $movie->getFrame($frame);
       $gif->addFrame($image);
    }
    

    and error:

    Fatal error: Class 'ffmpeg_animated_gif' not found in {here were err line and path to file}
    

    OS: Windows 7 | Denwer | FFMPEG: 0.6.0-svn

    phpinfo:

    mpeg-php version    0.6.0-svn 
    ffmpeg-php built on     Sep 8 2010 12:13:47 
    ffmpeg-php gd support   enabled 
    ffmpeg libavcodec version   Lavc52.87.4 
    ffmpeg libavformat version  Lavf52.78.3 
    ffmpeg swscaler version     SwS0.11.0