Is there an elegant way to split a file by chapter using ffmpeg?

(Edit: This tip came from https://github.com/phiresky via this issue: https://github.com/harryjackson/ffmpeg_split/issues/2) You can get chapters using: ffprobe -i fname -print_format json -show_chapters -loglevel error If I was writing this again I’d use ffprobe’s json options (Original answer follows) This is a working python script. I tested it on several videos and it worked well. Python isn’t … Read more

Frame Number Overlay With FFmpeg [closed]

You can use the drawtext filter with the n or frame_num function: Looping 5 fps example Example command: ffmpeg -i input -vf “drawtext=fontfile=Arial.ttf: text=”%{frame_num}”: start_number=1: x=(w-tw)/2: y=h-(2*lh): fontcolor=black: fontsize=20: box=1: boxcolor=white: boxborderw=5″ -c:a copy output You may have to provide the full path to the font file, such as fontfile=/usr/share/fonts/TTF/Vera.ttf. n/frame_num starts at 0, but … Read more

How to generate gif from avi using ffmpeg? [closed]

I had a similar problem trying to generate high quality animated gif from a series of images extracted from a movie. For some reasons the animated gif generated with ffmpeg only contains 103 colors assumable using a fixed 256 level system color palette resulting in horrific result. My solution was instead ffmpeg -i video.avi -t … Read more

ffmpeg – whatsapp: video format not supported

There are some options for a better compatibility: ffmpeg -i broken.mp4 -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p working.mp4 With -profile:v baseline -level 3.0 you make the file more compatible with most older players, including WhatsApp ;). Although, this disables some advanced features. -pix_fmt yuv420p is necessary to compile to baseline (YUV planar color … Read more

How to output fragmented mp4 with ffmpeg?

This should do the trick: ffmpeg -re -i infile.ext -g 52 \ -c:a aac -b:a 64k -c:v libx264 -b:v 448k \ -f mp4 -movflags frag_keyframe+empty_moov \ output.mp4 frag_keyframe causes fragmented output, empty_moov will cause output to be 100% fragmented; without this the first fragment will be muxed as a short movie (using moov) followed by … Read more

Can I dynamically call a LGPL/GPL software in my closed-source application? [closed]

Linking has a specific meaning in computer programming. You’re not linking GPL’ed or LGPL’ed code at all, you’re only spawning a GPL’ed or LGPL’ed binary, and the GPL and LGPL permit this. Your users are free to use that binary themselves for its authors’ intended purposes and are free to download and compile the source … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)