Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Compressed mp4 video is taking too long time to play (exoplayer)

    10 août 2018, par User

    Video(mp4) is recorded from android camera and sent to backend, here I am using ffmpeg wrapper to compress the video[44mb video to 5.76mb]. compression is working well, But when I send the video for play in android(exo player), is taking too long time to start.

    below is my code to compress:

     FFmpegBuilder builder = new FFmpegBuilder()
                       .setInput("D:/dummyVideos/myvideo.mp4")     // Filename, or a FFmpegProbeResult
                       .overrideOutputFiles(true) // Override the output if it exists
                       .addOutput("D:/dummyVideos/myvideo_ffmpeg.mp4")   // Filename for the destination
                       .setFormat("mp4")       // Format is inferred from filename, or can be set
                       .disableSubtitle()       // No subtiles
                       .setAudioChannels(1)         // Mono audio
                       .setAudioCodec("aac")       // using the aac codec
                       .setAudioSampleRate(48_000) // at 48KHz
                       .setAudioBitRate(32768)     // at 32 kbit/s
                       .setVideoCodec("libx264")     // Video using x264
                       .setVideoFrameRate(24, 1)     // at 24 frames per second 
                       .setVideoResolution(1280, 720) // at 640x480 resolution
                       .setVideoBitRate(762800)
                       .setStrict(FFmpegBuilder.Strict.EXPERIMENTAL) // Allow FFmpeg to use experimental specs
                       .done();
    

    Can anyone tell me why video is taking too long time to play in exo player? Is anything wrong in the compression?

  • Ffmpeg : Repeate audio loop until image slideshow not finish

    10 août 2018, par Vishal Rathod

    I am working on image slide show with Audio in background, it is working fine but i want it start audio again until slide show not finish.

    This is command that i am using for creating slide show.

    {"-y", "-r", "1/" + duration, "-i", imgPath + "/frame_%5d.jpg", "-ss", "0", "-i", audioPath, "-map", "0:0", "-map", "1:0", "-vcodec", "libx264", "-r", "2", "-pix_fmt", "yuv420p", "-shortest", "-preset", "ultrafast", outputPath}
    
  • Can someone explain the reorder_queue_size option of rtsp input in ffmpeg ?

    10 août 2018, par albert200000

    I can't find any information about it except one sentence in documentation - Set number of packets to buffer for handling of reordered packets.
    Can it help with unstable network or stream? What default value is and what value should be set and when?

  • FFMPEG : Multiple cuts/splices in the same video ? [duplicate]

    10 août 2018, par Brayden

    This question already has an answer here:

    Sorry in advance if this was a duplicate. I couldn't find the solution on Google, since the question is weird to word.

    Anyway, can you use ffmpeg commands to splice videos?

    For example...

    ffmpeg -i MOVIE.mp4 -ss 00:00:00.000 -to 00:06:14.000 -ss 00:07:00.000 -to 00:07:15.000

    You could have multiple -ss and -to commands to basically designate multiple cuts in the video, so that the final result would be from 0:0 to 6:14, and then after that, directly skip to 7:00 and end finally at 7:15. Does that make sense?

    I know you can use real editors for this, but that's a bit more time consuming than to just simply do it here with a command. However, if it doesn't have this feature, it's not a big deal, I was just wondering.

    Thanks!

  • Using Hazel to execute ffmpeg (installed via Homebrew) script to convert video to .gif

    9 août 2018, par benbennybenben

    What I want to do is set Hazel to watch a folder for a new video that I create and then when matched, an embedded FFMPEG script converts the video into a gif.

    I have the matching criteria done, Hazel matching rules

    I have the ffmpeg recipe done,

    ffmpeg -ss 5.0 -t 2.5 -i $1 -r 15 -filter_complex "[0:v] fps=15, scale=500:-1, split [a][b];[a] palettegen [p]; [b][p] paletteuse" $1.gif
    

    But when I put the ffmpeg recipe in the "Embedded Script" dialogue box, I get an error when the match runs.

    2018-08-09 18:43:15.818 hazelworker[68549] [Error] Shell script failed: Error processing shell script on file /Users/bengregory/Scripts/khgfygfjhbvmnb.mp4.
    2018-08-09 18:43:15.818 hazelworker[68549] Shellscript exited with non-successful status code: -900
    

    I'm not sure if it's relevant to mention that I've install ffmpeg via homebrew

    This is what the embedded shell script looks like ffmpeg embedded script

    I've been trying to get this to work for weeks and so far not found anything that helps. I read through this article on how to use handbrakeCLI, but no luck Hazel and HandbrakeCLI tutorial

    Any help would be greatly received! Cheers