Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 Doom9's Forum Creating video from still image with MP4Box
 Register FAQ Calendar Search Today's Posts Mark Forums Read

 6th February 2016, 04:16 #1  |  Link .sk Registered User   Join Date: Dec 2011 Posts: 7 Creating video from still image with MP4Box I have a still png image and 40min long m4a audio. Is is it possible to mux it so it will play as normal 40min long video? This is for the purpose of later uploading to youtube.
 6th February 2016, 06:06 #2  |  Link mariush Registered User   Join Date: Dec 2008 Posts: 589 You can use AviSynth to create a small script that will produce your video. Once you install AviSynth you can open Notepad and after writing this, save the document with the extension .avs (save as... choose all file types, type at filename yourname.avs ) Code: video = ImageReader("c:\path\to\your_image.jpg", fps=25, start=1, end=99999) video fps = 25 , the video generated on the fly will have a framerate of 25 , youtube will happily accept 25 or 30 frames per second with no problems. start and end tell you how many frames to generate , so for example if your audio is 40 minutes long exactly, then you want 40 minutes x 60 seconds x 25 frames per second so you want to use end=60000 You should resize the image beforehand to a decent size, like 1920x1080 or 1280x720 It's ok for your video to be longer than audio by a few seconds, youtube won't mind. Once you have this .AVS script, you can load it in Virtualdub or in MeGUI and compress the video using XVID or x264 , or you can use x264 directly using a command like this : x264.exe --tune stillimage --output "c:\path\to\output_file.mkv" "c:\path\to\avisynth_script.avs" x264 is smart enough to recognize the still image so your video will compress super fast and will only use less than 1MB for each minute of video (it can be done to use even less but it's pointless for this exercise). Now you can combine your generated video with your audio track, simply get MKVToolnix, open it, drag the two files in the gui and click the merge button and you'll get a MKV file with both video and audio, ready to be uploaded on Youtube. As a tip, you can modify the script above to use more than one picture, for example here's the same script for two pictures : Code: sequence1 = ImageReader("c:\path\to\your_first_image.jpg", fps=25, start=1, end=10000) sequence2 = ImageReader("c:\path\to\your_second_image.jpg", fps=25, start=1, end=10000) video = sequence1+sequence2 video This loads two pictures, each is shown on screen for 10000 frames ( 10000 frames / 25 fps = 400 seconds ) .. as long as both pictures have the same height and width.
 6th February 2016, 11:02 #3  |  Link .sk Registered User   Join Date: Dec 2011 Posts: 7 Thanks a lot. I ran into problem with non-compliant resolution (resolution is not compliant with colorspace i420) using x264 encoder. Some way to automatically resize to mod2 resolution with width being 1280 and height kept within original aspect ratio? I am looking for ways how to automate this process as much as possible. By the way, how long this should take? I have i5 and ETA on 64600frames video was about 1 hour which does not seem right.
 6th February 2016, 11:22 #5  |  Link huhn Registered User   Join Date: Oct 2012 Posts: 7,614 for a still image encode use tune stillimage, reduce bframes to 0, ref frames to 1 and try -me dia (or is there a way to disable me completely)? this should be faster.
 6th February 2016, 12:14 #6  |  Link .sk Registered User   Join Date: Dec 2011 Posts: 7 Thanks for the tips. To resize with avisynth, this might work.. Code: x = float(height) / float(width) spline64resize(1280, round(1280.0 * x / 8.0) * 8)