Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Recording Audio on website : Red5 stream or posting the audio data ?

    7 septembre 2011, par 8vius

    Let me first establish what I want to do:

    My user is able to record voicenotes on my website, add tags to said notes for indexing as well as a title. When the note is saved I save the path of the note along with the other info in my DB.

    Now, I have 2 choices to do the recording, both involve a .swf embedded in my site:

    1) I could use Red5 server to stream the audio to my server and save the file and return the path to said file to my app to do the DB saving, seems rather complicated since I would have to convert the audio and move it to the appropriate folder that belongs to the user in a server side Red5 app, which I'm not very aware of how to build.

    2) I could simply record the audio and grab its byte array, do a Base64 encoding on it and send it to PHP along with the rest of the data that is necessary (be it by a simple POST or an AJAX call), decode it on the server and make the file with the appropriate extension, audio conversion would also occur here using ffmpeg, this option seems simpler but I do not know how viable it is.

    What option would you say is more viable and easier to develop? Thanks in advance

  • can i mux h264 stream into mp4(aac) through libavformat without libx264 ?

    6 septembre 2011, par Faller

    i just have h.264 encoded video stream and i want to make mp4 file.

    /* find output format for mp4 */

    m_pOutputFormat= av_guess_format("mp4", NULL, NULL);

    if (!m_pOutputFormat) return FALSE; // could not find suitable output format(mp4).

    on this code, i get mpeg for video codec not h264, i think that's because i build ffmpeg without libx264. (and i dont want to build ffmpeg with libx264 for license)

    m_pOutputFormat->video_codec= CODEC_ID_H264;

    when i change its video_codec to CODEC_ID_H264, it works fine some player(kmplayer). but it's not work on ipod, QuickTime.

    this code maybe wrong because it could not change codec_tag value(this variable has const property).


    1. how can i get other result for av_guess_format("mp4",NULL,NULL) without recompile libav+libx264?

    2. how can i make mp4 file properly?

  • how to convert mp4 to mp3 by ffmpeg ? [migrated]

    6 septembre 2011, par user916350

    I need convert from mp4 video to mp3 (extracting audio track) by ffmpeg. I can do that for .flv -> mp3, but I don't know command line parameters for mp4->mp3. For example, for flv->mp3: 'ffmpeg -i video.flv -acodec copy audio.mp3'. Tell me parameters for mp4->mp3 please. Thank you, anyway.

  • Issue with Decoding H.263 Sorenson Spark D frames

    6 septembre 2011, par nitin goyal

    I am trying to decode the H.263 sorenson type of data using avcodec_decode_video function.

    It is able to decode the I and P frames but i have some D frames (Disposable inter frames) in my data and this function is not able to decode these frames and I am getting zero as return value.

    So, can somebody tells me how we can decode these type f frames as I am not finding any mention of D frame sin the ENUM value also.

    I have read somewhere that we can convert D frames into P frames but if we have raw data how we achieve that if we want to use the decode function directly.

  • Java - xuggle/ffmpeg - moov atom not found

    5 septembre 2011, par Mark Design

    I am trying to read a mov file from local using Xuggle. This gives me the following error:

    30-mag-2011 15.56.55 com.xuggle.ferry.NativeLogger log
    GRAVE: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x102840600] moov atom not found
    

    The problem is that until two minutes before it didn't give any error and the code was the same.

    However, I discover this:

    If I open the IContainer using a byte array it doesn't work and gives me the error:

    ByteArrayInputStream b = new ByteArrayInputStream(file);
    DataInputStream data = new DataInputStream(b);
    IContainer container = IContainer.make();
    if (container.open(data, null) < 0)
        throw new IllegalArgumentException("E001 - Cannot open the container");
    

    if I open the IContainer using a temporary file it works.

    File temp = File.createTempFile("temp_", ".mov");
    
    try
    {
        FileOutputStream fos = new FileOutputStream(temp);
        fos.write(file);
        fos.close();
    }
    catch(FileNotFoundException e)
    {
        System.out.println(e);
    }
    
    IContainer container = IContainer.make();
    
    if (container.open(temp.toString(), IContainer.Type.READ, null) < 0)
        throw new IllegalArgumentException("E001 - Cannot open the container");
    

    any suggestions?

    Thanks! Mark