Hi David, I did something similar for the Epiphan integration, but in php. What I found easiest was the following logic:
1) Create the media package ($server/ingest/createMediaPackage) 2) For each file in the directory being ingested a) If it's a media file, POST it to $server/ingest/addTrack and replace your local copy of the mediapackage with the generated output b) If it's an xml file, POST it to $server/ingest/addDCCatalog and replace your local copy of the mediapackage with the generated output c) For any other kind of file, POST it to $server/ingest/addAttachment and replace your local copy of the mediapackage with the generated output 3) POST your local copy of the mediapackage to $server/ingest/ingest This doesn't give you the nice zip file or do nice workflow ID handling, but it does make generation of the mediapackage significantly easier. G On 11-03-10 06:22 AM, David Gilbert 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] > http://lists.opencastproject.org/mailman/listinfo/matterhorn > > > To unsubscribe please email > [email protected] > _______________________________________________
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Matterhorn mailing list [email protected] http://lists.opencastproject.org/mailman/listinfo/matterhorn To unsubscribe please email [email protected] _______________________________________________
