0

Simple synchronization script to download



Hi, I want to do something quite simple: 2 brand new HD210 players each with a single video file; autorun and sync. In the fall of 2009, I did essentially the same thing with HD210's (only difference being 8 synced players instead of 2) and have and can modify the scripts I used then. These scripts were given by Roku as links in a http://forums.roku.com/viewtopic.php?f=19&t=22986 post I began. However, the links for these scripts are now 404. I want a simple script - not the BrightAuthor business. My question is are there new updated scripts (say to get along with new firmware)? Or can I use my old scripts? Here is the original master "One File over Ethernet" code: debug = false EnableZoneSupport(true) videoFile1 = "video.ts" REM REM Setting Manual IP address nc = CreateObject("roNetworkConfiguration", 0) nc.SetIP4Address("192.168.1.10") nc.SetIP4Netmask("255.255.255.0") nc.SetIP4Broadcast("192.168.1.255") nc.SetIP4Gateway("192.168.1.1") nc.Apply() REM REM IP address 255.255.255.255 sends to all units sender = CreateObject("roDatagramSender") sender.SetDestination("255.255.255.255", 11167) v = CreateObject("roVideoPlayer") p = CreateObject("roMessagePort") v.SetPort(p) mode=CreateObject("roVideoMode") mode.SetMode("1920x1080x29.97p") sleep(10000) start: print "start" sender.Send("pre") v.PreloadFile(videoFile1) sleep(100) sender.Send("ply") v.Play() listen: msg = wait(2000,p) if type(msg) = "roVideoEvent" and msg.GetInt() = 8 then sleep(1000) goto start endif goto listen Here is the original "One File over Ethernet" slave code: EnableZoneSupport(true) videoFile1 = "video.ts" mode=CreateObject("roVideoMode") mode.SetMode("1920x1080x29.97p") REM REM Setting Manual IP address REM To use DHCP, add REM before each of the nc.SetIP* lines below. REM If you have already run the script, also remove REM from the REM nc.SetDHCP() line below to change from manual IP back nc = CreateObject("roNetworkConfiguration", 0) REM nc.SetDHCP() 'to change from Manual IP back to DHCP nc.SetIP4Address("192.168.1.11") nc.SetIP4Netmask("255.255.255.0") nc.SetIP4Broadcast("192.168.1.255") nc.SetIP4Gateway("192.168.1.1") nc.Apply() receiver = CreateObject("roDatagramReceiver", 11167) v = CreateObject("roVideoPlayer") sleep(200) v.PreloadFile(videoFile1) p = CreateObject("roMessagePort") receiver.SetPort(p) listen: msg = wait(2000,p) if type(msg) = "roDatagramEvent" then command = left(msg, 3) if command = "pre" then v.PreloadFile(videoFile1) elseif command = "ply" then v.Play() else print msg endif endif goto listen

20 comments

  • 0
    Avatar
    Mark


    c'mon any roku moderators available? I unfortunately have to get going with this tonight. Will just use my existing scripts I guess ...
  • 0
    Avatar
    RokuLyndon


    Sorry about getting back to you late, but there's no reason the old scripts shouldn't work. I'll get that forum link fixed.
  • 0
    Avatar
    Mark


    OK, thanks.

    Now, another question. My videos are all either 720x540 square pixel aspect ratio, 720x534 square pixel aspect ratio, or 720x480 DV NTSC pixel aspect ratio. All 29.97p. The projectors I'm using are all 1024x768 and I want the image to fill the 4:3 projected frame. What video mode should I choose? 720x480x60p?
  • 0
    Avatar
    RokuLyndon


    If your projector is 1024, are not, you can set the brightsign to 1024x768. You might need to change the viewmode to get the videos to scale to fill the screen.  If you're using the script, you can add a call near the top after v is defined like v.setviewmode(0). Your choices are 0, 1, or 2.  0 sets the unit to scale the video to fill the screen.
  • 0
    Avatar
    Mark


    OK, I'm beginning the testing without any sync - just autoplay, looped playback. I downloaded a simple script from this site (called Loop any 1 .ts video Script). Now, I'd like to add the correct setviewmode(1) code. Could you please let me know what to add to this code:

    videomode$="1024x768x75p"
    v=CreateObject("roVideoPlayer")
    vmode = createobject("roVideoMode")
    vmode.SetMode(videomode$)

    v.SetLoopMode(true)
    list=matchfiles(".","*.ts")
    v.PlayFile(list.RemoveHead())

    while true
    sleep(1000)
    end while


    Also, what if my 1024x768 projector doesn't support 75p (as in 1024x768x75p)? 75p sounds kinda weird. Why isn't there a 29.97p choice?
  • 0
    Avatar
    RokuLyndon


    Yours would look like this. 75p is the only referesh rate the unit supports at 1024x768. The content can use any frame rate, although, ideally, if your content was 29.97p, it would look better with a refersh rate that was a multiple. So, it would look best at 60p.

    For that resolution, we don't support 60p. SO, if our projector doesn't support 75p, you can't use 1024 resolution from the brightsign. You use 800x600 which is also 75p, 640x480 is 60p. So is 1280x768 and 1280x800. Both are 60p. 1360x768 is also 6op.


    videomode$="1024x768x75p"
    v=CreateObject("roVideoPlayer")
    v.setviewmode(0)
    vmode = createobject("roVideoMode")
    vmode.SetMode(videomode$)

    v.SetLoopMode(true)
    list=matchfiles(".","*.ts")
    v.PlayFile(list.RemoveHead())

    while true
    sleep(1000)
    end while

  • 0
    Avatar
    Mark


    OK, I've decided upon 640x480x60p for my NTSC source footage playing back on the 1024x768 projector. I would have much preferred to use the native 1024x768, but the 75p must have been non-compatible as it didn't display.

    I've managed to have them setup syncing the video.

    Now, my issue is image quality. I'm using Apple Compressor and using the same recipe I've used in the past to produce ts files at 25Mbps. However, unlike my previous work there are a couple of prominent issues. For instance, on some of the videos the output is much noisier than the original. I've tried compressing to h.264 .mov files using the Compressor setting found on this web site. However, the audio and video play out of sync on the BrightSign players with all these .mov files. (They are fine on my computer). I'm running firmware 3.5.68. Is there a a/v issue with .mov files?

    I'm thinking that the BrightSign players have issues with .mov containers (only recently supported through Beta firmware). Also, I know that ts files are recommended for stable multi-channel sync. However, the ts output is quite rough (especially considering the high bit rate). I'll next try my alternate encoder, Episode, but it has many settings.

    A few related questions: Can I make every frame an I-frame? Should I go back to a non-Beta firmware if I decide to go with ts files?
  • 0
    Avatar
    Mark


    Also, where should I add the line of code v.setviewmode(1) within the original master "One File over Ethernet" code and the original slave "One File over Ethernet" code of my first post? Would the line again occur immediately after: v = CreateObject("roVideoPlayer")?
  • 0
    Avatar
    RokuLyndon


    You don't need to go back to non beta firwmare. 3.5 has been heavily tested. There isn't a problem with movs that we've found. I am posting episode settings at the bottom of this email. Can you upload a sample mov that's out of sync so I can have someone look at it?

    Yes, add the setting aftr the object is created.

    The encode settings recommended are:

    Encoded using Episode Pro v5
    Encoded to MPEG-TS

    General/System Packets: Default

    Video Encode: H264
    Audio Encode: Lame MP3 or AAC-HE

    VIDEO
    General Tab

    Video Settings;
    Frame Rate: 29.97
    Size: 1920 x 1080

    Bandwidth Control: Padded CBR
    Average rate: 16,000 kbit/s

    Keyframe control: Natural & Forced Keyframes Keyframe Distance: 30 Number of Reference Frames: 2 Number of B-frames: 1

    Profile & Quality Tab

    Encoding Profile: Main
    Entropy Coding: CAVLC

    Quality Settings
    Use 2-pass encoding: ON
    2-pass interval: 242 (don't set this to high it can cause problems) Encoding Speed vs Quality: 100 (high quality)

    Use deblocking filter: ON

    Advanced Tab
    Defualt for all settings

    AUDIO

    Encoding type: Bitrate Based
    Bit Rate 128 Kbit/s
    Standard settings

    Tested on Brightsign HD1010

    Also it is very important to note.., at data rates of 14Mbps+ you'll need a decently fast SD card or you might run into problems with dropped audio as well as other possible playback issues.
  • 0
    Avatar
    Mark


    Ok thanks I'll try this tonight. I am suprised by the audio sync issue as I'm using the same script and compression recipe as I've uses in the past. A couple of questions: I've ntfs formatted the cards. Is this the recommended format?  Also I've connected the 2 players directly together via a single standard cat5 cable without a swtich/hub. Is this ok?
  • 0
    Avatar
    RokuLyndon


    Yes, it's ok on the cable. And, if your videos are 4gb and larger, then yes, ntfs is the way to go. If they are smaller than 4gb you can use fat32, but either works.
  • 0
    Avatar
    Mark


    OK, thanks for the confirmation on these 2 questions. I'll continue with ntfs and direct ethernet.

    One final question in the category of likely superfluous setup - but nonetheless eliminating any potentially non-standard setups. I want to ensure my setup is fairly standard. I'm dropping the video.ts file and autorun.brs onto the ntfs SDHC from a Mac. I know the Mac places a few invisible files (starting with a dot) onto the card. This doesn't present any known issues does it?

    Additionally, here is some general information on my video (created in Compressor):
    Type: MPEG transport stream
    Total Bit Rate: 26.14 Mbps
    Video Tracks:
    4096 MPEG-2, 640 × 480, 4:3, 29.97 fps, 25.00 Mbps, progressive
    Audio Tracks:
    4098 MP2 stereo, 48 kHz, 384 kbps (There is no option to change the audio characteristics of ts files within Compressor's interface. Though it may be the case that it carries over the sampling rate of the source file. So, I could test my inputting with a 44.1 kHz source file.)
    Contained on a 8 GB Kingston Ultimate SDHC (15MB/sec 100x Write. All freshly ntfs formatted in the exact same way - from Windows 7 with a 4096 bytes disk allocation unit size.

    I won't be able to troubleshoot the audio sync issue until Thursday.

    I did however notice something yesterday: in each of my synced pairs it was the master that had the audio sync issue. Also, one of the pairs after a while fixed itself. I unfortunately wasn't able to systematically troubleshoot it as I was very busy doing a number of tasks. It either fixed itself after one cycle or after restarting both units. The other pair didn't fix itself, but it didn't run very long (and perhaps didn't complete a cycle).
  • 0
    Avatar
    Juan Forero

    Hi,
    I find this post quite old but I must admit this code works great with the new 4K brightsign model
    We bought 4 brightsigns 4K for an exhibit and the 4 displays work in perfect sync. I'm using .mov 

    It has been perfect so far until now that I noticed that one of the 4 brightsigns stopped sending signal after 3 hours. I restarted the system and it worked well again but 3 hours later happened the same thing.

    So here is my question to you guys if I may

    Is it possible that the code contains a sleep command after 3 hours?

    This "sleep(200) " or "sleep(1000)" in the code could be causing me these troubles?

     

    Any thought would be awesome

     

    Juan

  • 0
    Avatar
    VadimF

    hi, I want to do something simple as Mark at the beginning of the tread:  2  players each with a single video file; autorun and sync and loop.

    I saw the script by RokuLyndon here Synchronize 1 Video over Ethernet,

    do you think it will work on a model  BrightSign HD222? I will get this player a very short time before the installation, cant tested.

    dont like to deal with the BrightAuthor for such a simple task.

    appreciate a lot for the help, thanks, vadim

  • 0
    Avatar
    ^UD\_$

    It took me a while to make the transition to BrightAuthor from custom autorun scripting, but I see the benefits in using BA.

    In this particular case, I would definitely use BrightWall, as it simplify things, and allows you to train someone to manage the content.

    By the time you'd get your questions answered here, you could have gotten this task completed without a doubt.

    Are you familiar with BrightWall? In BrightAuthor, click on the Create tab to get started.

  • 0
    Avatar
    VadimF

    thank you UD|_Sheme5h,

    yes i download the BrightAuthor and with  creating BrightWall it is look quite simple. I just cant test it because i dont have the players yet,

    so i dont know if i have to do anything with the options "setup BrightSign unit", or just keep it "untouched" .

  • 0
    Avatar
    ^UD\_$

     

    You would need to set up your players once.

    Which configuration to use, depends on how you are planning on updating content down the road.

    Will the players have access to a local network, other than talking to each other?

    Will the players be on the BrightSign Network, and be monitored and maintained remotely?

  • 0
    Avatar
    VadimF

    the players wouldn't have any network access, just two players connected to each other via ethernet cable, no remote controlling..

    do i have to make also some setting on the players?

    tnx

  • 0
    Avatar
    ^UD\_$

    No network access means Stand Alone.

    Not sure if you must set up static IP addresses for BrightWall, or will the players work fine with zero config type of IP address.

    If the players are new, you may be able to get it to work out of the box, by publishing the BrightWall to two SD cards.

     

  • 0
    Avatar
    VadimF

    thank you, i think will have a new players , otherwise will perform the  factory reset

Please sign in to leave a comment.