Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How to play RTMP video by using libRTMP and SDL ?

    27 avril 2014, par Smeegol Xie

    I want to play RTMP video. The RTMP stream is encoded by flv1 and speex. My solution is to use libRTMP to decode vedio and SDL to draw video image frame by frame, use Speex to decode audio and Audio Queue Services to play audio. First my question is whether is it a perfect solution?

    Now I have already completed the audio decoding and playing work. How do I decode video and play it by using SDL? The color encoding is YUV420, it's easy to convert YUV420 to RGB.My question is how to play RTMP video by using libRTMP and SDL? Can somebody tell me HOW?

  • Android square video record with post proccessing

    27 avril 2014, par bakua

    I to allow users in my app to record video and then post process it. Basically all I need is to video to be square (low res, something about 400x400) and when recording is done then allow user to modify brightness/contrast.

    I did some research on that and found ffmpeg library which can do that. But I'm not sure if I am ok with its licensing. When I use ffmpeg do I have to release my app sources as well? My app will be free to download and use but I am not comfortable with its releasing sources.

    Also about that square recording - as I am supporting API 14, android doesn't let me adjust resolution directly. There are 2 ways I think of:

    1. Record video file in 640x480, then resize/crop and after that allow user to do post processing. - totally need ffmpeg for that
    2. Capture CameraPreviewFrames - crop them as they go and render them into mp4 video, and after video is rendered then allow user to post process it further - need ffmpeg for that as well.

    My question is then - may I use ffmpeg without any worries about licensing etc? Or is there any other library which allows me to do above and is open to use?

    Thanks very much

  • FFMPEG compression - Piping vs File [on hold]

    27 avril 2014, par raaj

    Good Day,

    I have written an application that uses the V4L2 driver to capture H264 Raw frames from a C920. The bytes are output into stdout, and can be piped to a file or any program

    What I am trying to do is this:

    ./capture | ffmpeg -f h264 -i - -b 500000 -vcodec copy out.mp4

    The idea is to capture a raw video and convert it to an mp4 file on the fly. It works perfectly, however, the bit rate compression is never applied. It ends up with a file the same size as the raw file (since the camera outputs a compressed h264 file but in raw frames already)

    However, if I was to do this instead

    ./cature > input.raw

    ffmpeg -i out.mp4 -b 500000 output.mp4
    

    Now, it compresses the file down to a reasonable size. Is there a reason for this? My only current solution right now is to use an alternative like gstreamer (which has issues with h264) or to figure out the ffmpeg API and see if I can add some code to make it do compression on the frames on the fly.

  • Extract audio and video frames from a video [on hold]

    27 avril 2014, par zeitgeist

    I tried to extract video frames using Aforge FFMPEG. But it is quite slow and extracts video quailty is low. Also it doesn't support audio functionality. So I need a library that would be extracting its audio and quality video frames.

    Below code is extracted video frames.

            VideoFileReader reader = new VideoFileReader();
            VideoFileWriter writer = new VideoFileWriter();
            reader.Open(@"D:\Ali\Videos\katy.mp4");
            writer.Open( @"D:\Ali\Videos\katy_.mp4", reader.Width, reader.Height, reader.FrameRate, VideoCodec.MPEG4 );
            Bitmap videoFrame;
            while((videoFrame = reader.ReadVideoFrame()) !=null )
            {
                writer.WriteVideoFrame(videoFrame);
                // dispose the frame when it is no longer required
                videoFrame.Dispose();
            }
    
  • FFmpeg + JWplayer + Mp4 fails

    27 avril 2014, par John Smith

    Im using JWplayer HTML5 6.5.3609, and the newest FFmpeg. This is how I set it up:

    jwplayer("flowplayer1").setup({
        file: '/mp4.file.place'
        width: '100%',
        height: '100%',
        autostart: true,
        stretching: 'exactfit',
        ratio: "100%",
        responsive: true,
        primary: 'html5'
    });
    

    this is a direct access, if I call the MP4 file directly, browser can play it. I create this MP4 from standalone images:

    ffmpeg -f image2 -r 1 -i img%d.png x.mp4
    

    and no joy. I even tried to add some codecs:

    -vcodec libx264 -acodec libfaac
    

    still not work, I got this:

    error loading media: file could not be played
    

    the joke is, I tried it with FLV and it did worked... VLC player can play the MP4 file too