this should be cross referenced
:)
On Thu, Feb 12, 2015 at 4:32 PM, Florian Krause wrote:
> Hi there,
>
> I think I found another bug. When drawing a cross, defined as:
>
> pygame.draw.polygon(screen, [255,0,0], [[11, 0], [11, 9], [20, 9], [20,
> 11], [11, 11], [11, 20], [9, 20], [9, 11], [
Hi,
this is the first result in google for 'ffmpeg python piping' search:
http://zulko.github.io/blog/2013/09/27/read-and-write-video-frames-in-python-using-ffmpeg/
it is a good step by step tutorial, it helped me to make my player, however
I made it for playing image sequences, not videos, but th
That did the trick
from codecs import open
pygame.mixer.music.load(open(file_path))
That was all that was needed in the end.
Thanks a lot :)
Bo)
Gino Ingras skrev den 2015-02-14 14:02:
Bo,
i just forgot one last think in my copy/paste code.
last but not least, otherwise it effectively don't
Yesterday, I pushed an updated compat.py to the BitBucket repository. It looks
like the changes weren't merged how I expected because I see a "multiple heads"
notice when I look at __init__.py on BitBucket. I'll straighten out my mistake
as soon as possible (probably tomorrow).
More detail:
Bo,
i just forgot one last think in my copy/paste code.
last but not least, otherwise it effectively don't work.
from codecs import open
are you sure that file is compliant?
i'd test my code on linux and win7, both work well with same code and same
ogg file.
and i have sames errors as youres if
Greg Ewing skrev den 2015-02-14 12:46:
Bo Jangeborg wrote:
According to the documentation
one should be able to pass an object as a parameter
but I am not sure if I am doing it the right way.
I think it means a file object, not the file contents:
file_path = "07-Boabdil, Bulerías.ogg"
fi
Bo Jangeborg wrote:
According to the documentation
one should be able to pass an object as a parameter
but I am not sure if I am doing it the right way.
I think it means a file object, not the file contents:
file_path = "07-Boabdil, Bulerías.ogg"
fi = open(file_path, 'rb')
pygame.mixer.
This is what I get if I run your code:
07-Boabdil, Bulerías.ogg
07-Boabdil, Bulerías.ogg
Traceback (most recent call last):
File "C:\Users\Bo\Projekt\eclipse workspace\Bo\nametest.py", line 16,
in
pygame.mixer.music.load(open(file_path))
pygame.error: Not an Ogg Vorbis audio stream
and
see also https://www.python.org/dev/peps/pep-0263/
i'd got a similar problem between windows, dos, and linux filesnames, ascii
files.
i'd try your exacte copy "07-Boabdil, Bulerías.ogg".
exact code is:
#!/usr/bin/env python
# -*- coding: utf8 -*-
import os
import pygame
from pygame.locals impor
you should learn about codecs strings inputs/output.
ensure you always work with the same, utf8.
most of python modules are based on, and python3 assume by default as in
python2 you got
from __future__ import unicode_literals
see (in french, sorry) a good link:
http://sametmax.com/lencoding-en-py
Decoding doesn't help here.
I am using # -*- coding: utf8 -*-
Your saying that it works for you, did
you try that specific file name ?
"07-Boabdil, Bulerías.ogg"
Gino Ingras skrev den 2015-02-14 09:43:
assume in line 2:
# -*- coding: utf8 -*-
...
from codecs import open
...
#don't know if your
Greg Ewing skrev den 2015-02-14 02:00:
Bo Jangeborg wrote:
file_path = "07-Boabdil, Bulerías.ogg"
fi = open(file_path, 'rb').read()
pygame.mixer.music.load(fi)
But that gets me the Error:
"File path 'OggS' contains null characters"
music.load() expects to be passed the name of a file,
not the
assume in line 2:
# -*- coding: utf8 -*-
...
from codecs import open
...
#don't know if your file_path is hard coded, if not you may
file_path = file_path.decode('utf8')
...
#and then, as Greg told:
pygame.mixer.music.load(open(file_path))
work fine on win7 and linux(Mint17)
2015-02-14 2:00 GMT+
13 matches
Mail list logo