Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Transcode HLS Segments individually using FFMPEG

    27 mai 2013, par rayh

    I am recording a continuous, live stream to a high-bitrate HLS stream. I then want to asynchronously transcode this to different formats/bitrates. I have this working, mostly, except audio artefacts are appearing between each segment (gaps and pops).

    Here is an example ffmpeg command line:

    ffmpeg -threads 1 -nostdin -loglevel verbose \
       -nostdin -y -i input.ts -c:a libfdk_aac \
       -ac 2 -b:a 64k -y -metadata -vn output.ts
    

    Inspecting an example sound file shows that there is a gap at the end of the audio:

    End

    And the start of the file looks suspiciously attenuated (although this may not be an issue):

    Start

    My suspicion is that these artefacts are happening because transcoding are occurring without the context of the stream as a whole.

    Any ideas on how to convince FFMPEG to produce audio that will fit back into a HLS stream?

    ** UPDATE 1 **

    Here are the start/end of the original segment. As you can see, the start still appears the same, but the end is cleanly ended at 30s. I expect some degree of padding with lossy encoding, but I there is some way that HLS manages to do gapless playback (is this related to iTunes method with custom metadata?)

    Original Start Original End

    ** UPDATED 2 **

    So, I converted both the original (128k aac in MPEG2 TS) and the transcoded (64k aac in aac/adts container) to WAV and put the two side-by-side. This is the result:

    Side-by-side start Side-by-side end

    I'm not sure if this is representative of how a client will play it back, but it seems a bit odd that decoding the transcoded one introduces a gap at the start and makes the segment longer. Given they are both lossy encoding, I would have expected padding to be equally present in both (if at all).

    ** UPDATE 3 **

    According to http://en.wikipedia.org/wiki/Gapless_playback - Only a handful of encoders support gapless - for MP3, I've switched to lame in ffmpeg, and the problem, so far, appears to have gone.

    For AAC (see http://en.wikipedia.org/wiki/FAAC), I have tried libfaac (as opposed to libfdk_aac) and it also seems to produce gapless audio. However, the quality of the latter isn't that great and I'd rather use libfdk_aac is possible.

  • can any one give a script in linux if we copy the video it should be automatically encoded [closed]

    27 mai 2013, par user2423743

    can any one give a script that in a folder if we copy the video file it should be encoded with ffmpeg automatically and it should be moved destination folder renamed with name and date.Help please it's urgent.sorry for english

  • build vlc for iOS, can't pass the libdvbpsi configuration

    27 mai 2013, par user2223169

    I want to build a vlc armv7 library for iOS application, I download the src from http://www.videolan.org/vlc/download-ios.html and make some changes to the build script I chosen the iOSSDK6.1, MACOS10.8 for build settings My environment is MACOS 10.8.3 Xcode 4.6.2 with SDK 6.1

    I run the build_for_iOS.sh in lc/extras/package/ios when config the libdvbpsi, I got this ERROR:

    configure: error: C preprocessor "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-cpp-4.2" fails sanity check See `config.log' for more details. make[1]: * [.dvbpsi] Error 1 make: * [using-src] Error 2

    I searched for google, but almost no solution Anyone can help me? HELP!

  • What color model do video containers use ? [closed]

    26 mai 2013, par Little Child

    I would like to ask what color models are used in different video containers like flv, mpg, avi, 3gp etc. So far, wikipedia was of little help

  • H.264 is patented. What happens when developing a commercial app in Android using H264 codec in ffmpeg ? [closed]

    26 mai 2013, par user1914692

    H.264 is patented.

    In countries where patents on software algorithms are upheld, vendors and commercial users of products that use H.264/AVC are expected to pay patent licensing royalties for the patented technology[14] that their products use.

    What happens when developing a commercial app in Android using H264 codec in ffmpeg?

    Here there are two situations: (1) decode online video stream, and display it.

    (2) encode contents to a video file using H.264.

    [Update:] From what I googled, here are some simple pieces of information: (1) decode: free (2) encode: H.264 encoded internet video that is free to end users will never be charged royalties.
    On August 26, 2010 MPEG LA announced that H.264 encoded internet video that is free to end users will never be charged royalties. See Wiki H.264 (3) encode: for other situations except the one in (2), I guess it might be for commercial use.

    For more, see Ref: "Know your rights: H.264, patent licensing, and you" 2010/05/04