VideoHelp Forum
+ Reply to Thread
Results 1 to 26 of 26
Thread
  1. Hi,

    i have the .avi file. 4 video channels are multiplexed in it. how to demultiplex this video and display it as a quad screen view. like ch1 -cam1, ch-2 cam2, ch-3 cam3 ,ch-4 cam4..pls help me out..

    Azhagiri.s
    Quote Quote  
  2. Member Krispy Kritter's Avatar
    Join Date
    Jul 2003
    Location
    St Louis, MO USA
    Search Comp PM
    What is the source?

    Most cam systems that I've dealt with do not create a video file with multiple video streams/channels. The recording hardware simply combines all of the cam inputs into a single video stream.
    Google is your Friend
    Quote Quote  
  3. Hi, Krispy Kritter

    Thank u for your reply. The video source which we are getting from one dvr. one electronic unit which multiplexes the 4 camera inputs and give it to recorder. the recorder output is PAL standard multiplexed video. Composite or S-video. this video i have to demultiplex it as a quad screen. based on which things we can split the frames source and display it.
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    there is not agreement between what VH members here would normally refer to as multiplexed (or demultiplexed) compared to what YOU seem to be referring to. in fact those terms mean a number of things under different contexts.

    give us the details on the model of your camera & recorder system.

    older analog systems similar to what you are talking about did a quad split composite (aka 4-way pip - picture in picture) merged onto one image.
    other older analog systems did a time sequential interleave (a then b then c then d then a again...) continually alernating
    some modern digital systems save multiple independent streams as "layers" within a single file, where the "player" lays them out as a quad split in playback, though they are still discreet

    all of those formats have at one time or another been termed "multiplexed".
    yours could be one of those or something else altogether.

    need more info...

    scott
    Quote Quote  
  5. Hi Scott..

    We don t know the system using which camera.. but this system is an older version of analog system. which multiplexes the 4 video channels, this system will give 1 video output (composite- 4 channels muxed).

    We use this multiplexed output for recording. the multiplexing unit have the 16 different preset settings based on this settings the video will get multiplexed. now i have to split this multiplexed video in to quad screen.

    Preset will be (1-16)

    Preset 1 CH-1 [100%], CH-2 [0%], CH-3 [0%], CH-4 [0%]

    .....
    Preset 11 CH-1 [25%], CH-2 [25%], CH-3 [25%], CH-4 [25%]

    up to 16..
    the camera input will be 4 cameras (visual, color bar1,color bar2,color bar3)

    azhagiri.s
    Quote Quote  
  6. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    That's no better than the first time!!

    Repeat exactly what you just said, without using the term "muxed" or "multiplexed" (to avoid circular reference). Use a term which either electrically, visually, mathematically, or software-logically describes what's happening.

    What do you mean you "don't know the system"? Can't you look at the back/side/top/front of the cameras or device? Isn't there a manual? How do you know how to work it, then?

    Do you have a screen cap sample?

    So the settings are a composite PIP quad split arrangement, with the "presets" determining channel priority? If so, why didn't you just say "it's like your 1st example."?

    Assuming that is correct, you now need to describe (in enough detail) what your edit system is. Do you know how to use AVISynth? ffmpeg? Which cam(s) did you want to work with?

    Scott
    Quote Quote  
  7. Here the system means multiplexing unit.

    Multiplexing unit is an older version of analog system. which multiplexes the 4 video channels, this system will give 1 video (composite output).

    We use this output for recording. the system have the 16 different preset settings based on this settings the video will get multiplexed. now i have to split this video in to quad screen.

    Preset will be (1-16)

    Preset 1 CH-1 [100%], CH-2 [0%], CH-3 [0%], CH-4 [0%]

    .....
    Preset 11 CH-1 [25%], CH-2 [25%], CH-3 [25%], CH-4 [25%]

    up to 16..
    the camera input will be 4 cameras (visual, color bar1,color bar2,color bar3)

    the camera used here is dome cctv security camera.
    azhagiri.s
    Quote Quote  
  8. The Texas instruments Davinci evaluation module TMS320DM6446 which we are using for our development. presently we are not using any edit system. Idont know about AVISynth? ffmpeg?

    azhagiri.s
    Quote Quote  
  9. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    You STILL have not been clear about what you have, nor about what you want to have DONE to it.

    That module is a Video Processing S.O.C. What is your "development" intention? I'm not a mind reader.

    I asked you to rephrase your statement WITHOUT using that ambiguous term, yet you chose to repeat it almost verbatim USING that term!
    I'm seriously losing patience with this: speak plainly or I won't be responding further.

    Scott
    Quote Quote  
  10. Sir,
    We are working with the TMS320DM6446 Davinci evaluation module. it is video processing soc (ARM+DSP) dual core system.

    our task is to record the multiplexed video in to a solid state memory device (compact flash). when play back we have to demux the

    recorded video, split and display it as quad window.

    Only the information we have about the multiplexing unit is preset inputs. how to find the video source from the video and display it..


    azhagiri
    Quote Quote  
  11. Member Krispy Kritter's Avatar
    Join Date
    Jul 2003
    Location
    St Louis, MO USA
    Search Comp PM
    The source hardware (ie: the device that is providing the "multiplexed" composite signal) is required. Once the hardware is known, the exact video type can be determined. A sample of the video output may help as well.

    Next, we need to understand what you are wanting to do.

    You should already be able to view and/or capture/record the video. No processing of any type should be needed to view or store the video. So we need to know what you are trying to do.
    Google is your Friend
    Quote Quote  
  12. Upload a sample video
    Quote Quote  
  13. Hi i uploaded a sample video..
    Image Attached Files
    Quote Quote  
  14. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Ok, that at least got us somewhere!

    That is not a "multiplexed" stream in the sense of discreet independent multiple views encapsulated within the one container file.
    Neither is that a quad-split overlay PIP type of multiplexed video.
    Rather, it is a time-sequential interleave type of multiplexed video (which only the security world even refer to as multiplexed).

    This is easily "de-multiplexed" by using a video processor (such as AVISynth script) that saves each 4th image to its own stream of the 4.
    However, I note that your file is corrupted and doesn't even follow its own pattern. Occasionally there is a loss of 1 or part of 1 frame. This will make extraction MUCH more difficult. Better to see why it is being created that way: is it a problem with interlacing? with frame-dropping? with HDD corruption? with a bad source file(s)? bad DV compression?

    Once that is figured out, and you have (again?) 4 separate video streams, you can re-process them to the way you'd like, such as a quad split. This is also easily doable in AVISynth.

    Since you seemed to be unfamiliar with AVISynth, you need to let us know on WHAT PLATFORM and API you are intending to utilize this. Also, is this a general, recurring job or is this a one-off?

    Scott

    (see what more info you can get when you actually play ball?!)
    Last edited by Cornucopia; 27th Jan 2015 at 06:42.
    Quote Quote  
  15. Thank you sir..

    we are using this for our internal security application development. we are not familiar with avi synth. we will learn the avi synth and try to do it. the flatform which we are working is Code composer studiov5.5.
    Quote Quote  
  16. Here's what Cornucopia suggested:
    1. Download and install Avisynth 2.6 from http://avisynth.nl/index.php/Main_Page
    2. create a FFMS2 folder inside your avisynth plugins folder (C:\Program Files (x86)\AviSynth 2.6\plugins)
    3. Download FFMS2 from https://github.com/FFMS/ffms2/releases and extract the content of the x86 folder and the FFMS2.avsi into the FFMS2 folder you created.
    4. create a text file and name it test.avs
    Inside the .avs file write the the following (and save the file):
    Code:
    LoadCPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\FFMS2\ffms2.dll") # here you need to adjust the path to the ffms2.dll
    Import("C:\Program Files (x86)\AviSynth 2.6\plugins\FFMS2\FFMS2.avsi") # here you need to adjust the path to the FFMS2.avsi
    FFVideoSource("C:\Users\Selur\Desktop\UVS141~1.AVI")  # here you need to adjust the path to your input file
    bob() # deinterleces the video by bobbing
    selecteven() # throws out every odd field
    FFInfo(frametype = false, cfrtime = false, vfrtime = false) # shows the frame number inside the upper left corner
    v1 = SelectEvery(4,1).Subtitle("1 of 4", align=9) # shows that this is the first of every four frames inside the upper right corner
    v2 = SelectEvery(4,2).Subtitle("2 of 4", align=9) # shows that this is the second of every four frames inside the upper right corner
    v3 = SelectEvery(4,3).Subtitle("3 of 4", align=9) # shows that this is the third of every four frames inside the upper right corner
    v4 = SelectEvery(4,4).Subtitle("4 of 4", align=9) # shows that this is the fourth of every four frames inside the upper right corner
    return StackVertical(StackHorizontal(v1,v2), StackHorizontal(v3,v4)) # arranges the different views
    5. Download Virtual Dub 32bit version from (http://virtualdub.sourceforge.net/), extract it and open the test.avs file with it and you should see something like the image I attached.

    Scrolling through the frames in Virtual Dub one can clearly see that the interleaving of your streams isn't done consistently which is why the camera views change.

    ---------------

    Seeing that you are using a C++ development enviroment which is ment for embedded developing, this way to approach the problem is probably not what you are looking for. -> Your programmers might want to look into libav and ffmpegsource2.

    Cu Selur
    Image Attached Thumbnails Click image for larger version

Name:	groupOfFour.png
Views:	183
Size:	253.3 KB
ID:	29861  

    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  17. i tried as per your guidance..
    i am getting the following error.. image i attached..

    * The problems which i faced during this downloading of this avi synth from the website u suggested. it shows the version name is 2.5, when i installed it shows 2.6 on the installation screen.

    The test.avs which i used is

    LoadCPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\FFMS2\ffms2.dll") # here you need to adjust the path to the ffms2.dll
    Import("C:\Program Files (x86)\AviSynth 2.6\plugins\FFMS2\FFMS2.avsi") # here you need to adjust the path to the FFMS2.avsi
    FFVideoSource("C:\Users\Selur\Desktop\UVS141~1.AVI ") # here you need to adjust the path to your input file
    bob() # deinterleces the video by bobbing
    selecteven() # throws out every odd field
    FFInfo(frametype = false, cfrtime = false, vfrtime = false) # shows the frame number inside the upper left corner
    v1 = SelectEvery(4,1).Subtitle("1 of 4", align=9) # shows that this is the first of every four frames inside the upper right corner
    v2 = SelectEvery(4,2).Subtitle("2 of 4", align=9) # shows that this is the second of every four frames inside the upper right corner
    v3 = SelectEvery(4,3).Subtitle("3 of 4", align=9) # shows that this is the third of every four frames inside the upper right corner
    v4 = SelectEvery(4,4).Subtitle("4 of 4", align=9) # shows that this is the fourth of every four frames inside the upper right corner
    return StackVertical(StackHorizontal(v1,v2), StackHorizontal(v3,v4)) # arranges the different views

    -------------------------------

    and the pc which i am using is
    Microsoft Windows XP
    Version 2002 service pack 2
    --------------------------------------
    What could be the problem?
    Image Attached Thumbnails Click image for larger version

Name:	quad screen.JPG
Views:	212
Size:	58.8 KB
ID:	29864  

    Quote Quote  
  18. Change 'LoadCPlugin' to 'LoadPlugin' (I'm using a modified version from http://forum.doom9.org/showthread.php?t=127037&page=49 which is a CPlugin)
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  19. i changed from LoadcPlugin to loadplugin in the test.avs file. still i am getting avi synth open failure.

    .avs file i used

    LoadPlugin("C:\Program Files\AviSynth 2.6\plugins\FFMS2\ffms2.dll") # here you need to adjust the path to the ffms2.dll
    Import("C:\Program Files\AviSynth 2.6\plugins\FFMS2\FFMS2.avsi") # here you need to adjust the path to the FFMS2.avsi
    FFVideoSource("C:\Documents and Settings\azhagiri\Desktop\123.AVI") # here you need to adjust the path to your input file
    bob() # deinterleces the video by bobbing
    selecteven() # throws out every odd field
    FFInfo(frametype = false, cfrtime = false, vfrtime = false) # shows the frame number inside the upper left corner
    v1 = SelectEvery(4,1).Subtitle("1 of 4", align=9) # shows that this is the first of every four frames inside the upper right corner
    v2 = SelectEvery(4,2).Subtitle("2 of 4", align=9) # shows that this is the second of every four frames inside the upper right corner
    v3 = SelectEvery(4,3).Subtitle("3 of 4", align=9) # shows that this is the third of every four frames inside the upper right corner
    v4 = SelectEvery(4,4).Subtitle("4 of 4", align=9) # shows that this is the fourth of every four frames inside the upper right corner
    return StackVertical(StackHorizontal(v1,v2), StackHorizontal(v3,v4)) # arranges the different views

    The error image i attached here.
    Image Attached Thumbnails Click image for larger version

Name:	ERROR 0 XC1.JPG
Views:	200
Size:	36.7 KB
ID:	29920  

    Quote Quote  
  20. Just use AVISource() instead of FFVideoSource()

    If you need a VFW DV decoder, install cedocida

    Instead of FFInfo(), use ShowFrameNumber()
    Quote Quote  
  21. Just use i just replaced AVISource() instead of FFVideoSource() & ShowFrameNumber() Instead of FFInfo()

    Still the error is retains.

    .avs file is

    LoadPlugin("C:\Program Files\AviSynth 2.6\plugins\FFMS2\ffms2.dll") # here you need to adjust the path to the ffms2.dll
    Import("C:\Program Files\AviSynth 2.6\plugins\FFMS2\FFMS2.avsi") # here you need to adjust the path to the FFMS2.avsi
    AVISource ("C:\Documents and Settings\azhagiri\Desktop\123.AVI") # here you need to adjust the path to your input file
    bob() # deinterleces the video by bobbing
    selecteven() # throws out every odd field
    ShowFrameNumber (frametype = false, cfrtime = false, vfrtime = false) # shows the frame number inside the upper left corner
    v1 = SelectEvery(4,1).Subtitle("1 of 4", align=9) # shows that this is the first of every four frames inside the upper right corner
    v2 = SelectEvery(4,2).Subtitle("2 of 4", align=9) # shows that this is the second of every four frames inside the upper right corner
    v3 = SelectEvery(4,3).Subtitle("3 of 4", align=9) # shows that this is the third of every four frames inside the upper right corner
    v4 = SelectEvery(4,4).Subtitle("4 of 4", align=9) # shows that this is the fourth of every four frames inside the upper right corner
    return StackVertical(StackHorizontal(v1,v2), StackHorizontal(v3,v4)) # arranges the different views
    Image Attached Thumbnails Click image for larger version

Name:	ERROR 0 XC1-1.JPG
Views:	266
Size:	38.4 KB
ID:	29922  

    Quote Quote  
  22. Take ffms2.dll out of the avisynth/plugins folder (e.g. move it into a subfolder)

    Do not use other arguments for Showframenumber() . (Don't use CFR time etc.... those are for FFInfo)

    This AVI sample has lots of errors, is that typical for this recording setup?
    Quote Quote  
  23. Here is an example of ffmpeg 4way code that you can modify. It is based on your sample stream characteristics (interlaced DV, bottom field first, duplicate fields), you might have to modify it if the characteristics change. FFmpeg reports many errors on your sample stream (Scott mentioned that above earlier as wel)

    You can drag and drop an AVI onto the .bat file and ffplay will spawn a viewer/player screen. This is done by piping the ffmpeg filter_complex chain to ffplay . ffmpeg and ffplay have to be in the search path (e.g in the same folder, or setup as an environment variable)

    Code:
    ffmpeg -i %1 -filter_complex "[0:0]yadif=0:1,scale=640x480,framestep=4[a];[0:0]yadif=0:1,scale=640x480,trim=start_frame=1,framestep=4[b];[0:0]yadif=0:1,scale=640x480,trim=start_frame=2,framestep=4[c];[0:0]yadif=0:1,scale=640x480,trim=start_frame=3,framestep=4[d];[a]pad=iw*2:ih*2:0:0[int2];[int2][b]overlay=0:H/2[int3];[int3][c]overlay=W/2:0[int4];[int4][d]overlay=W/2:H/2[out]" -map [out] -f yuv4mpegpipe - | ffplay -i -
    Image Attached Files
    Quote Quote  
  24. i thank u for your guidance.. quad screen video is working.

    but the different video source is not displaying the same frame it is moving. example in a visual camera output display is moving like frame2,and some times frame4 etc.. the image i attached.. what could be the reason?

    The images i attached..

    if only 2 input we connect other 2 cameras are not connected means what will happen.. remaining 2 screen what could be the display status..
    Image Attached Thumbnails Click image for larger version

Name:	when 0th frame.bmp
Views:	200
Size:	399.4 KB
ID:	29949  

    Click image for larger version

Name:	when 10th frame.bmp
Views:	204
Size:	403.6 KB
ID:	29950  

    Quote Quote  
  25. what could be the reason?
    Cornucopia already wrote in https://forum.videohelp.com/threads/369705-avi-video-demultiplexing?p=2369858&viewfull=1#post2369858:
    However, I note that your file is corrupted and doesn't even follow its own pattern.
    -> The file doesn't follow a constant interleaving pattern and has corruption in it.
    Cornucopia already advised:
    Better to see why it is being created that way: is it a problem with interlacing? with frame-dropping? with HDD corruption? with a bad source file(s)? bad DV compression?
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  26. Hi

    we are getting the video input to our system from multiplexing unit. after viewing this frame interchanging in the quad window, i read the detail of that unit. The unit will take 4 video inputs and multiplex it based on preset values, mentioned earlier. when it is multiplexing the video it will stamp some headers on active video lines for frame identification. it will be useful for playback.

    To identify this frame headers, i opened this .avi file in RIFF Viewer and seen the header section it is not in the headers and vaux lines. for different sources same headers are there, it will be in the active video lines. how to identify this header and play back.

    azhagiri.s
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!