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 > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th May 2008, 21:43   #1  |  Link
Flexy
Registered User
 
Join Date: Jul 2003
Posts: 93
Need help muxing two separate videos into one (interlaced 3D Stereo)

Guys,

following task i am sitting on:

I have a "field sequential" video MPG2 source where every frame belongs to "Left" respective next frame "Right" in succession.
The movie is interlaced like L-R-L-R-L-R-L-R..... you get the idea.

Now i already encoded the usual methods, and the result is "ok".

What i want to do now:

1) "Extract" only the ODD (left) frames of this video and encode, using Xvid or similar.
2) Extract only EVEN frames (right) and then encode.

3) *Combine* the encoded result again so the resulting video again is L-R-L-R-L-R interlaced.


Or: A method of encoding where only every second frame is taken as video information - and then a second pass where the other part is encoded.

I need to do this since i assume that normal encoding (Xvid) just assumes every subsquent frame "belonging" together...so it basically always blends/de-interlaces (L-R) (L-R) (L-R) but this is not right in this case. I want to treat L or R frames (odd/even) as seperate information and not let the encoding merge frames together.
G.

Thanks

Last edited by Flexy; 29th May 2008 at 00:23.
Flexy is offline   Reply With Quote
Old 28th May 2008, 22:02   #2  |  Link
Flexy
Registered User
 
Join Date: Jul 2003
Posts: 93
ok..i found out how to "demux" fields with vdub and create two movies from each field. I also found a WMV muxer to again mux both movies together...but looking for something else besides WMV format.
Flexy is offline   Reply With Quote
Old 28th May 2008, 22:26   #3  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,925
Erm... so you have interlaced content, but what exactly do you want to do with it?

What is your end goal?

Post a sample. Your explanation of the situation is not clear!

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 28th May 2008, 22:37   #4  |  Link
Flexy
Registered User
 
Join Date: Jul 2003
Posts: 93
its a stereo video "field sequential". I want to avoid that XVID encodes the movie assuming that two fields "belong together".

So..i found a way to extract "left_movie.avi" as well as "right_movie.avi" usign Vdub. Now i do my processing on each of the movies, and now what i need to multiplex together the two processed videos so its interlaced, R-L-R-L using the two sources.

I need a tool/method allowing me to select "left movie" and "right movie"...which creates ONE interlaced/flield squential movie again.

G.
Flexy is offline   Reply With Quote
Old 28th May 2008, 22:41   #5  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,925
I still don't understand what you mean by stereo video. Do you literally mean it's a stereo image - i.e. 3d image?

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 28th May 2008, 22:50   #6  |  Link
jeffy
Registered User
 
Join Date: Jan 2007
Posts: 943
VirtualDub - Video - Compression
There is an option in the Xvid settings : Profile @ Level, then click the button more and place a check mark next to the item Interlaced encoding.

Your terms: left - right have no meaning, I dare to say, to most of us; not without a sample. If you mean even fields and odd fields, then you can encode interlaced, even with Xvid, as shown above.
jeffy is offline   Reply With Quote
Old 28th May 2008, 22:56   #7  |  Link
Flexy
Registered User
 
Join Date: Jul 2003
Posts: 93
yes..i am aware of this. Odd/Even for that matter. Since it is a stereo-video the left part of the video belongs to odd fields, right part to even fields. Sorry for confusion.

Its a technique used to create "field sequential" stereo video, principle is the same.

Important part is that the two fields need to be threaded as "seperate"...thus i first demux all odd fields into one video..then all even fields into another video.
That i have done. Now i am looking into tmpgenc or any other wway to "mux" those two videos to one again.
Flexy is offline   Reply With Quote
Old 28th May 2008, 23:17   #8  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,393
The available possibilities depend on the technical capabilities of the hardware you're using. What technique/s is/are used to display and watch the end result?
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 28th May 2008 at 23:20.
Didée is offline   Reply With Quote
Old 28th May 2008, 23:38   #9  |  Link
Flexy
Registered User
 
Join Date: Jul 2003
Posts: 93
didee, well thats another story. I just got a "3d ready" Plasma, and i use shutterglasses and a program called "StereoPlayer". This program can read "field sequential" 3D movies and output them in various formats. Be it red/cyan glasses..or shutter glasses..or on my Plasma w/ the shutter glasses.

But the playback isn't the problem. Its that i see i need different approaches, eg. with encoding without destroying too much of the 3D information.

I did a simple encode already, 3D is preserved, but the movies "flicker"...and this is since i assume that a normal encode just takes each frames and assumes they're in logical, temoral order and "belong together". (Thus always a part of left/right is merged). I came up with the idea that i first have to seperate the two parts of the movie...then do whatever processing, encoding..and at the end join them again to keep 100% of the stereo information and not introduce artifacts/flickering by using normal approaches.
Still, all i need to do is join/multiplex together now the two demuxed videos.
Flexy is offline   Reply With Quote
Old 28th May 2008, 23:54   #10  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,393
The problem so far is clear ... but what makes you so sure about "all i need to do is join/multiplex together now the two demuxed videos"?

If you have one encoded stream containing the L-L-L... image sequence, and one encoded stream with the R-R-R-... image sequence, just "somehow" muxing the two streams into another container is nothing that is covered by the "usual" standards. It depends on the capabilities of the container (and the muxing application), and same important, it depends on what kind of streams your player (or its filters) are able to interpret.

Now I don't know "StereoPlayer" at all, only heard about it somewhen in the past ... is it a DirectShow Player at all? My very first idea was this: Put the Left and the Right Frames side-by-side into one frame (video is double as wide now). Encode that however you want, into whatever container you like. For playback, play the stream via Avisynth, where you can easily split the frames again on-the-fly and display them one after another, like intended.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 28th May 2008, 23:59   #11  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,565
Since you're posting in avisynth forum you should just look at avisynth interlaced processing (threads or documentation). You could have saved yourself a lot of trouble in virtualdub that way.

AVISource("video.avi")
SeparateFields()
left=selecteven().process....
right=selectodd().process....
interleave(left,right)
weave()

and encode interlaced. It's pretty handy that your player can read interlaced video and play it as stereo.

MP4 has stereo movie capabilities but pretty much no player exists to play that information.
foxyshadis is offline   Reply With Quote
Old 28th May 2008, 23:59   #12  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,925
Hmmm.. I think I'm starting to follow how this works. Sounds like a fun project!

What would be wrong with bobbing the video, and encoding it as such? Or even encoding interlaced and bobbing on the fly?

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 29th May 2008, 00:17   #13  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,907
@Flexy

Fix thread title per forum rule 9. Hit Edit on your first post and then Go Advanced.
Guest is offline   Reply With Quote
Old 29th May 2008, 00:19   #14  |  Link
Flexy
Registered User
 
Join Date: Jul 2003
Posts: 93
you have a point. Problem is i am not THAT familar with A/S usage...but what you guys say makes sense. I was posting in A/S subforum, assuming there might be a solution using A/S.

Yes..this player actually uses a "stereo transform" directshow filter, actually it would be possible to have just two seperate videos, or over/under..or left/right..the palyer/filter would display this then in whatever format. But overall it would be better if the end result would be in interlaced/field sequential again in one file, seems to be some kind of semi-standard. have to read up more in regards to working with the various interlace options, maybe my approach is wrong there

edit: maybe its really as easy as to select "interlaced encoding" in XVID....

Last edited by Flexy; 29th May 2008 at 00:40.
Flexy is offline   Reply With Quote
Old 29th May 2008, 02:35   #15  |  Link
setarip_old
Registered User
 
setarip_old's Avatar
 
Join Date: Aug 2005
Posts: 16,267
@Flexy

Hi!

I'm probably way off base with regard to interpreting your desired result of:
Quote:
I need to do this since i assume that normal encoding (Xvid) just assumes every subsquent frame "belonging" together...so it basically always blends/de-interlaces (L-R) (L-R) (L-R) but this is not right in this case. I want to treat L or R frames (odd/even) as seperate information and not let the encoding merge frames together.
Can't this be accomplished by simply re-saving your original "L-R-L-R-L-R" video (as XviD or anything else) with every frame a keyframe?
setarip_old is offline   Reply With Quote
Old 29th May 2008, 03:40   #16  |  Link
Flexy
Registered User
 
Join Date: Jul 2003
Posts: 93
how would i go about this?
Actually i was about to get into the same direction somehow looking at the XVID options.
Right now i am encoding in Xvid with "encode interlaced" option on..but i really dont know whether this does what's desired.
Flexy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 13:10.


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