Ffmpeg concat demuxer duration2/19/2023 ![]() ![]() The command to check video duration is: ffprobe output. The output duration is 10.068000, very close to what I'm expecting. ffmpeg -safe 0 -f concat -i "concat_input.txt" -c copy "output.mp4" The result is a playable mkv, but the duration is 8 seconds longer than. ![]() Then I'll just repeat the same process for the 2nd image, and concat the 2 videos with another ffmpeg command. I concatenate some ts files with the concat demuxer and create a mkv file using. I get an output duration of 5.034000 seconds. ffmpeg -f concat -i mymovies.txt -safe 0 -c copy movie123.mp4 The concat demuxer effective appends streams to one another, which is why it is crucial that they all use the same encoding and encoding parameters. Then for me, I'll just make the input file like this to just convert images to videos one by one: file '1.jpg' I tried but I'm not able to get the expected duration just like what OP replied Gyan. Whoever getting such kind of weird issues, no matter it's a misuse or bug, I think all we can do before it gets fixed in a future release is that, we need to do some hacks.Īs Gyan commented below the question, you need to add one more file to the end of the input text file. I can see from the below FFmpeg defect ticket that this is a known bug in the concat demuxer. For 3 images and duration 5 applied to all 3 files, the output duration is 14.967000 seconds (close to the expected duration of 15 seconds). For 3 or more images, I get the expected result. 0x80090333 A security context was deleted - XMV demuxer +- LOAS demuxer +. The resulting video only shows the 1st image for 5 seconds, but at the end of the video, I can see like a frame of the 2nd image.įrom what I have tested so far, the issue only happens when I have 1 or 2 images. FFmpeg can concatenate multiple mp4 files into a single mp4 file - without. I'm facing a similar issue with different ffmpeg command options to concat a list of JPG images to an MP4 video.įFmpeg version: ffmpeg version 5.0.1-full_build-Copyright (c) 2000-2022 the FFmpeg developersīuilt with gcc 11.2.0 (Rev7, Built by MSYS2 project)Ĭommand: ffmpeg -f concat -i "input.txt" -c:v libx264 -r 30 -pix_fmt yuv420p "output.mp4"
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |