MP4 streaming to mobile devices?

I was asked by the dev guys here at work if its possible to stream our videos as mp4 rather than flash to mobile devices?
We currently stream in RTMPE to a custom player on our websites... but now we want to expand to mobile devices like the iPhone.
So i would need to create a new application?
I am new to FMS, can someone point me to some docs on how to do this?
Or is it even possible?
Thanks...

Take a look at Wowza Media Server, they offer all that. http://www.wowzamedia.com/
Adobe has received a lot of feedback concerning this issue that FMS can't stream out to anything but Flash and would be sure to welcome even more. Feel free to hit them up on the bug/feature request page: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

Similar Messages

  • HTTP streaming on mobile device

    We have an application for live streaming of videos without using adobe AIR. we need to make this live streaming of videos work on all mobile devices(i.e android and ios) using "HTTP streaming". Please let me know ASAP.

    Hi,
    have you done this before? How can I emded the file / stream to a webpage? Could you please explain that? And I wonder if the mobile phone's browser will be able to play the stream in its grafics interface at all. Normaly, wenn I enter an URL like rtsp://server:port/file.sdp in the browser it opens automatically the media player of the mobile phone that tries to connect. I arrive establishing the connection to the streaming server but then nothing else happens - the stream isn't played. I know that it depends from the network operator I am using. With the german t-mobile I can watch my streams but with e-plus (KPN-DE) for example it doesn't work. There's a list in this forum that shows rtsp-friendly operators and the non-friendly ones. My questions simply is: IS THERE ANY WAY TO GET MY STREAM STARTED EVEN WHEN I USE A NON RTSP-FRIENDLY MOBILE OPERATOR? I guess that could be done by using the right protocols (like TCP instead of UDP and Port 80 that should always be open instead of 554).
    ANY HELP WOULD BE APPRECIATED! Thanks.

  • Streaming audio-video on the mobile device

    Please, I must do the streaming audio-video on the mobile device using a server standard.
    I must to program the application for the server using j2se:in this case how i can send the file audio/video?This file have specifies classes?
    For the client i must using the j2me:in this case how can receive the file audio and creating the player?
    Thanks.

    Hi, please help,
    I have problem in this area also,
    am intending to stream audio and video data to mobile phone using j2me for my bs project.,
    is that true, midlets can only 'plays back' one file at time specified by url?
    I want to store many files in database( e.g ms access), and call them to midlets, to make some how interactive and real,because i have tomcat server installed in my pc.
    is this possible?
    How can i call file stored beyond path of WTK ?
    can i store audio/ video file in ms- access?
    Please, please help !
    thanks in advance.
    Message was edited by:
    nbkamani

  • Multimedia in PDF on Mobile devices runnig android and iOS6

    Hello,
    I managed to integrate video (mp4) and also animation (.swf) into a PDF-file. Were are distributing PDFs to our students. Is there any possibility to access the multimedia content using mobile devices? That is tablets running iOS 6, android 4.1 and also e-readers such as kindle paper white?
    I tried different readers on iOS and also on android but could not get it to work.
    I'm looking forward to get an answer to this question.

    In terms of Adobe software, the short answer is "no" and the long answer is "wait and see but don't get your hopes up".
    The paid-for third party Android app "ezPDF Reader Multimedia" has some support playback of video and sound annotations, but it doesn't cope with Flash or scripting so the experience in a complex interactive PDF is variable to say the least.
    In terms of Flash, there will never be integration into the mobile versions of Reader as the runtime isn't distributed to mobile platforms anymore. About half of the JavaScript API calls are technically possible on Android but JS isn't part of the app yet (we have very limited JS API support on iOS right now, but only for forms-related function calls), Direct playback of embedded RMA media streams (MP3 and H.264) is also technically possible on both platforms (as ezPDF demonstrates), but Adobe have chosen not to make it a priority.

  • ITunes Match; a waste of time for mobile devices and the impatient

    I recently subscribed to itunes match, aside from being able to upgrade a portion of my lower bitrate files, I am extremely dissapointed (as are many others I've read about having the same issues.) 
    First, getting all of my music on the server was a nightmare.  I spent way more time then I'd like to admit tricking iTunes into accepting my data.  Quite a bit of my library is in fact available for purchase in the itunes store, but only portions of most of the albums actually matched - the remaining portions had to upload. Fine, I'm okay with that aside from not being able to upgrade albums in their entirety, now I have some tracks at 256, others in the same album at 128 or whatever - I decided to selectively chose alums/tracks that I really cared about or didn't feel like re importing from disc in a few cases.  Fine.. annoying, but not a total deal breaker.
    I was finally able to figure out how (without apples help btw.. they didn't know this procedure when I spent an hour or so on the chat, screen sharing with a "specialisdt")  to trick itunes into uploadeing all "waiting" tracks by doing the AAC conversion myself manually and then replacing the compressed data locally with apple lossless files (both m4a files) while retainging the compressed data on the cloud.  fine.. I enjoy trouble shooting and problem solving, I was actually psyched to figure it out and be able to retain my high quality files locally without having doubles or redundant data in an archive elsewhere not within the iTunes data base.  Fine. apple lossless is no wav, aiff, but I can compramise also in order to imbed meta data which wav is not able to do.
    What I want is access to my entire library and to be able to either stream songs over wifi or 4g and/or download locally for when I'm off network in the boonies, etc.  *side note: don't anyone tell me this isn't a streaming service and that it only downloads to the device because it in fact does... it's just intollerably slow more often than not.  Now I can deal with that, that is either my cellular provider throttling me, or it's Apple's servers.  I will assume a bit of both.  also, don't tell me that matched content downloads faster then uploaded content.. that's BS, I've run the tests on multiple devices and there is no consitacy to it.. it all depends on the traffic on iCloud servers, wireless towers and size of the file/leanght of track, etc.  Fine.
    I've run the speed test, I've rebooted divices.  I've reset/confirmed/adjusted network setting.. I've done most of what I could do on my end as a user.  I can't seemlessly stream data on my unlimmited data plan from at&t from apple.. fine.. I get it.. regarless of my slow streaming issues - it's a first world problem.. whatever, I can deal. 
    My biggest gripe is that when I download either matched songs or uploaded content, it's is painfully slow to do so.. it's a waste of time.. manging the library on mobile devices takes forward thought and plenty of patience.. I might as well do this at home tethered to my desktop - convert to 128 to save space and accept my choices and deal with what I have loacally for the time when I'm out and about.   Now whren I buy something from apple over the 4g network or even the edge network,... &*^% downloads lickity split.. *** apple .. fine, it's big business.. I get it.. I for one would have paid 100 bucks a year if this service worked as advertised.. maybe more.,.. it's awesome in  theory, but is not realy for the limelight even still 2 years after the release.. hopefully it'll get better soon...
    Now this works great in my home over laptop, apple tv, but over ipad and iphone.. not so much.. actually working fine right now as long as I don't change the track abruptly... figures after this long rant.... once I continue on my day I'm sure it'll go back to being a pain.
    I'm going to use it at home, maybe on the run very ocasionally.. I guess that's what Apple thought we'd want, but they have been so misleading with this, and so abscent with trouble shooting an technical support that I've given up.. if I wasn't so in love with thier UI's and hardware (for the most part) I'd walk in time since steve jobs is now gone.
    unless you want to wrestle with it for hours and hours, or just want to upgrade your low quality files and bounce.. don't waste your time people.. ^$^$ all that noise
    It's too bad Samsung assinated Steve Jobs.. he'd never let this service be released uptil it was ready.   in the future I may have to go to the dark side and get a galaxy tab and smart phone, a Dell.. window vista.. naaaa just kidding.  *** apple.. p,lease sort your ^$%&7 out.
    Done and done. 
    please fix this Apple, I want to love iTunes match, I really do.

    Firstly, this is a user-to-user forum: you're not talking to Apple here.
    Just saying it 'doesn't work' doesn't make it possible to offer any cogent suggestion - one would need a lot more detail on what you've tried and what the result have been - including your operating system details. However if the thing is actually faulty - this is rare, it works fine for most people, but it can happen - then plainly you need to contact the people you bought it from, or take it into an Apple Store if you can, and ask for a replacement or repair.

  • Question about bluetooth communication between PC and mobile device

    I am a newbie of bluetooth communication. This time I need to have connumication between PC and mobile device (mainly mobile phone) by sending strings. PC is acted as server and mobile device act as client.
    For using bluetooth in PC, I use bluecove 2.0.1
    I have already connected them successfully.
    When I want to send strings between them, it is found that it can only do one cycle of communication (client -> server -> client).
    For my design, they can communicate multiple times.
    I simulate the core class of the system, the performance is fine.
    Cound anyone help me to watch the code and give me some advices?
    Server Side - ServerBox.java
    public class ServerBox implements Runnable {
       LocalDevice localDevice;
       StreamConnectionNotifier notifier;
       ServiceRecord record;
       boolean isClosed;
       ClientProcessor processor;
       CMDProcessor cmd;
       MainInterface midlet;
       private static final UUID ECHO_SERVER_UUID = new UUID(
               "F0E0D0C0B0A000908070605040302010", false);
       public ServerBox(MainInterface midlet) {
           this.midlet = midlet;
       public void run() {
           boolean isBTReady = false;
           try {
               localDevice = LocalDevice.getLocalDevice();
               if (!localDevice.setDiscoverable(DiscoveryAgent.GIAC)) {
                   midlet.showInfo("Cannot set to discoverable");
                   return;
               // prepare a URL to create a notifier
               StringBuffer url = new StringBuffer("btspp://");
               url.append("localhost").append(':');
               url.append(ECHO_SERVER_UUID.toString());
               url.append(";name=Echo Server");
               url.append(";authorize=false");
               // create notifier now
               notifier = (StreamConnectionNotifier) Connector.open(url.toString());
               record = localDevice.getRecord(notifier);
               isBTReady = true;
           } catch (Exception e) {
               e.printStackTrace();
           // nothing to do if no bluetooth available
           if (isBTReady) {
               midlet.showInfo("Initalization complete. Waiting for connection");
               midlet.completeInitalization();
           } else {
               midlet.showInfo("Initalization fail. Exit.");
               return;
           // produce client processor
           processor = new ClientProcessor();
           cmd = new CMDProcessor();
           // start accepting connections then
           while (!isClosed) {
               StreamConnection conn = null;
               try {
                   conn = notifier.acceptAndOpen();
               } catch (IOException e) {
                   // wrong client or interrupted - continue anyway
                   continue;
               processor.addConnection(conn);
       // activate the set up of process
       public void publish() {
           isClosed = false;
           new Thread(this).start();
       // stop the service
       public void cancelService() {
           isClosed = true;
           midlet.showInfo("Service Terminate.");
           midlet.completeTermination();
       // inner private class for handling connection and activate connection handling
       private class ClientProcessor implements Runnable {
           private Thread processorThread;
           private Vector queue = new Vector();
           private boolean isOk = true;
           ClientProcessor() {
               processorThread = new Thread(this);
               processorThread.start();
           public void run() {
               while (!isClosed) {
                   synchronized (this) {
                       if (queue.size() == 0) {
                           try {
                               // wait for new client
                               wait();
                           } catch (InterruptedException e) { }
                   StreamConnection conn;
                   synchronized (this) {
                       if (isClosed) {
                           return;
                       conn = (StreamConnection) queue.firstElement();
                       queue.removeElementAt(0);
                       processConnection(conn);
           // add stream connection and notify the thread
           void addConnection(StreamConnection conn) {
               synchronized (this) {
                   queue.addElement(conn);
                   midlet.showInfo("A connection is added.");
                   notify();    // for wait() command in run()
       // receive string
       private String readInputString(StreamConnection conn) {
           String inputString = null;
           try {
               DataInputStream dis = conn.openDataInputStream();
               inputString = dis.readUTF();
               dis.close();
           } catch (Exception e) {
               e.printStackTrace();
           return inputString;
       private void sendOutputData(String outputData, StreamConnection conn) {
           try {
               DataOutputStream dos = conn.openDataOutputStream();
               dos.writeUTF(outputData);
               dos.close();
           } catch (IOException e) {
       // process connecion
       private void processConnection(StreamConnection conn) {
           String inputString = readInputString(conn);
           String outputString = cmd.reactionToCMD(inputString);
           sendOutputData(outputString, conn);
    /*       try {
               conn.close();
           } catch (IOException e) {}*/
           midlet.showInfo("Client input: " + inputString + ", successfully received.");
    }For "CMDProcessor" , it is the class of message processing before feedback to client.
    Client side - ClientBox.java
    public class ClientBox implements Runnable, CommandListener{
        StringItem result = new StringItem("","");
        private DiscoveryAgent discoveryAgent;
        private String connString;
        private boolean isClosed = false;
        private boolean boxReady = false;
        StreamConnection conn;
        private static final UUID ECHO_SERVER_UUID = new UUID( "F0E0D0C0B0A000908070605040302010", false);
        Form process = new Form("Process");
        ClientInterface midlet;
        public ClientBox(ClientInterface mid){
            this.midlet = mid;
            process.append(result);
            process.addCommand(new Command("Cancel",Command.CANCEL,1));
            process.setCommandListener(this);
            new Thread(this).start();
        public void commandAction(Command arg0, Displayable arg1) {    
            if(arg0.getCommandType()==Command.CANCEL){
                isClosed = true;
                midlet.notifyDestroyed();
        public synchronized void run() {
            LocalDevice localDevice = null;
            boolean isBTReady = false;
            /* Process Gauge screen */
            midlet.displayPage(process);
            Gauge g=new Gauge(null,false,Gauge.INDEFINITE,Gauge.CONTINUOUS_RUNNING);
            process.append(g);
            showInfo("Initalization...");
            System.gc();
            try {
                localDevice = LocalDevice.getLocalDevice();
                discoveryAgent = localDevice.getDiscoveryAgent();
                isBTReady = true;
            } catch (Exception e) {
                e.printStackTrace();
            if (!isBTReady) {
                showInfo("Bluetooth is not avaliable. Please check the device.");
                return;
            if(!isClosed){
                try {
                    connString = discoveryAgent.selectService(ECHO_SERVER_UUID, ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
                } catch (BluetoothStateException ex) {
                    ex.printStackTrace();
            else return;
            if (connString == null) {
                showInfo("Cannot Find Server. Please check the device.");
                return;
            else showInfo("Can Find Server, stand by for request.");
            boxReady = true;
        /* True if the clientbox is ready */
        public boolean getBoxReady(){
            return boxReady;
        /* True if the clientbox is closed in run() */
        public boolean getIsClosed(){
            return isClosed;
        public String accessService(String input) {
            String output = null;
            try {
                /* Connect to server */
                StreamConnection conn = (StreamConnection) Connector.open(connString);
                /* send string */
                DataOutputStream dos = conn.openDataOutputStream();
                dos.writeUTF(input);
                dos.close();
                /* receive string */
                DataInputStream dis = conn.openDataInputStream();
                output = dis.readUTF();
                dis.close();
            } catch (IOException ex){
                showInfo("Fail connect to connect to server.");
            return output;
        private void showInfo(String s){
            StringBuffer sb=new StringBuffer(result.getText());
            if(sb.length()>0){ sb.append("\n"); }
            sb.append(s);
            result.setText(sb.toString());
    }Client side - ClientInterface.java
    public class ClientInterface extends MIDlet implements Runnable, CommandListener{
        private ClientBox cb = new ClientBox(this);
        private Form temp = new Form("Temp");
        private Command select = new Command("Select", Command.OK, 1);
        private Command back = new Command("Back", Command.BACK, 1);
        Alert alert;
        String[] element;
        String out;
        List list;
        public void run(){
            /* Send message and get reply */
            out = cb.accessService("Proglist");
            element = split(out,",");
            /* Use the reply to make list */
            list = createList(element[0], List.IMPLICIT, out);
            list.addCommand(select);
            list.addCommand(back);
            list.setCommandListener(this);
            Display.getDisplay(this).setCurrent(list);
        public void startApp() {
            System.gc();
            waitForBoxSetUp(); /* Recursively check for clientbox status */
            new Thread(this).start();
        public void pauseApp() {
        public void destroyApp(boolean unconditional) {
            notifyDestroyed();
        public void displayPage(Displayable d){
            Display.getDisplay(this).setCurrent(d);
        private void waitForBoxSetUp(){
            while(!cb.getBoxReady()){
                if(cb.getIsClosed())
                    notifyDestroyed();
        public void commandAction(Command c, Displayable d){
            if (c.getCommandType() == Command.OK){
                if (d == list){
                    /* Send the choice to server */
                    out = cb.accessService(list.getString(list.getSelectedIndex()));
                    alert = new Alert("Output", "selected = "+out, null, AlertType.ALARM);
                    alert.setTimeout(2000);
                    Display.getDisplay(this).setCurrent(alert,list);
            if (c.getCommandType() == Command.BACK){
                notifyDestroyed();
        public void showWarning(String title, String content){
            alert = new Alert("Output", "selected = "+list.getString(list.getSelectedIndex()), null, AlertType.ALARM);
            alert.setTimeout(3000);
            Display.getDisplay(this).setCurrent(alert,list);
        private List createList(String name, int type, String message){
            List temp;
            String[] source = split(message,",") ;
            temp = new List(name, type, source, null);
            return temp;
        private static String[] split(String original,String regex)
            int startIndex = 0;
            Vector v = new Vector();
            String[] str = null;
            int index = 0;
            startIndex = original.indexOf(regex);
            while(startIndex < original.length() && startIndex != -1)
                String temp = original.substring(index,startIndex);
                v.addElement(temp);
                index = startIndex + regex.length();
                startIndex = original.indexOf(regex,startIndex + regex.length());
            v.addElement(original.substring(index + 1 - regex.length()));
            str = new String[v.size()];
            for(int i=0;i<v.size();i++)
                str[i] = (String)v.elementAt(i);
            return str;
    }

    i haven't worked with devices but only with the toolkit emulators;
    it definitely is possible...
    u have to send the image as a bytestream and receive the image at the jsp end...
    and then reconstruct the image.
    the Stream classes in J2ME AND J2SE are all u will require.
    also the Image class.
    i have not done this but i have successfully sent an image frm a jsp and displayed it on the emulator.

  • I have created an android app from adobe flash cs6 .The app opens on mobile device except on nexus 7 which has lollipop version? Is there any way to open my app on that device?

    please give me the solutions.

    Dear Bob,
      I downloader a VLS Streamer from the Apple app store.  It requires some kind of helper software to run, which, as far as I can tell from the video at the developer's site, allows one to download content from one's mobile device to their computer.  Since I don't have a compatible computer for my iPad to link to, the instructions don't help my situation.  I emailed them with my query and will probably hear from them sometime this week.
       I've lived with this problem for the 3 months I've had my iPad, and I'll keep after it until I have a solution.  But right now, I've run out of steam.  If this lead helps me to resolve my issue, I'll come back and HELPFUL or RESOLVED every response you've given.  I'm very grateful for your help.  Sorry I'm so utterly clueless.
       Thanks once again.  Please don't cringe if I get back to you another day.

  • Video playback on mobile device

    Hello,
    I'm new here and probably this was asked before me, but I spent a lot to search on the net and actually couldn't find much.
    I'm developing a web based application dealing with video - it should be controlable and have to interact with other elements of the app. The client now asks mobile apps - for Android and iOS, that should have same features.
    I looked for solutions to play video on mobile device using Flex and building mobile apps but nowhere could find a proper explanation and results about framerates and performance. The other problem I think will be that the mobile device should play streamed video (which can be encoded in any suitable format) as well as native video - usually h.264, that as far as I understood, is not possible on iOS (I coudn't find out about Android).
    On my Android device I can play very smoothly even web videos (in the browser) that are not "optimized for mobile" as it pops up during playback. I made a test and build a simple app that just plays a remote video using the Spark's VideoPlayer and its framerate was OK but the picture was terrible - some strange coloured lines appeared.
    Is there anybody who has more info about video playback on mobile device, codecs, components etc. I need that info to make the choice to stick with Flash development for all the apps or to go for native development with platforms' SDK.
    Thanks

    Can you say even more about what it is you want to do? I mean, what will the application do, not what are the technical aspects of how it will work?
    For a point of comparison, look at this thing I did:
    http://www.cartoonnetwork.com/mixit/
    If you try out the Make page, both the template ones and the from scratch one, as well as the View page to see the playback unit in action. Is what you're going to do anything like that?
    I have tried the playback part of this as a mobile app, and it so very nearly works ok! Amongst the many problems are that the overall data rate needed is quite high, and mobile devices aren't as consistant or high bandwidth as desktops, the external swfs often need code in them, so that rules out iOS, and to do the layering involved rules out H.264.
    At some future time there will hopefully be StageVideo that can use H.264, but I don't know when that will be, or whether it will be responsive enough (FLV is much faster to connect to and play than H.264).
    Incidentally, even in the Objective-C world you can't lay things on top of the standard iOS H.264 player. To do that you have to use the AV Foundation class, so it's fairly low level programming. Using FLV in Flash is a lot easier!

  • Do I understand correctly that if I own a Mac but no other Apple mobile devices, I will not be able to access my photos, documents, contacts, and calendar in iCloud?

    Do I understand correctly that if I own a Mac but no other Apple mobile devices, I will not be able to access my photos, documents, contacts, and calendar in iCloud?

    No, you don't understand correctly.
    Apple iCloud Related Support/How-To/Troubleshooting Docs:
    Apple IDs and iCloud
    iCloud: iCloud security and privacy overview
    MobileMe: About moving to iCloud
    Frequently asked questions about the MobileMe transition and iCloud
    iCloud: Troubleshooting the move from MobileMe to iCloud
    iCloud: MobileMe services that no longer sync after moving to iCloud
    iCloud: Supported system requirements
    iCloud: What if my device or computer doesn't meet iCloud system requirements?
    Creating an iCloud account: Frequently Asked Questions
    iCloud: Managing your iCloud storage
    iCloud: Purchasing iCloud Storage and Billing
    iCloud: Resetting your Photo Stream
    iCloud: Calendar & reminder data removed from iCal when disabling iCloud Calendar
    MobileMe: Advanced iCal troubleshooting for MobileMe Calendar data
    iCloud: What version of Windows software am I using for iCloud?

  • How do I stream NFL mobile to my tv using chrome cast

    how do I stream NFL mobile app from my S4 to my tv using chrome cast?

    Get an AirPort Express.  It has an audio out which you can connect to the line-in on your home theatre system.  All the other devices will talk to the AirPort Express and stream content to it via wi-fi.

  • How do I watch .mp4 on firefox mobile?

    I tried to open a site with an .mp4 video imbedded. The firefox browser told me that i needed a new version of flash player. So i clicked on the link and it told me that I can't download flash onto apple devices. I have an android phone. How do I watch .mp4 on firefox mobile?

    But the native web browser allows me to open an MP4 file directly in the Video app, where it is played directly. Firefox 4 Mobile first downloads the whole file, before I can play the file in the Video app. This takes too long and it is to tedious since I have to manually remove the downloaded file later. Is it possible to configure FF4M so it would do the same as the native browser?

  • Can 1080p videos be watched on mobile devices?

    When I export a video it asks me what resolution I want it to be. For the 1080p option iPhone and iPad arent checked. Does this mean when I upload it to youtube my video cant be viewed on mobile devices? Thanks in advance.

    Now most devices supports to play 1080p videos, but what matters is the video format, say, iPhone, iPad can play MP4, MOV, and M4V videos, namely, it cannot play other videos in 1080p format. But there is a solution to solve this problem, with a Video Converter for Mac, you can easily convert 1080P AVI, WMV, FLV etc to iPhone, iPad supported format.

  • IOS Mobile Device Management - The SCEP server returned an invalid response

    I am in the process of writing an open source iOS mobile device management module in Java. For this I am referring the Apple provided Ruby code at [1]. I have set this up and it works fine for me. Now I need to convert this code to Java. So far I have accomplished to do that up to PKIOperation. In the PKI operation I get "The SCEP server returned an invalid response" which I believe is due to wrong response I sent to device upon PKIOperation.
    However when I do search on the internet I get this is something to do with the "maxHttpHeaderSize" as I am using the server as Apache Tomcat. Although I increase that since still it does not get resolved.
    Here is the code I need to convert - taken from Apple provided Ruby script
    if query['operation'] == "PKIOperation"
        p7sign = OpenSSL::PKCS7::PKCS7.new(req.body)
        store = OpenSSL::X509::Store.new
        p7sign.verify(nil, store, nil, OpenSSL::PKCS7::NOVERIFY)
        signers = p7sign.signers
        p7enc = OpenSSL::PKCS7::PKCS7.new(p7sign.data)
        csr = p7enc.decrypt(@@ra_key, @@ra_cert)
        cert = issueCert(csr, 1)
        degenerate_pkcs7 = OpenSSL::PKCS7::PKCS7.new()
        degenerate_pkcs7.type="signed"
        degenerate_pkcs7.certificates=[cert]
        enc_cert = OpenSSL::PKCS7.encrypt(p7sign.certificates, degenerate_pkcs7.to_der,
            OpenSSL::Cipher::Cipher::new("des-ede3-cbc"), OpenSSL::PKCS7::BINARY)
        reply = OpenSSL::PKCS7.sign(@@ra_cert, @@ra_key, enc_cert.to_der, [], OpenSSL::PKCS7::BINARY)
        res['Content-Type'] = "application/x-pki-message"
        res.body = reply.to_der
    end
    So this is how I written this in Java using Bouncycastle library.
    X509Certificate generatedCertificate = generateCertificateFromCSR(
                    privateKeyCA, certRequest, certCA.getIssuerX500Principal()
                            .getName());
            CMSTypedData msg = new CMSProcessableByteArray(
                    generatedCertificate.getEncoded());
            CMSEnvelopedDataGenerator edGen = new CMSEnvelopedDataGenerator();
            edGen.addRecipientInfoGenerator(new JceKeyTransRecipientInfoGenerator(
                    receivedCert).setProvider(AppConfigurations.PROVIDER));
            CMSEnvelopedData envelopedData = edGen
                    .generate(
                            msg,
                            new JceCMSContentEncryptorBuilder(
                                    CMSAlgorithm.DES_EDE3_CBC).setProvider(
                                    AppConfigurations.PROVIDER).build());
            CMSSignedDataGenerator gen = new CMSSignedDataGenerator();
            ContentSigner sha1Signer = new JcaContentSignerBuilder(
                    AppConfigurations.SIGNATUREALGO).setProvider(
                    AppConfigurations.PROVIDER).build(privateKeyRA);
            List<X509Certificate> certList = new ArrayList<X509Certificate>();
            CMSTypedData cmsByteArray = new CMSProcessableByteArray(
                    envelopedData.getEncoded());
            certList.add(certRA);
            Store certs = new JcaCertStore(certList);
            gen.addSignerInfoGenerator(new JcaSignerInfoGeneratorBuilder(
                    new JcaDigestCalculatorProviderBuilder().setProvider(
                            AppConfigurations.PROVIDER).build()).build(
                    sha1Signer, certRA));
            gen.addCertificates(certs);
            CMSSignedData sigData = gen.generate(cmsByteArray, true);
            return sigData.getEncoded();
    The returned result here will be output in to the servlet output stream with the content type "application/x-pki-message".
    It seems I get the CSR properly and I generate the X509Certificate using following code.
    public static X509Certificate generateCertificateFromCSR(
            PrivateKey privateKey, PKCS10CertificationRequest request,
            String issueSubject) throws Exception {
        Calendar targetDate1 = Calendar.getInstance();
        targetDate1.setTime(new Date());
        targetDate1.add(Calendar.DAY_OF_MONTH, -1);
        Calendar targetDate2 = Calendar.getInstance();
        targetDate2.setTime(new Date());
        targetDate2.add(Calendar.YEAR, 2);
        // yesterday
        Date validityBeginDate = targetDate1.getTime();
        // in 2 years
        Date validityEndDate = targetDate2.getTime();
        X509v3CertificateBuilder certGen = new X509v3CertificateBuilder(
                new X500Name(issueSubject), BigInteger.valueOf(System
                        .currentTimeMillis()), validityBeginDate,
                validityEndDate, request.getSubject(),
                request.getSubjectPublicKeyInfo());
        certGen.addExtension(X509Extension.keyUsage, true, new KeyUsage(
                KeyUsage.digitalSignature | KeyUsage.keyEncipherment));
        ContentSigner sigGen = new JcaContentSignerBuilder(
                AppConfigurations.SHA256_RSA).setProvider(
                AppConfigurations.PROVIDER).build(privateKey);
        X509Certificate issuedCert = new JcaX509CertificateConverter()
                .setProvider(AppConfigurations.PROVIDER).getCertificate(
                        certGen.build(sigGen));
        return issuedCert;
    The generated certificate commonn name is,
    Common Name: mdm(88094024-2372-4c9f-9c87-fa814011c525)
    Issuer: mycompany Root CA (93a7d1a0-130b-42b8-bbd6-728f7c1837cf), None
    [1] - https://developer.apple.com/library/ios/documentation/NetworkingInternet/Concept ual/iPhoneOTAConfiguration/Introduction/Introduction.html

    I am in the process of writing an open source iOS mobile device management module in Java. For this I am referring the Apple provided Ruby code at [1]. I have set this up and it works fine for me. Now I need to convert this code to Java. So far I have accomplished to do that up to PKIOperation. In the PKI operation I get "The SCEP server returned an invalid response" which I believe is due to wrong response I sent to device upon PKIOperation.
    However when I do search on the internet I get this is something to do with the "maxHttpHeaderSize" as I am using the server as Apache Tomcat. Although I increase that since still it does not get resolved.
    Here is the code I need to convert - taken from Apple provided Ruby script
    if query['operation'] == "PKIOperation"
        p7sign = OpenSSL::PKCS7::PKCS7.new(req.body)
        store = OpenSSL::X509::Store.new
        p7sign.verify(nil, store, nil, OpenSSL::PKCS7::NOVERIFY)
        signers = p7sign.signers
        p7enc = OpenSSL::PKCS7::PKCS7.new(p7sign.data)
        csr = p7enc.decrypt(@@ra_key, @@ra_cert)
        cert = issueCert(csr, 1)
        degenerate_pkcs7 = OpenSSL::PKCS7::PKCS7.new()
        degenerate_pkcs7.type="signed"
        degenerate_pkcs7.certificates=[cert]
        enc_cert = OpenSSL::PKCS7.encrypt(p7sign.certificates, degenerate_pkcs7.to_der,
            OpenSSL::Cipher::Cipher::new("des-ede3-cbc"), OpenSSL::PKCS7::BINARY)
        reply = OpenSSL::PKCS7.sign(@@ra_cert, @@ra_key, enc_cert.to_der, [], OpenSSL::PKCS7::BINARY)
        res['Content-Type'] = "application/x-pki-message"
        res.body = reply.to_der
    end
    So this is how I written this in Java using Bouncycastle library.
    X509Certificate generatedCertificate = generateCertificateFromCSR(
                    privateKeyCA, certRequest, certCA.getIssuerX500Principal()
                            .getName());
            CMSTypedData msg = new CMSProcessableByteArray(
                    generatedCertificate.getEncoded());
            CMSEnvelopedDataGenerator edGen = new CMSEnvelopedDataGenerator();
            edGen.addRecipientInfoGenerator(new JceKeyTransRecipientInfoGenerator(
                    receivedCert).setProvider(AppConfigurations.PROVIDER));
            CMSEnvelopedData envelopedData = edGen
                    .generate(
                            msg,
                            new JceCMSContentEncryptorBuilder(
                                    CMSAlgorithm.DES_EDE3_CBC).setProvider(
                                    AppConfigurations.PROVIDER).build());
            CMSSignedDataGenerator gen = new CMSSignedDataGenerator();
            ContentSigner sha1Signer = new JcaContentSignerBuilder(
                    AppConfigurations.SIGNATUREALGO).setProvider(
                    AppConfigurations.PROVIDER).build(privateKeyRA);
            List<X509Certificate> certList = new ArrayList<X509Certificate>();
            CMSTypedData cmsByteArray = new CMSProcessableByteArray(
                    envelopedData.getEncoded());
            certList.add(certRA);
            Store certs = new JcaCertStore(certList);
            gen.addSignerInfoGenerator(new JcaSignerInfoGeneratorBuilder(
                    new JcaDigestCalculatorProviderBuilder().setProvider(
                            AppConfigurations.PROVIDER).build()).build(
                    sha1Signer, certRA));
            gen.addCertificates(certs);
            CMSSignedData sigData = gen.generate(cmsByteArray, true);
            return sigData.getEncoded();
    The returned result here will be output in to the servlet output stream with the content type "application/x-pki-message".
    It seems I get the CSR properly and I generate the X509Certificate using following code.
    public static X509Certificate generateCertificateFromCSR(
            PrivateKey privateKey, PKCS10CertificationRequest request,
            String issueSubject) throws Exception {
        Calendar targetDate1 = Calendar.getInstance();
        targetDate1.setTime(new Date());
        targetDate1.add(Calendar.DAY_OF_MONTH, -1);
        Calendar targetDate2 = Calendar.getInstance();
        targetDate2.setTime(new Date());
        targetDate2.add(Calendar.YEAR, 2);
        // yesterday
        Date validityBeginDate = targetDate1.getTime();
        // in 2 years
        Date validityEndDate = targetDate2.getTime();
        X509v3CertificateBuilder certGen = new X509v3CertificateBuilder(
                new X500Name(issueSubject), BigInteger.valueOf(System
                        .currentTimeMillis()), validityBeginDate,
                validityEndDate, request.getSubject(),
                request.getSubjectPublicKeyInfo());
        certGen.addExtension(X509Extension.keyUsage, true, new KeyUsage(
                KeyUsage.digitalSignature | KeyUsage.keyEncipherment));
        ContentSigner sigGen = new JcaContentSignerBuilder(
                AppConfigurations.SHA256_RSA).setProvider(
                AppConfigurations.PROVIDER).build(privateKey);
        X509Certificate issuedCert = new JcaX509CertificateConverter()
                .setProvider(AppConfigurations.PROVIDER).getCertificate(
                        certGen.build(sigGen));
        return issuedCert;
    The generated certificate commonn name is,
    Common Name: mdm(88094024-2372-4c9f-9c87-fa814011c525)
    Issuer: mycompany Root CA (93a7d1a0-130b-42b8-bbd6-728f7c1837cf), None
    [1] - https://developer.apple.com/library/ios/documentation/NetworkingInternet/Concept ual/iPhoneOTAConfiguration/Introduction/Introduction.html

  • Video latency on mobile device

    I am working on an application that connects two peers in audio/video using rtmfp.
    When a peer wants to talk with another, first it exchanges peer-id and stream-name with the other and then publishes its microphone/camera (in “live” mode) and plays the other peer stream. As usual in Flash platform. Message exchange in my application is server directed (I am using FMS 4), stream connection is peer-to-peer.
    Now, all works fine when the two peer run on Adobe AIR for PC. But when one or both run on a mobile platform (iOS 4.3.3 for example) I experience a strange random latency. Sometime latency on the mobile side is near zero, sometime it grows to 3 even 5 or more seconds. So the communication is not really possible.
    I tried to narrow down latency by testing different values of bufferTime both on incoming and on outgoing stream: bufferTime = 0 does not work fine on mobile side; using bufferTime = 0 in the output stream and bufferTime=0.3 on incoming stream works better.  With this values when video is not involved all works fine. But when one of the two peer attaches a camera then the result is not always the same: sometime latency is acceptable sometime it is not: bufferLength of the incoming stream (playing stream) grows to 3 or more seconds and then it goes up and down. Using bufferTimeMax do not improve latency. On the pc side bufferLength is near zero.
    I noted that on the pc side sometime I got a NetStream.Buffer.Empty on the incoming stream so I am thinking that the problem is related to cpu resources on mobile side (I am using an iPhone 4). To lower resource consumption I set Camera.setQuality(0,100) and Camera.setMode(80,60,3). Microphone is configured to use Speex with encodeQuality = 6. But the problem remains.
    Is the video playback of Flash Air on mobile device fast enough?
    The two peer in my test are on the same LAN and the mobile device use Wi-Fi access. I use Flash CS 5.5 and AIR 2.7.
    Does anyone have an explanation of this behavior?
    Thanks
    Michelangelo

    Hi,
    after a month of tests I stopped looking for a solution.
    In the last test I tried to split (desynchronize) audio stream and video stream so I had two different play buffers on which I tested different bufferTime values. I was hoping to have a low predictable latency on audio playback (that is more important for my application) and a different not specified latency on video. But my test failed: this solution works as the solution where audio and video have the same buffer and this is very revealing.
    I don't know if this problem is related to:
    a my error in configuring audio/video stream
    a flash player bug (on iOS) in live mode
    a high resource consumption of the Sorenson Spark codec implementation on AIR for iOS
    I posted my initial question to learn from someone anything useful to distinguish among those alternatives. I tend towards the third.
    Michelangelo

  • Streaming to Apple devices

    Hi
    My customer would like the ability to stream content to Apple devices.  They will have TCS, DMM, SnS and the MXE-3500. 
    1. Can they stream directly to Apple devices from the TCS using the embedded Windows Streaming Server?
    2. Or do they need an additional Wowza server to achieve this?
    3. Or Is a separate Windows Streaming Server recommended to perform this role? 
    Many thanks
    Trevyn

    Apple devices will playback QT with h.264 compression. You can use mxe3500 to do the job and send the output to sns for mobile devices.
    Sent from Cisco Technical Support iPad App

Maybe you are looking for