Video codec support, especially h.265

43 views
Skip to first unread message

Detlef Ruschin

unread,
Jun 1, 2016, 7:23:38 AM6/1/16
to psychopy-users
My question applies to coder as well as builder under Windows and Linux. I know similar questions have been asked, but the advice given seemed too vague or not satisfying to me.
I try to use video stimuli encoded in h.265 aka hevc format. The container format is mp4, but I would not mind to use avi, mov or whatever.
Using other encodings like the often recommended h.264 is hardly an option, because I want to evaluate visible coding artifacts, and transcoding the videos to another format without introducing changes in these artefacts is cumbersome.
In principle the machines I am using are prepared to handle such videos. I have the latest versions of ffmpeg and vlc installed, which can handle my videos, and therefore all video presentation methods offered in Psychopy, whether movistim, movistim2 or moviestim3 should work, as far as I understand it.
But actually none of them does. If I replace the jwpIntro.mov file in the demos with one of my videos the scripts always crash with diverse error messages.
I am no programmer and can't properly interpret the messages. I could provide details, but first I would like to ask a more general question. 
Tracing the errors through the different modules I had the impression that somewhere some parameters (especially for ffmpeg) are used, which may be responsible for the failure to play certain videos, like fixing h.264 for the coding standard and yuv420 for the colour subsampling as defaults.
Now my quesion in short: Where should one edit such defaults in order to make my videos displayable in Psychopy?

Jonathan Peirce

unread,
Jun 1, 2016, 1:11:03 PM6/1/16
to psychop...@googlegroups.com
The key to this, if your own copy of ffmpeg has support for h.265 is to make the moviestim use that copy of ffmpeg. For original moviestim that isn't going to be possible (because it uses avbin instead of ffmpeg). For moviestim2 and moviestim3 they do use ffmpeg libs and so the key is getting them to see your copy rather than the one in the PsychoPy installation.

For MovieStim3 I think that might be as simple as removing the one we provided and making sure your own ffmpeg is on the path (in a terminal can you just type ffmpeg and it finds it?) because I think it tries to use ffmpeg on the system path first and downloads a copy if it can't find one. MovieStim2 uses ffmpeg via OpenCV and I don't know how opencv searches for it.

Do include full error messages if you need further help

Jon
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/b0f24f56-f196-4728-8a55-f6f2f246c504%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Jonathan Peirce
http://www.peirce.org.uk


This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
Reply all
Reply to author
Forward
0 new messages