Newest 'ffmpeg' Questions - Stack Overflow

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

Articles published on the website

  • File Creation of Acceptable JPEGs for FFMPEG With Appropriate Names in Python Fails

    26 January 2019, by acatalano

    I am generating jpeg files periodically and saving them in sequential order to be processed into a video by FFMPEG using the command line. The still images are constructed using a Python 2.7 program running Raspian on an RPi and saved in an attached folder on a Windows PC. FFMPEG is run on that PC from within the folder containing the JPEGS.

    The JPEGs are created with a line of code like this:

    image_name= '%d.jpg'%(image_number)
    

    where image number is incremented for each JPEG. Then in FFMPEG the command is:

    ffmpeg -r 15 -i %d.jpg -c:v libx264 -preset slow -crf 22 -filter:v scale=640:480 timelapse_15fps_noca.mp4
    

    Visually the files look correct they are simply 0.jpg, 1.jpg, etc., However FFMEG fails to process the files giving an error something like "Could find no file with path '%d.jpg' and index in the range 0-4"

    HOWEVER (!) if I rename the files in my file manager (Directory Opus) in sequence (it defaults to leading zeros so I have to change the %d.jpg to %4d.jpg, FFMPEG processes the video perfectly!

    I believe that FFMPEG does not interpret the filename correctly. I have also produced the filename by concatenating the string value of the number with the jpg extension, produced the filename with leading zeros etc., Nothing has worked. Renaming them in DOPUS works like a charm. I just do not understand the problem. Any help appreciated

  • How to use ffmpeg to split an audio file into HLS-compatible chunks? (mp3 format)

    25 January 2019, by ffxsam

    I've been looking all over the web & StackOverflow, and can't get this to work. I have an audio file that I'd like to split into mp3 files and generate a corresponding m3u8 file.

    I've tried this, which was the closest:

    ffmpeg -i sometrack.wav -c:a libmp3lame -b:a 256k -map 0:0 -f segment -segment_time 10 -segment_list outputlist.m3u8 -segment_format mpegts 'output%03d.mp3'
    

    But all the mp3 files are garbled when I play them.

  • FFmpeg Need More Video Effect Filters

    25 January 2019, by kataroty

    I have been trying to find more filters to use with FFmpeg but I have only found 2 so far since I cannot use frei0r because I am using Bravobit FFmpeg.

    The two I have found are :

    Sepia

    colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131
    

    Black and White

    hue=s=0
    

    Is there any more of them?


    For the ones who can use frei0r here is a good link to find more filters : FFmpeg frei0r filters

  • Howcan I get the colormatrix of colorchannelmixer of ffmpeg

    25 January 2019, by gn cavalry

    I want to add some color filter to video, just like image below: enter image description here

    colorchannelmixer need a 4x4 ColorMatrix, Where can I find this ColorMatrix, or which tool can help me to figure out some ColorMatrix.

    (I found a tool called ColorMatrixViewer.exe, but it's a 5x5 ColorMatrix, I just extract a 4x4 maxtrix from it and apply the 4x4 maxtix to colorchannelmixer, theirs result are different)

    Thanks for your answer.

  • Multiple image and multiple mp3 to mkv

    25 January 2019, by hafsel

    I need your help.

    image-folder >

    image1.jpg

    image2.jpg

    image3.jpg

    mp3-folder >

    mp31.mp3

    mp32.mp3

    mp33.mp3

    How can I combine them?

    image1.jpg + mp31.mp3 = video1.mkv

    image2.jpg + mp32.mp3 = video2.mkv

    image3.jpg + mp33.mp3 = video3.mkv

    My codes working for single image and multiple mp3.

    for %%a in ("*.mp3") do ffmpeg -loop 1 -framerate 1 -i image.jpg -i "%%a" -c:v libx264 -preset veryslow -crf 0 -c:a copy -shortest "out\%%~na.mkv"
    

    Please help me!