April 18, 2021, 05:31:08 PM



Trick to create video sequence out of still image

Started by Shotokan81, May 27, 2013, 03:44:29 PM

Previous topic - Next topic



Here is a trick I found, I did not find it in the forums yet so I am posting it here.
Also, at some points I have errors so I am not sure it is a valid trick.

1) Create a png file of the resolution you look for (in my case 1920x1080).
2) In avidemux, open the PNG
3) Append the PNG, once only: it creates a second frame .04s after the first one.
4) Add filter: Change FPS (this affects the duration), in my case, I want a final duration of 5s, so I set 125->1.
5) Add filter: Resample FPS (this does not affect the duration), in my case I want a final fps of 29.97.
6) Save

Do you think it is a valid trick?
It worked for me with a H264 format and mkv container.
I do have a warning message: "the output file seems too short", but I can open the video in VLC and it lasts 5s.

Now, I do have a problem when I try to save with a different container (e.g.. MPEG TS).
I have an error message saying "Muxer, cannot open".
Does someone know if this is due to the fact that MPEG TS container expects an audio track?
Do you know how can I create a TS file without an audio track?

I tried to use a track from another video, but I had the error message:
Missing extension myGenBuffers
myGenBuffers not defined

This may be because the lenght of the other video was longer than 5s.


Jan Gruuthuse

When you have mpeg-ts with audio tracks and you disable audio tracks from Main Menu: Audio: Select Track: Unmark Enabled all tracks and then save video with Mpeg TS Muxer, that warning pops up and video is not saved.
If you want mpeg-ts without audio, create with audacity a silent track (wav) for the duration of that video and load that track.
Can't find any documentation if audio track is a requirement for mpeg-ts?


May 28, 2013, 02:48:07 PM #2 Last Edit: May 28, 2013, 03:05:28 PM by Shotokan81
Hi thanks,

I could not find MPEG-TS documentation explaining if audio track is a requirement either, but the silent WAV file method is fine workaround.
So I tried the method advised and made some progress, but something must still be wrong.
I can now save the video in mpeg-ts, but the below warning is displayed:
Too short
The video has been saved but seems to be incomplete.

It plays in VLC, with no sound as expected.
However, when trying to use the still image video and append some other video, Avidemux quits unexpectedly.
Note that it does not happen when I try to append regular videos that do not contain the still images.
It happens if and only if I use the still image video,  whether I try to copy streams or re-encode gives the same result.

I am unsure of the reason as avidemux quits without error message.
I am wondering if anyone has managed to create still images and append to videos, everything encoded in H.264/AC3 format, MPEG-TS container, or any other combination of formats/containers?


Jan Gruuthuse

May 28, 2013, 03:36:43 PM #3 Last Edit: May 29, 2013, 07:14:01 AM by Jan Gruuthuse
Problem most likely with time 00:00:00.040 and the 5 seconds?
copy created mpeg-ts to mkv container and back. Still have a bit in front and back that is not accessible with vlc.
Had no time to do further testing. Best guess: mark part with [A ] [ B], select both points with up arrow only.
Save this part. Make copy of part. Load saved part and append x times copy of original part as needed.

Is not working like that: only one key frame is present.


Hi Jan,

Thanks for your reply.

I tried to copy the file into a mkv container, and avidemux quits unexpectedly.

I am wondering a couple of points, some guidance would be welcome although I do not want to make people lose their time. So just some info to find my way and if it makes sense to do it would be appreciated:
- Is the trick I described to create still images a good working solution for others, does it make sense?
- What is the standard way to create still images video with avidemux 2.6.4? Preferably in H264, but I can use other formats as intermediate.
- How can I investigate the issue when avidemux quits unexpectedly? Is there a log file, is there a control of the verbosity?
- I guess it makes sense to report a bug as the application quits unexpectedly. I am not sure how to report. I assume I would need to find out some more information before reporting, I am happy to look for it, please pardon my ignorance.


Jan Gruuthuse

June 02, 2013, 02:32:06 PM #5 Last Edit: June 02, 2013, 03:24:06 PM by Jan Gruuthuse
I guess this more doable from 2.5.6 branch (frameditor)
Wiki is back on line: Create video from still image and from audio file
else with ffmpeg:
ffmpeg -f image2 -r 25 -i image%03d.jpg video.mp4
-r for fps, need to change if not 25
You just need to copy original image x times as in wanted fps 25 / 29 / 30 / ... and numbered sequential: image001, image002, ...
works as well with png pictures
ffmpeg -f image2 -r 25 -i image%03d.png video.mkv