Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Ffmpeg : how to keep orientation when trimming video file ?

    7 mars 2013, par Alex

    I have a video file which I capture from my Android program and save as an mp4 video.

    In this my Android program I use

    setOrientationHint(90)

    call to indicate to a videoplayer that my camera has been rotated 90 degrees.

    I'm not really sure what setOrientationHint(90) does but with it I can see the file properly oriented when it plays in the video player. If not, then a video player orients my file incorrectly.

    Now I trim this file using FFMPEG command (here in.mp4, out.mp4, 1000 and 2000 are just for example)

    ffmpeg -i in.mp4 -ss 1000 -t 2000 -vcodec copy -acodec
    

    However, the resulting file is again wrongly oriented in the player.

    I wonder what should I do to keep the orientation hint in the trimmed video file?

  • aac-eld decoding in Linux

    7 mars 2013, par bernard

    I was in Vietnam and tried to learn Vietnamese.

    The difficult thing is to learn the pronunciation and I made an Android App to record voices. Vietnamese people are very nice and I collected more than 500 sound files.

    Now I'm trying to make a language learning app. To do that I try to reduce noise and normalize volume.

    I have chosen the following settings:

    this.recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
    this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC_ELD);
    this.recorder.setAudioEncodingBitRate(96000);
    this.recorder.setAudioSamplingRate(44100);
    

    (cordova AudioPlayer.java - default settings are crap)

    Now I have a problem. I'm not able to open the files with Audacity or FFmpeg.

    ./ffmpeg -i /tmp/speaker__ualp__x%E1%BA%A5u.mp4 /tmp/uu.wav
    ffmpeg version 1.1.2 Copyright (c) 2000-2013 the FFmpeg developers
      built on Feb 20 2013 10:50:54 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
      configuration: --enable-libfdk-aac
      libavutil      52. 13.100 / 52. 13.100
      libavcodec     54. 86.100 / 54. 86.100
      libavformat    54. 59.106 / 54. 59.106
      libavdevice    54.  3.102 / 54.  3.102
      libavfilter     3. 32.100 /  3. 32.100
      libswscale      2.  1.103 /  2.  1.103
      libswresample   0. 17.102 /  0. 17.102
    [aac @ 0xaada980] Audio object type 39 is not supported.
        Last message repeated 1 times
    Guessed Channel Layout for  Input Stream #0.0 : mono
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/speaker__ualp__x%E1%BA%A5u.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 0
        compatible_brands: isom3gp4
        creation_time   : 2013-01-29 15:53:11
      Duration: 00:00:01.21, start: 0.000000, bitrate: 116 kb/s
        Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 96 kb/s
        Metadata:
          creation_time   : 2013-01-29 15:53:11
          handler_name    : SoundHandle
    [aac @ 0xaada980] Audio object type 39 is not supported.
    Output #0, wav, to '/tmp/uu.wav':
      Metadata:
        major_brand     : isom
        minor_version   : 0
        compatible_brands: isom3gp4
        Stream #0:0(eng): Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
        Metadata:
          creation_time   : 2013-01-29 15:53:11
          handler_name    : SoundHandle
    Stream mapping:
      Stream #0:0 -> #0:0 (aac -> pcm_s16le)
    Error while opening decoder for input stream #0:0
    

    What can I do?

  • Tell libavcodec/ffmpeg to drop frame

    7 mars 2013, par chouquette

    I'm building an app in which I create a video. Problem is, sometime (well... most of the time) the frame acquisition process isn't quick enough.

    What I'm currently doing is to skip the current frame acquisition if I'm late, however FFMPEG/libavcodec considers every frame I pass to it as the next frame in line, so If I drop 1 out of 2 frames, a 20seconds video will only last 10. More problems come in as soon as I add sound, since sound processing is way faster...

    What I'd like would be to tell FFMPEG : "last frame should last twice longer that originally intended", or anything that could allow me to process in real time.

    I tried to stack the frames at a point, but this ends up killing all my memory (I also tried to 'stack' my frames in the hard drive, which was way to slow, as I expected)

    I guess I'll have to work with the pts manually, but all my attempts have failed, and reading some other apps code which use ffmpeg, such as VLC, wasn't of a great help... so any advice would be much appreciated!

    Thanks a lot in advance!

  • ffmpeg series of image overlay at specific interval ?

    7 mars 2013, par Sandeep Manne

    I am generating series of images for text scrolling, I need to overlay those images on a video at specific interval (for example from 10-15sec), how can we do that using ffmpeg?

  • How to estimate I frame motion degree ?

    7 mars 2013, par Greper

    I am measuring video quality using the video's I frames. But I found some I frames contains motion,for example a dancing MV. As a result it is inaccurate to measure the sharpness of a video according to these kind of I frames. How can I eliminate these kind of I frames? Can FFMPEG provide some information to estimate the motion degree of the I frame? I thought of useing I frame and its subsequent P frames's motion vector to estimate the motion degree of the current I frame. But I am not familar with ffmpeg, don't know how to estimate the motion degree of I frame. Thanks for any help.