Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Transloadit : How can I replace audio track of a given video ?

    1er septembre 2014, par Stan Wiechers

    I am having trouble forming the steps that would replace/set the audio track of an mp4. Here is my code:

     require "open-uri"
     transloadit = Transloadit.new(:key => ENV['TRANSLOADIT_AUTH_KEY'],:secret => ENV['TRANSLOADIT_AUTH_SECRET'])
     video_encode = transloadit.step('video_encode', '/video/encode', use: ":original",ffmpeg_stack: "v2.0.0", ffmpeg: { i: "http://www.stephaniequinn.com/Music/Allegro%20from%20Duet%20in%20C%...;", map:"1:0", vcodec:"copy", acodec:"copy"}) 
     store = transloadit.step('store', '/s3/store', :key => ENV['S3_ACCESS_KEY'], :secret => ENV['S3_SECRET_ACCESS_KEY'], :bucket => ENV['S3_BUCKET'])
     assembly = transloadit.assembly(:steps => [ video_encode, store ] )
     response = assembly.submit! open('http://techslides.com/demos/sample-videos/small.mp4')
    

    I am getting this message:

     'Unable to find a suitable output format'
    

    Could someone tell me how parametrize ffmpeg and transloadit to set the audio track of a given mp4? I tried many variations without any luck.

  • This program is only provided for compatibility and will be removed in a future release. Please use avconv instead [duplicate]

    1er septembre 2014, par Reshma R Panicker

    This question already has an answer here:

    I am using ffmpeg for uploading videos.

    While uploading some mp4 files, it shows an error :-

    ffmpeg version 0.8.10-6:0.8.10-0ubuntu0.12.10.1, Copyright (c) 2000-2013 the Libav      developers
    built on Feb  6 2014 20:56:10 with gcc 4.7.2
    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release.     Please use avconv instead.
    

    Please help me to find some solution.

  • FFMPEG : Redirecting MP4 muxed data to socket using movflags resets timestamp

    1er septembre 2014, par Parth Shah

    I am using FFMPEG library to mux H.264 and AAC frames to MP4 file. I do that C program. I store H.264 and AAC frame's timestamp in epoch format.

    I use ffprobe to check timestamps that stored in the MP4 file, ffprobe confirms that file is in MP4 format and timestamps are stored correctly. below is the output of ffprobe.

    ffprobe -show_packets 20140805095931.mp4

        Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20140805095931.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf54.29.104
      Duration: 00:01:39.70, start: 1407232771.984000, bitrate: 1063 kb/s
        Stream #0.0(und): Video: h264 (High), yuv420p, 960x540, 999 kb/s, 30 fps, 59.94 tbr, 1k tbn, 60 tbc
        Stream #0.1(und): Audio: aac, 48000 Hz, mono, s16, 53 kb/s
    [PACKET]
    codec_type=video
    stream_index=0
    pts=1407232771984
    pts_time=1407232771.984000 
    dts=1407232771984
    dts_time=1407232771.984000 
    duration=34
    duration_time=0.034000 
    size=24556.000000 
    pos=48
    flags=K
    [/PACKET]
    [PACKET]
    codec_type=video
    stream_index=0
    pts=1407232772018
    pts_time=1407232772.018000 
    dts=1407232772018
    dts_time=1407232772.018000 
    duration=33
    duration_time=0.033000 
    size=3180.000000 
    pos=24604
    flags=_
    [/PACKET]
    [PACKET]
    codec_type=video
    stream_index=0
    pts=1407232772051
    pts_time=1407232772.051000 
    dts=1407232772051
    dts_time=1407232772.051000 
    duration=33
    duration_time=0.033000 
    size=3209.000000 
    pos=27784
    flags=_
    [/PACKET]
    

    My goal is reading this muxed MP4 data from MP4 file and send this muxed mp4 data to the client over socket without creating any temporary file. My actual goal is to write a C program though.

    I tried using protocols tcp and udp but they are not working with Mp4 format and gives error as below.

    ffmpeg -i 20140805095931.mp4 -f mp4 -vcodec copy tcp://10.99.19.163:8888

    [mp4 @ 0xb1e1920] muxer does not support non seekable output
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument

    So, I read somewhere about moov atom and tried it with following command

    ffmpeg -i 20140805095931.mp4 -movflags isml+frag_keyframe -f mp4 -vcodec copy tcp://10.99.19.163:8888

    using above commandline I am able to send mp4 file to the client using tcp protocol that ffmpeg supports.

    But when I apply ffprobe on the MP4 file timestamp resets to 0 , even starttime becomes 0.0000. Below is the output of ffmpeg.

    ffprobe -show_packets out.mp4

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf55.48.100
      Duration: 00:01:39.71, start: 0.000000, bitrate: 1059 kb/s
        Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x540, 999 kb/s, 30 fps, 30 tbr, 16k tbn, 60 tbc (default)
        Metadata:
          handler_name    : VideoHandler
        Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 53 kb/s (default)
        Metadata:
          handler_name    : SoundHandler
    [PACKET]
    codec_type=video
    stream_index=0
    pts=0
    pts_time=0.000000
    dts=0
    dts_time=0.000000
    duration=533
    duration_time=0.033313
    convergence_duration=N/A
    convergence_duration_time=N/A
    size=24556
    pos=3853
    flags=K
    [/PACKET]
    [PACKET]
    codec_type=video
    stream_index=0
    pts=544
    pts_time=0.034000
    dts=544
    dts_time=0.034000
    duration=533
    duration_time=0.033313
    convergence_duration=N/A
    convergence_duration_time=N/A
    size=3180
    pos=28409
    flags=_
    [/PACKET]
    [PACKET]
    codec_type=video
    stream_index=0
    pts=1072
    pts_time=0.067000
    dts=1072
    dts_time=0.067000
    duration=533
    duration_time=0.033313
    convergence_duration=N/A
    convergence_duration_time=N/A
    size=3209
    pos=31589
    flags=_
    [/PACKET]
    

    Any help or advice? Thank you in advance.

  • Code library for image processing [on hold]

    1er septembre 2014, par user3928079

    Dear Stack Overflow Users,

    I am looking to create my programming portfolio as a graduate of Kennesaw State University by July 2015, when I graduate. I want to create at least 3 cross platform programs related to video or animation. In the package there will be a program for playing video and music files, a program for converting video and music files, and either a program upscaling video and image files or a program that helps animators create animation like Flipbook Pro. Since Java is cross platform, and Java is the language I'm more comfortable with, I'll develop the software in Java, unless of course Python is cross platform as well. May you please recommend me some image processing libraries that will help me accomplish the development of these types of software programs. For the upscaling program, an upscaling algorithm from BenVista called S-Spline Max is needed, especially since I want to preserve the detail of the image, because in upscaling, you are unable to gain new information from the original information. What are some good image processing libraries I can use. I know of OpenCV, but what do a lot of programs use, high profile or low profile, like Adobe Premiere Pro or Davinci Resolve. FFMPEG is a good video library, but can it easily accomplish what I need? What are some others that can help me in my 11 month long quest?

    Regards,

    Jordan White

  • Detect audio channel changes in a .ts file with ffmpeg [on hold]

    1er septembre 2014, par user3995561

    I have a MPEG2-TS TV recording which is on my pc as a .ts file. Within this file I would like to detect the exact time when the audio channel is switching from for example AC3 6ch to AC3 2ch and vice versa. How is this possible without having ffmpeg go through every frame of the recording and parsing its output with a script?