Author Topic: Trick to create video sequence out of still image  (Read 9512 times)

Shotokan81

  • Newbie
  • *
  • Posts: 38
Trick to create video sequence out of still image
« on: May 27, 2013, 03:44:29 PM »
Hi,

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:
Code: [Select]
Missing extension myGenBuffers
myGenBuffers not defined
This may be because the lenght of the other video was longer than 5s.

Regards

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6053
Re: Trick to create video sequence out of still image
« Reply #1 on: May 27, 2013, 05:00:06 PM »
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?

Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Trick to create video sequence out of still image
« Reply #2 on: May 28, 2013, 02:48:07 PM »
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:
Code: [Select]
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?

Regards
« Last Edit: May 28, 2013, 03:05:28 PM by Shotokan81 »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6053
Re: Trick to create video sequence out of still image
« Reply #3 on: May 28, 2013, 03:36:43 PM »
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.
« Last Edit: May 29, 2013, 07:14:01 AM by Jan Gruuthuse »

Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Trick to create video sequence out of still image
« Reply #4 on: June 02, 2013, 02:06:42 PM »
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.

Regards

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6053
Re: Trick to create video sequence out of still image
« Reply #5 on: June 02, 2013, 02:32:06 PM »
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:
Code: [Select]
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
Code: [Select]
ffmpeg -f image2 -r 25 -i image%03d.png video.mkv
« Last Edit: June 02, 2013, 03:24:06 PM by Jan Gruuthuse »