← Back to team overview

plonevideo team mailing list archive

Re: [Plone Video Sprint discussion] transcodedaemon not working

 

Ok, I modified my buildout
(http://svn.plone.org/svn/collective/plonevideosuite/trunk/config/transcoding.cfg)
to use Vik's collective.flowplayer transcode-support branch, but now
when I upload a video file, I get this error:

2009-11-26 10:56:30 ERROR Zope.SiteErrorLog
1259254590.750.748427962322
http://localhost:8080/transcodetest/videos/portal_factory/File/file.2009-11-26.5678291925/atct_edit
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.CMFPlone.FactoryTool, line 379, in __call__
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.CMFFormController.FSControllerPageTemplate, line 90,
in __call__
  Module Products.CMFFormController.BaseControllerPageTemplate, line
28, in _call
  Module Products.CMFFormController.ControllerBase, line 231, in getNext
  Module Products.CMFFormController.Actions.TraverseTo, line 38, in __call__
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.CMFFormController.FSControllerPythonScript, line
106, in __call__
  Module Products.CMFFormController.ControllerBase, line 231, in getNext
  Module Products.CMFFormController.Actions.TraverseTo, line 38, in __call__
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.CMFFormController.FSControllerPythonScript, line
104, in __call__
  Module Products.CMFFormController.Script, line 145, in __call__
  Module Products.CMFCore.FSPythonScript, line 140, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 196, in _exec
  Module None, line 1, in content_edit
   - <FSControllerPythonScript at /transcodetest/content_edit used for
/transcodetest/videos/portal_factory/File/file.2009-11-26.5678291925>
   - Line 1
  Module Products.CMFCore.FSPythonScript, line 140, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 196, in _exec
  Module None, line 13, in content_edit_impl
   - <FSPythonScript at /transcodetest/content_edit_impl used for
/transcodetest/videos/portal_factory/File/file.2009-11-26.5678291925>
   - Line 13
  Module Products.Archetypes.BaseObject, line 670, in processForm
  Module zope.event, line 23, in notify
  Module zope.component.event, line 26, in dispatch
  Module zope.component._api, line 130, in subscribers
  Module zope.component.registry, line 290, in subscribers
  Module zope.interface.adapter, line 579, in subscribers
  Module zope.component.event, line 33, in objectEventNotify
  Module zope.component._api, line 130, in subscribers
  Module zope.component.registry, line 290, in subscribers
  Module zope.interface.adapter, line 579, in subscribers
  Module collective.flowplayer.events, line 98, in __init__
  Module collective.flowplayer.events, line 169, in handleVideo
NameError: global name 'server' is not defined
> /Users/nateaune/Documents/instances/plonevideosuite.buildout/src/collective.flowplayer/src/collective/flowplayer/events.py(169)handleVideo()
-> transcodeProfiles = server.getAvailableProfiles()

I also noticed that the IP address was hardcoded in on lines 166 and
177 in events.py, so I had to change it to 127.0.0.1 since my
transcoder is running on localhost.

Vik - any idea why the global name 'server' is not defined?

Nate

On Thu, Nov 26, 2009 at 8:19 AM, Dimitris Moraitis <dimo@xxxxxxxx> wrote:
> Hi Nate & all,
>
> the problem is that you have been using the atreal bundle which can only
> be made to work along with the darkice.convertdaemon server, not the
> collective.transcode.daemon one.
>
> collective.transcode.daemon (CTD) is a fork of convertdaemon that uses a
> quite different approach. It doesn't just store the transcoded file in
> the /tmp directory like convertdaemon (where ATReal's suite gets it
> from), but inside the buildout dir which is served by Twisted using
> http. CTD returns the URL of the transcoded file to the site that
> requested the transcoding.  We confirmed it was doing the transcoding
> and returning the correct URLs by testing it along with a plone site
> running victor's branch of the collective.flowplayer package:
> http://svn.plone.org/svn/collective/collective.flowplayer/branches/transcode-support/
>
> However, the above branch doesn't yet store the returned URLs nor embeds
> the videos. Vik is currently working on the configuration screens that
> will allow the user to set the host and port of the transcoded server.
>
> Yesterday we did some changes to simplify the process of setting it up.
> So, from now, in order to get a CTD server up and running just do the
> following:
>
> $ svn co
> https://svn.plone.org/svn/collective/collective.transcode.recipe/trunk
> transcode.buildout
> $ cd transcode.buildout
> $ python2.6 bootstrap.py
> $ ./bin/buildout
> $ ./bin/transcodedaemon fg
>
> Finally here's the log of a relevant chat we just had with Victor:
>
>>dimo< hello vik
> -askvictor- hi dimo
>>dimo< did you try out the transcode daemon? we did some changes
> yesterday
> -askvictor- yep; seems to be working fine
>>dimo< cool! what's the branch that you are working on on the plone
> side?
> -askvictor- the transcode-support branch of collective.flowplayer
>>dimo< have you implemented anything new? like storing the url,
> displaying the video or configuring the transcode server host & port?
> -askvictor- working on the configuration now
>>dimo< great. let me know if you want me to test it or help out on
> anything
> -askvictor- I'm not certain how best to store the config data - I've
> followed the instructions at
> http://plone.org/documentation/how-to/adding-configuration-settings-using-zope-3-schemas-and-formlib which stores the data in a local utility, but apparently it's better to store the data in portal_properties or site annotations, neither of which I'm certain how to do
>>dimo< I was thinking that maybe it's better to provide a seperate
> installable egg for transcoding support. That egg would then provide the
> configuration screens which should allow you to configure more than one
> servers (that will be used round-robin). Also it would override some
> views from collective.flowplayer in order to store the transcoded file
> urls and embed them with flowplayer
>  why do you think it's better to use the portal_properties?
> -askvictor- someone in #plone said using local utilities can be
> problematic
>  not sure why tho ...
>>dimo< maybe that's why:
> http://www.opensubscriber.com/message/zope-cmf@xxxxxxxxxxxxxx/9387150.html
> -askvictor- yeah
>  So this seperate product would do the calls to the transcode daemon,
> handle the callback, handle configuration data, and store transcoded
> urls?
>  It should also handle storing the transcoded file data as a blob as an
> option
>>dimo< yes. and we won't have to modify the code of
> collective.flowplayer that works well on its own
> -askvictor|afk- make sense
>>dimo< also it can provide a simple way to do load balancing
>  instead of having a single transcodedaemon server you should be able to
> configure as many as you like
>  each server will be on a different URL of course
> -askvictor|afk- hmm  perhaps
>
> Στις 25-11-2009, ημέρα Τετ, και ώρα 19:47 -0600, ο/η Nate Aune έγραψε:
>> Ok, I followed your instructions below and now it doesn't seem to
>> complain about missing zope.interface.
>>
>> but now when i uplad a H.264 .mov file to a Plone site with only the
>> atreal.* add-ons installed, the following error occurs:
>>
>> atreal.richfile.streaming: build and store streaming for
>> /atrealdemo/videos/wildlifehd_m420p.mov
>>
>> PROCESS streaming_convert/atrealdemo/videos/wildlifehd_m420p.mov
>> atreal.richfile.streaming: processing...
>> atreal.richfile.streaming: ConvertDaemon call pending
>> Extracting metadatas for /atrealdemo/videos/wildlifehd_m420p.mov
>> MetadataExtractor processing ...
>> extractAndStoreMetadata
>> atreal.richfile.streaming: build and store streaming for
>> /atrealdemo/videos/wildlifehd_m420p.mov
>>
>> PROCESS streaming_convert/atrealdemo/videos/wildlifehd_m420p.mov
>> WARNING: Already processing!!!
>> Extracting metadatas for /atrealdemo/videos/wildlifehd_m420p.mov
>> MetadataExtractor processing ...
>> extractAndStoreMetadata
>> CALLBACK http://admin:admin@localhost:8080/atrealdemo/videos/wildlifehd_m420p.mov/@@streaming_RPC
>> atreal.richfile.streaming: ConvertDaemon call FAILED <Fault 8002: 'error'>
>> atreal.richfile.streaming: ConvertDaemon answer
>> ERROR {'faultCode': 8002, 'args': [], 'faultString': 'error'}
>>
>>
>> Looking at the twistd.log file, there is a TypeError occuring in xmlrpc.py:
>>
>> natemacbook:plonevideosuite.buildout nateaune$ bin/transcodedaemon fg
>> 2009/11/25 20:22 -0500 [-] Log opened.
>> 2009/11/25 20:22 -0500 [-] twistd 2.5.0
>> (/opt/local/Library/Frameworks/Python.framework/Versions/2.4/Resources/Python.app/Contents/MacOS/Python
>> 2.4.5) starting up
>> 2009/11/25 20:22 -0500 [-] reactor class: <class
>> 'twisted.internet.selectreactor.SelectReactor'>
>> 2009/11/25 20:22 -0500 [-] Loading
>> /Users/nateaune/Documents/instances/plonevideosuite.buildout/src/collective.transcode.daemon/collective/transcode/daemon/common/transcodedaemon.py...
>> 2009/11/25 20:22 -0500 [-] Initializing
>> 2009/11/25 20:22 -0500 [-] Launched http channel
>> 2009/11/25 20:22 -0500 [-] Launched TranscodeDaemon scheduler thread....
>> 2009/11/25 20:22 -0500 [-] Loaded.
>> 2009/11/25 20:22 -0500 [-] twisted.web2.channel.http.HTTPFactory
>> starting on 8888
>> 2009/11/25 20:22 -0500 [-] Starting factory
>> <twisted.web2.channel.http.HTTPFactory instance at 0x1296440>
>> 2009/11/25 20:22 -0500 [-] Scheduler thread running
>> 2009/11/25 20:24 -0500 [-] Unhandled Error
>>       Traceback (most recent call last):
>>         File "/Users/nateaune/.buildout/eggs/zope.app.twisted-3.5.0-py2.4.egg/twisted/internet/defer.py",
>> line 304, in _startRunCallbacks
>>           self._runCallbacks()
>>         File "/Users/nateaune/.buildout/eggs/zope.app.twisted-3.5.0-py2.4.egg/twisted/internet/defer.py",
>> line 317, in _runCallbacks
>>           self.result = callback(self.result, *args, **kw)
>>         File "/Users/nateaune/.buildout/eggs/zope.app.twisted-3.5.0-py2.4.egg/twisted/web2/xmlrpc.py",
>> line 82, in <lambda>
>>           deferred.addCallback(lambda x: self._cbDispatch(
>>         File "/Users/nateaune/.buildout/eggs/zope.app.twisted-3.5.0-py2.4.egg/twisted/web2/xmlrpc.py",
>> line 93, in _cbDispatch
>>           return defer.maybeDeferred(function, request, *args)
>>       --- <exception caught here> ---
>>         File "/Users/nateaune/.buildout/eggs/zope.app.twisted-3.5.0-py2.4.egg/twisted/internet/defer.py",
>> line 107, in maybeDeferred
>>           result = f(*args, **kw)
>>         File "/Users/nateaune/Documents/instances/plonevideosuite.buildout/src/collective.transcode.daemon/collective/transcode/daemon/common/xmlrpc.py",
>> line 62, in xmlrpc_convert
>>           path = videofolder + '/' + '/'.join(splittedURL) + '/' + profile
>>       exceptions.TypeError: cannot concatenate 'str' and 'dict' objects
>>
>> if i inspect with pdb the value of "profile" it is:
>> {'path': '/var/folders/zr/zri3flvxH1WuqK0t9Uq5cE+++TI/-Tmp-/tmpec-Dgostreaming.flv',
>> 'type': 'video/x-flv'}
>>
>> so it is trying to concatenate a string with this dict. can someone
>> who is more familiar with this code have a look?
>>
>> thanks,
>> Nate
>>
>> On Wed, Nov 25, 2009 at 6:50 AM, victor rajewski <vik@xxxxxxxxxxxxxxx> wrote:
>> > I had to add zope.app.twisted and zope.interface to the eggs of the
>> > transcodedaemon section of my buildout, as well as adding
>> > zope.interface to the skip-fake-eggs in [zope2] (of a combined
>> > buildout - probably not necessary for a just-transcodedaemon buildout)
>> >
>> > vik
>> >
>> > On Mon, Nov 9, 2009 at 2:50 AM, Dimitris Moraitis <dimo@xxxxxxxx> wrote:
>> >>
>> >> On Nov 5, 2009, at 6:46 PM, Nate Aune wrote:
>> >>
>> >>> Is there any documentation posted anywhere for getting all this set up on
>> >>> Ubuntu?
>> >>>
>> >>> Could we handle the installation of Twisted via buildout so it can be
>> >>> installed on any platform.
>> >>
>> >> Adding zope.app.twisted to the list of buildout eggs solves the problem on
>> >> Mac OS X and should work well on any platform.
>> >>
>> >>
>> >>
>> >> --
>> >> Archive:
>> >> http://www.coactivate.org/projects/plone-video-sprint/lists/plone-video-sprint-discussion/archive/2009/11/1257727836955
>> >> To unsubscribe send an email with subject "unsubscribe" to
>> >> plone-video-sprint-discussion@xxxxxxxxxxxxxxxxxxxx.  Please contact
>> >> plone-video-sprint-discussion-manager@xxxxxxxxxxxxxxxxxxxx for questions.
>> >>
>> >>
>> >
>> >
>> > --
>> > Archive: http://www.coactivate.org/projects/plone-video-sprint/lists/plone-video-sprint-discussion/archive/2009/11/1259153489167
>> > To unsubscribe send an email with subject "unsubscribe" to plone-video-sprint-discussion@xxxxxxxxxxxxxxxxxxxx.  Please contact plone-video-sprint-discussion-manager@xxxxxxxxxxxxxxxxxxxx for questions.
>> >
>> >
>>
>>
>>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~plonevideo
> Post to     : plonevideo@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~plonevideo
> More help   : https://help.launchpad.net/ListHelp
>



-- 
Nate Aune - natea@xxxxxxxxxxxx
http://www.jazkarta.com
http://card.ly/natea
+1 (617) 517-4953



Follow ups

References