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. |
26th July 2010, 17:11 | #4 | Link |
Registered User
Join Date: Mar 2006
Posts: 1,049
|
Don't worry my English is probably worse than Yours.
http://avisynth.org/mediawiki/ImageReader then if this is possible encode small stream with jpg and join WITHOUT re-encoding with video (so question is: if any tool that allow to join seamlessly two .divx files exist - assume that both have same HxV size, framerate etc) If there is no tool for seamless joining two.divx files then You need to re-encode WHOLE video anyway... (this is worst solution) So if You can encode Yours jpg video with exactly same parameters like following video then try to use method described in http://www.divx-digest.com/articles/joinavi.html But everything depend from the container (*.divx can be any container like AVI etc with changed suffix). |
28th July 2010, 03:39 | #5 | Link |
Registered User
Join Date: May 2010
Posts: 5
|
Well I get it, it must convert *.jpg to *.divx format with the same frame and connect them together using VirtualDub, right?
And I also found a tutorial on youtube on how to use Avisynth for this job but I have not succeeded Code:
http://www.youtube.com/watch?v=r-nLArs7WCk |
28th July 2010, 10:29 | #6 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
Appending a still image in Avisynth is harder than you might think, since you have to convert the image into a clip whose dimensions, frame rate, color space and audio track all match the other clip. Example code: Code:
n = ... # no of frames for still v = DirectShowSource("xxx.divx") ImageSource("yyy.jpg", end=n-1) Spline36Resize(v.width, v.height) # or some other resizer AssumeFPS(v) ConvertToYV12() AudioDub(BlankClip(v, length=n)) last ++ v # append clips |
|
28th July 2010, 15:55 | #7 | Link | |
Registered User
Join Date: Mar 2006
Posts: 1,049
|
Quote:
Yes - You must create additional clip that can be joined to that one that You already have. If You create exactly same format then probably they can be join together without re-encoding original video which i think is preferable (less time used for operation, higher quality due lack of re-encoding already encoded video - each time new re-compression affect quality). So yes, this is one of the method however in my opinion not recommended - sufficient shall be method that one of clips is re-encoded to format of the second one and both are joined at the elementary stream level (assume that this is possible -for example tools are available for such operation - this should be faster and affect quality only for the one of clips - re-encoded one.) |
|
30th July 2010, 06:48 | #8 | Link | |
Registered User
Join Date: May 2010
Posts: 5
|
Quote:
|
|
30th July 2010, 16:34 | #9 | Link |
Registered User
Join Date: Mar 2006
Posts: 1,049
|
for aspect ratio corrected image clip only or with joined image and video clip - this is extended Gavino script - if You wish You can go further and improve script by Your self
Code:
picsrc="yyy.jpg" vidsrc="test.avi" t=10.0 #[time in sec] vd=DirectShowSource(vidsrc) fc=Round(t*FrameRate(vd)) fv=ImageSource(picsrc).AssumeFPS(vd).Loop().Trim(0,fc-1).ConvertToRGB32() fa=Tone(length=t, type="Silence", samplerate=AudioRate(vd), channels=AudioChannels(vd)) AudioDubEx(fv,fa) vasr=float(vd.Height)/float(vd.Width) pasr=float(fv.Height)/float(fv.Width) nW=INT(fv.Width*(pasr*vasr)) xx=(vd.Width-nW) Spline36Resize(nW, vd.Height).AddBorders(xx/2,0,xx/2,0) #ConvertToYV12() #last ++ vd #joining both clips last #only for picture clip |
30th July 2010, 18:06 | #10 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
This isn't right. It should be:
Code:
nW=round(vd.Width*(vasr/pasr)) |
1st August 2010, 00:33 | #11 | Link | |
Registered User
Join Date: Mar 2006
Posts: 1,049
|
Quote:
regards! |
|
1st August 2010, 07:04 | #12 | Link | |
Registered User
Join Date: May 2010
Posts: 5
|
Quote:
|
|
2nd August 2010, 07:41 | #14 | Link | |
Registered User
Join Date: Mar 2005
Posts: 366
|
Just to spoil all the fun of coding I like to mention that DVD slideshow GUI can do that for you(generate the script).
All you need to do is saving this line as an avisynth script(.avs) Quote:
Then you can render directly from DSG to various formats or export as Avisynth script for further editing.
__________________
DVD slideshow GUI(Freeware). |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|