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.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th September 2009, 22:10   #1  |  Link
Smirky
Registered User
 
Join Date: Oct 2006
Posts: 12
Static image as a video source

Recently I had an urge to upload a video to youtube which would have a static image throughout the whole video with music playing. There's a ton of such videos on youtube and I'm not a complete encoding newbie, meaning I've quite some before but I've never had a chance to learn or to come across using image as a video.

To cut the long story short - what is the most appropriate way and with what software this should be done? Maybe there is an avisynth script specifically for this where you call an image as a source?

Last edited by Smirky; 4th September 2009 at 22:12.
Smirky is offline   Reply With Quote
Old 4th September 2009, 22:45   #2  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
ImageSource
Gavino is offline   Reply With Quote
Old 4th September 2009, 22:50   #3  |  Link
SynchronousArts
Multimedia Grunt
 
SynchronousArts's Avatar
 
Join Date: Apr 2008
Location: People's Republic of Kaulifonnia
Posts: 29
Use AVISynth, something like this:

# Read a single image, repeat 300 times
ImageSource("D:\static.png", fps=29.97, end=300)

SA
__________________
Grunt: 4b- one who does routine unglamorous work
SynchronousArts is offline   Reply With Quote
Old 4th September 2009, 23:31   #4  |  Link
Smirky
Registered User
 
Join Date: Oct 2006
Posts: 12
Tried that one and also the last one with still image. Getting unsupported input file (DIB) error even though I added convert to YV12 at the end of the script. Image is in RGB. Using MeGui.
Smirky is offline   Reply With Quote
Old 4th September 2009, 23:32   #5  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
You have to use a proper frame size, i.e., proper multiples of 4 both ways. What's your frame size?
Guest is offline   Reply With Quote
Old 4th September 2009, 23:37   #6  |  Link
Smirky
Registered User
 
Join Date: Oct 2006
Posts: 12
Image size is 953x953, I tried lowering it to like 400x400 without loosing aspect ratio. I thought black borders (letterbox) would be added automagically. I guess I was wrong?
Smirky is offline   Reply With Quote
Old 4th September 2009, 23:39   #7  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Did 400x400 work?
Guest is offline   Reply With Quote
Old 5th September 2009, 00:32   #8  |  Link
Smirky
Registered User
 
Join Date: Oct 2006
Posts: 12
Nope, did not
Smirky is offline   Reply With Quote
Old 5th September 2009, 01:15   #9  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Post your exact script.
Guest is offline   Reply With Quote
Old 5th September 2009, 03:48   #10  |  Link
iffybob
Registered User
 
Join Date: Jul 2009
Location: England , South Yorkshire
Posts: 99
What about doing it the other way round, embed an image in an MP3, I know you can do this, esp if its just one image.
__________________
"Ford your turning into a penguin, stop it" - Douglas Adams
iffybob is offline   Reply With Quote
Old 5th September 2009, 11:21   #11  |  Link
Smirky
Registered User
 
Join Date: Oct 2006
Posts: 12
At first I used
video = ImageSource("C:\Users\*****\Downloads\ecliptica.jpg")
audio = DirectShowSource("C:\01. Blank File.mp3")
return AudioDub(video, audio)

It wasn't any good. Then I tried tweaking the video alone and used
ImageSource("C:\Users\*****\Downloads\ecliptica.jpg", fps=29.97, end=300) which asked me to add convert to YV12 that I tried doing and tried not to and still the same error.
Smirky is offline   Reply With Quote
Old 5th September 2009, 11:54   #12  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Smirky View Post
It wasn't any good.
What do you mean?
What error message are you getting, and from what software?
Gavino is offline   Reply With Quote
Old 5th September 2009, 12:29   #13  |  Link
Smirky
Registered User
 
Join Date: Oct 2006
Posts: 12
Quote:
Originally Posted by Gavino View Post
What do you mean?
What error message are you getting, and from what software?
Mentioned here

P.S. So much bad luck: Windows Movie Maker can do that but it has like no features at all and can only render as WMV with no oprions whatsoever. Sony Vegas can do that easily too but gives a shitload of errors about mscvr90.dll and other stuff. Fixed that one and then another pops out. Hilarious. Will try Adobe Premiere soon...

Last edited by Smirky; 5th September 2009 at 12:34.
Smirky is offline   Reply With Quote
Old 5th September 2009, 12:46   #14  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Just a thought - when adding ConvertToYV12(), did you do it like this:

return AudioDub(video, audio).ConvertToYV12()

If you add the ConvertToYV12() as a separate line, it will be ignored because of the 'return'.
Gavino is offline   Reply With Quote
Old 5th September 2009, 13:08   #15  |  Link
Smirky
Registered User
 
Join Date: Oct 2006
Posts: 12
Quote:
Originally Posted by Gavino View Post
Just a thought - when adding ConvertToYV12(), did you do it like this:

return AudioDub(video, audio).ConvertToYV12()

If you add the ConvertToYV12() as a separate line, it will be ignored because of the 'return'.
You are right, video now can be made, but there is no audio and the video is only 41sec long (tried that with Xvid/x264 and mp3), x264 and aac give "pins cannot connect due to not supporting the same transport" error. This is becoming frustrating...

Last edited by Smirky; 5th September 2009 at 13:16.
Smirky is offline   Reply With Quote
Old 5th September 2009, 13:22   #16  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Smirky View Post
You are right, video now can be made, but there is no audio and the video is only 41sec long (tried that with Xvid/x264 and mp3)
You have to give the correct parameters to ImageSource() to specify the length.

Quote:
x264 and aac give "pins cannot connect due to not supporting the same transport" error. This is becoming frustrating...
This is not clear? Exactly what actions lead to this?
Guest is offline   Reply With Quote
Old 5th September 2009, 13:22   #17  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
You need to set the video length (in frames) by setting the 'end' parameter to ImageSource. The actual length will be end+1.
The default is 1000, giving 1001 frames, just over 40 secs at 25fps.

You should get audio, does your "C:\01. Blank File.mp3" contain any sound? Post your script as it now is.
Gavino is offline   Reply With Quote
Old 5th September 2009, 13:29   #18  |  Link
Smirky
Registered User
 
Join Date: Oct 2006
Posts: 12
video = ImageSource("C:\Users\Smirk\Downloads\ecliptica.jpg")
audio = DirectShowSource("C:\01. Blank File.mp3")
return AudioDub(video, audio).ConvertToYV12()

I need the video to end exactly when audio ends. I've encoded my .flac file to both mp3 and aac. Checked them both and they both play and have sound alright. Audio length is 4:05, meaning I should set 6125 frames or 6124?

Last edited by Smirky; 5th September 2009 at 13:32.
Smirky is offline   Reply With Quote
Old 5th September 2009, 13:41   #19  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Smirky View Post
I need the video to end exactly when audio ends. I've encoded my .flac file to both mp3 and aac. Checked them both and they both play and have sound alright. Audio length is 4:05, meaning I should set 6125 frames or 6124?
What frame rate do you want for your video?
ImageSource gives 24fps by default, so 4:05 would be 245x24 = 5880 frames. So you would use end=5779.
For a different frame rate, specify fps in ImageSource and recalculate accordingly.
Gavino is offline   Reply With Quote
Old 5th September 2009, 13:50   #20  |  Link
Smirky
Registered User
 
Join Date: Oct 2006
Posts: 12
I thought you said
Quote:
Originally Posted by Gavino View Post
The default is 1000, giving 1001 frames, just over 40 secs at 25fps.
so I calculated according to 25fps.

For youtube afaik it doesn't actually matter 24 or 25fps, so I don't know which one is more appropriate.
Smirky is offline   Reply With Quote
Reply

Tags
image, source, static, video, youtube


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:19.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.