David,
Can you enter a jira ticket and include a mediapackage sample and media? If you can also repost the jira ticket to this thread that would helpful. Please specify the version of Matterhorn your running.

Thanks,
Adam

On 3/12/11 11:04 AM, David Gilbert wrote:
Hey Greg and Josh,

Josh I was already aware of digest authentication, I was just using the form based authentication for the sake of simplicity for my testing out the different ingest requests.

Greg I did not end up using what you suggested, turns out the ./ingest/addMediaPackage does everything I need in one request. I was trying to use it differently than I thought it would work, I thought I needed to addMediaPackage and upload the media separately but it turns out I could just do it like below.

curl -c cookies.txt $server"ingest/addMediaPackage" \
    -H "X-Requested-Auth: Digest" \
    --digest --user $username:$password \

curl -v -o /dev/null -b ../cookies.txt $server"ingest/addMediaPackage" \
    --form-string "title=$i" \
    --form-string "creator=TestScript" \
    --form-string "flavor=presenter/source" \
    --form track=@$i;

A new problem has started happening, about 50% of the time the workflow does not recognize the video feed, it processes it and in the engage Media Gallery there are screenshots of it, but in the player the video does not play, just the audio.

Dave


On Thu, Mar 10, 2011 at 1:13 PM, Josh Holtzman <[email protected] <mailto:[email protected]>> wrote:

    First of all, thanks David for sharing this script.  Before you go
    too much further, though, I would recommend replacing the form
    login approach with digest auth.  Form login is really just a
    convenience for testing.  It's intended to be replaced by CAS or
    some other single sign on solution, or to be put behind Apache
    HTTPD since form login without SSL isn't secure.  See [1] for some
    more info on digest auth in Matterhorn.

    Now to answer your question with a question (sorry!): is there a
    reason to use these endpoints rather than simply uploading zipped
    mediapackages?  You can certainly go either way, but building the
    zip file locally will require a lot less back-and-forth with the
    server.

    [1] http://opencast.jira.com/wiki/display/MH/Remote+Services

    Josh

    On Thu, Mar 10, 2011 at 1:22 PM, David Gilbert <[email protected]
    <mailto:[email protected]>> wrote:

        Hello All,

        I am trying to write a script to bulk ingest media unto a
        Matterhorn server.
        So far i got this...

            #!/bin/bash
            url='http://localhost:8080/'
            filename='line.mp4'
            echo "Step 1: Logging In"
            curl -c cookies.txt $url"j_spring_security_check" \
            -d j_username=admin \
            -d j_password=opencast;

            echo "Step 2: Generating File Location"
            videoid=$(curl -v -b cookies.txt
            $url"ingest/filechooser-local.html" \
            | grep action \
            | sed
            's/.*action\=\"addElementMonitored\/\([0-9a-zA-Z\/\-]*\)\".*/\1/');
            mediaPackage=$(curl -b cookies.txt
            $url"ingest/createMediaPackage");

            echo "Step 3: Upload descriptor"
            curl -b cookies.txt -o /dev/null
            $url"ingest/addMediaPackage" \
            --form-string "title=DavesTest" \
            --form-string "creator=TestScript" \
            --form-string "fileLocation=local" \
            --form-string "track=" \
            --form-string "workflowSelector=full"\
            --form-string "distribution=checked"\
            --form-string "fileChooserAjax=$videoid";

            echo "Step 4:"
            curl -b cookies.txt
            $url"ingest/addElementMonitored/$videoid" \
            --form-string "elementType=track" \
            --form-string "flavor=presenter/source" \
            --form-string "mediaPackage=$mediaPackage" \
            --form [email protected] ;


        The files appear in the admin page but the media is not
        processing correctly. I am relatively sure I need to do
        something to create a DublinCore entry but I am not sure what
        the process for that is done by the server/client interactions.

        Thanks

        Dave Gilbert

        _______________________________________________
        Matterhorn mailing list
        [email protected]
        <mailto:[email protected]>
        http://lists.opencastproject.org/mailman/listinfo/matterhorn


        To unsubscribe please email
        [email protected]
        <mailto:[email protected]>
        _______________________________________________




_______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn


To unsubscribe please email
[email protected]
_______________________________________________
_______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn


To unsubscribe please email
[email protected]
_______________________________________________

Reply via email to