Closed Thread
Results 1 to 10 of 10

Thread: sync stream it

  1. #1
    jsr26 is offline Newbie
    Join Date
    Jan 2010
    Posts
    6
    Rep Power
    0

    sync stream it

    Hey Everyone,
    There may be a simple solution to this but i am having trouble.

    the problem: how can i sync either two audio or video's from a streaming server to be in perfect time with each other on "play"?

    i have thought about setting up a player interface, where selected files are chosen then streamed/ synced to the player. Once both have a decent amount of buffer they will be in sync/in time on {play all} (good in theory)

    does anyone have any ideas? or know of software or how i can do this?
    has anyone done this before with prefect timing/sync

    would java script be a good option for this?


    thank you
    j

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: sync stream it

    Why not have a single file that has both the audio and video as part of the file?
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    jsr26 is offline Newbie
    Join Date
    Jan 2010
    Posts
    6
    Rep Power
    0

    Re: sync stream it

    the audio and video will be different files.
    for example:

    1-video with audio posted on site
    2-then a related audio is posted.
    then i want to sync both separate posted files in time with each other

    understand?
    as im not creating the files that are posted, they cant be the same file,
    and since this is done at the user's request live i cant join them as a file etc.

    Thats why i thought if i create a GUI, then the files are chosen, then loaded into this GUI. In a way its like joining them as a single file, but only at the time..

    if that makes sense.
    any ideas

  5. #4
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: sync stream it

    The problem is that they will naturally stream at different rates (since audio is smaller than video) and tend to get out of sync. Most video file formats include audio, so it would make more sense to offer to stream just audio (1 file) or video (including audio, 1 file).
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  6. #5
    jsr26 is offline Newbie
    Join Date
    Jan 2010
    Posts
    6
    Rep Power
    0

    Re: sync stream it

    so do you think i should have different options,
    say for example:

    1-if someone post a video&audio 1 file, the ONLY response can be the same thing

    2-if someone post's an audio file, a response can ONLY be audio

    this way in either option 1 or 2, if two separate files are chosen for the sync, it will be in "time" ??

    what if i sync 7 files using option 1 or 2, it should work?


    i was thinking last night...

    if someone created a new post on my site wanting people to reply..
    the original post would create a {new movie} server side, and each reply would be added to this file server side.. the only problem is if you don't have a limit on reply's the end file to be streamed will be to big...


    there must be a way to do this haha

  7. #6
    Feral is offline Programmer
    Join Date
    Jul 2008
    Posts
    163
    Rep Power
    15

    Re: sync stream it

    I believe it would be possible but would require a lot of very complex math. A better option would be to do this in the file player it's self, using flash over javascript you can keep track of the rate of the files transfer speeds and sync them over time.

  8. #7
    jsr26 is offline Newbie
    Join Date
    Jan 2010
    Posts
    6
    Rep Power
    0

    Re: sync stream it

    hey feral, cheers(you to winged panther)

    yea i wasn't sure what would be the best option program/code wise
    So do you think with using flash i would be able to sync video/audio one file, with a separate audio or video file???

    i was thinking ....
    if i had all post's as videos..
    Then replies are also videos, then do what people do on you tube, leave a blank screen,
    then....

    I could have a check button "audio only" which would re-size the Flash player/ GUI so the height in pixels would only be the player controls, bit of a cheat way haha..
    would solve streaming differences...

    any thoughts?


    or just control the whole thing with flash, and sync video/audio?

  9. #8
    Feral is offline Programmer
    Join Date
    Jul 2008
    Posts
    163
    Rep Power
    15

    Re: sync stream it

    Honestly the best possible option would be to use a server side script to physically combine the audio and video into one file to be played back later.

    But as an alternative I do believe that creating a custom flash player that can handle more then one simultaneous stream and syncing the playback in the player its' self would be the best alternative.

    Keep in mind that you will need to find someone that has a very high knowledge of flash as well as a very good understanding of math to pull this off.

    As for simply hiding the video portion when a "Audio Only" link is click that is a viable option. But again this really would be better suited to be included into a custom player.

    If you think about it in terms of your monthly bandwidth, simply hiding the video portion will still cost you the bandwidth used to stream the video because it is still being played just none can see it.

    In a custom player you could completely stop the video play back, thus saving you the cost of the bandwidth.

  10. #9
    jsr26 is offline Newbie
    Join Date
    Jan 2010
    Posts
    6
    Rep Power
    0

    Re: sync stream it

    the problem is, im not limiting the replies, (or maybe), either way if i connect the files server side, the end streaming file will be to great for bandwidth etc...

    i guess to start with i a limit of 5 chosen replies, that way it shouldn't sting the bandwidth , and be a half decent streaming size..


    video, thinking of going with Youtube API, enabling people to upload video through my site, directly to mine or their youtube account, pretty sure bandwidth cost will run directly to you tube. could be wrong?

    but that also has legal restrictions , like using there player. Which of course doesn't let me customize the code behind it... Might have to pay for bandwidth haha.

  11. #10
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: sync stream it

    A lot of media formats support both (audio/no-video) or (audio/video). Then convert to a flash format and display appropriately. Let the media formats handle it all and be done with it.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Very handy SVN 'sync' script
    By 7SLEVIN in forum Bash / Shell Scripting
    Replies: 0
    Last Post: 05-29-2011, 05:47 AM
  2. java byte stream char Stream confusion!
    By cyberdyne in forum Java Help
    Replies: 0
    Last Post: 11-08-2008, 08:16 PM
  3. Sync a Directory
    By ptt3 in forum Linux/Unix General
    Replies: 1
    Last Post: 07-01-2008, 06:50 AM
  4. issue with scroll sync
    By jiggsroger in forum C# Programming
    Replies: 3
    Last Post: 04-09-2008, 10:07 AM
  5. How do I sync up my Linux with NTP?
    By Lop in forum Linux Networking
    Replies: 2
    Last Post: 07-20-2007, 10:32 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts