Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • ffmpeg - Creating slideshow from different image types

    17 mai 2019, par Alexandru Antochi

    I'm trying to create a slideshow with 50 images, but I get these errors on some of them. All of the images have .jpg extension, but the ones failing were .png and I changed the extension

    ffmpeg.exe -r 1/5 -i %02d.jpg -vf "scale=-1:720,pad=1280:ih:(ow-iw)/2" -y -an out.mp4

    The images open in any image viewer but it seems that ffmpeg fails to read them if they have the .jpeg extension. Any way to keep the original image extension and add it to the slideshow?

  • How to have avbin.dll in a local directory (not C :\Windows\System) (for pyglet 1.2.4)

    16 mai 2019, par Doot

    Using pyglet 1.2.4, I am using avbin.dll to allow me to play audio and all sources say it needs to go into C:\Windows\System. This works, but I would like to put in in a local folder, so that when it is downloaded, the user does not need to explicitly put it there.

    How can I make it so that I specify the directory of avbin.dll/have in the same folder as the code?

    Here, avbin.dll is in the folder with the code, but I can't find how they did it. https://github.com/surajsinghbisht054/Python-Media-Player/tree/master/Python%20Media%20Player%20Version%200.0.1/Tools I tried going through it but I didn't find anything

    I tried

    pyglet.options["search_local_libs"]
    

    but it was already set to true.

    I also added it to the path variable, but this didn't change anything.

    The intention was to be able to play audio files.

    Additionally: Using pyglet 1.4, I tried using ffmpeg and ffmpeg-pyglet, which works great, except that pyglet.app.run() is required to stop the first part of the track playing on repeat, but its mainloop interferes with tkinter's and I can't seem to get either working in threads, which is why I reverted back to 1.2.4.

  • ffmpeg Using -movflags faststart

    16 mai 2019, par user3571514

    I tried to use the command -movflags faststart

    And got the following error:

    Microsoft Windows [Version 6.0.6002] Copyright (c) 2006 Microsoft Corporation. All rights reserved.

    C:\uploads\1\videos>ffmpeg -i simple1.mp4 -codec copy -map 0 -movflags faststart output.mp4

    -movflags faststart output.mp4 ffmpeg version N-34549-g13b7781, Copyright (c) 2000-2011 the FFmpeg developers built on Nov 6 2011 22:02:08 with gcc 4.6.1 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger - -enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable- libxvid --enable-zlib libavutil 51. 24. 0 / 51. 24. 0 libavcodec 53. 28. 0 / 53. 28. 0 libavformat 53. 19. 0 / 53. 19. 0 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 47. 0 / 2. 47. 0 libswscale 2. 1. 0 / 2. 1. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'simple1.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf54.29.104 Duration: 00:02:32.81, start: 0.000000, bitrate: 1166 kb/s Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 854x480 [ SAR 1:1 DAR 427:240], 1064 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, s16, 93 kb /s Metadata: handler_name : [mp4 muxer @ 04179D00] [Eval @ 0027DAB8] Undefined constant or missing '(' in 'f aststart'

    [mp4 muxer @ 04179D00] Unable to parse option value "faststart"

    [mp4 muxer @ 04179D00] Error setting option movflags to value faststart.

    Output #0, mp4, to 'output.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf54.29.104 Stream #0:0(und): Video: h264, yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-3 1, 1064 kb/s, 29.97 fps, 90k tbn, 29.97 tbc Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac, 44100 Hz, mono, 93 kb/s Metadata: handler_name : Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy)

    Could not write header for output file #0 (incorrect codec parameters ?)

  • Set delay when create gif from pictures with FFMPEG + Transparent pictures + Organization

    16 mai 2019, par Hobyrr

    I'm trying to create a GIF from pictures, then I've three questions.

    Actually, this command works fine :

    -framerate 2 -i /data/data/com.example.apptest_ffmpeg_24/pic/%03d.jpg /data/data/com.example.apptest_ffmpeg_24/files/out3.gif
    

    But, i want to set a real delay between each picture, not make a random frame rate, is there any solution ?

    Well, i tried to add pictures with transparent background, but they just weren't add to the GIF, like they don't exist. Any solution?

    Last question ! To create a GIF, i have to add all pictures in the same folder, with a regex names ( here %03d.jpg : 001.jpg, 002.jpg, etc...). Is there any solution to just pass a list of pictures in the command?

    Thank you for your help!

  • ffmpeg concat of mp4s jumps and pauses a few seconds on the joins

    16 mai 2019, par callunaballuna

    I am using ffmpeg to create chunks of 10 second mp4(h265) video. I am using image2pipe as this seems to have a less of an impact on the cpu, the command line is:

    -y -threads 1 -framerate " & FrameRate & " -f image2pipe -i pipe:.jpg -vf format=yuv420p -c:v libx265 -preset ultrafast -crf 28 -vsync vfr " & strSaveDirectory

    I am then concatanating these video chunks using:

    "-f concat -safe 0 -i " & strConcatAVIs & " -c copy " & outPutPath

    If I play each of the 10 second mp4s they appear to be complete but when they are merged to one file sometimes there will be a pause on a join of a few seconds and sometimes the video will jump 3 or 4 seconds on a join.

    Typically this is the descrtiption of a couple of files:

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Temp\testmp4\video_1_1_2_2019_5_13_13_15_10.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2mp41
        encoder         : Lavf58.20.100
      Duration: 00:00:09.85, start: 0.000000, bitrate: 225 kb/s
        Stream #0:0(und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 768x576 [SAR 1:1 DAR 4:3], 221 kb/s, 13 fps, 13 tbr, 13312 tbn, 13 tbc (default)
        Metadata:
          handler_name    : VideoHandler
    -----------------------------------------------
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Temp\testmp4\video_1_1_2_2019_5_13_13_15_20.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2mp41
        encoder         : Lavf58.20.100
      Duration: 00:00:10.00, start: 0.000000, bitrate: 334 kb/s
        Stream #0:0(und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 768x576 [SAR 1:1 DAR 4:3], 330 kb/s, 13 fps, 13 tbr, 13312 tbn, 13 tbc (default)
        Metadata:
          handler_name    : VideoHandler
    

    At least one output file must be specified

    In my file 'strConcatAVIs' I have tried adding the correct duration which doesn't change much but if I change the duration to be 14, 6 as oppose to 10, 10, which are the correct durations, on the joins that are pausing and speeding up it plays pretty smoothly.