GithubHelp home page GithubHelp logo

mhaller / pyffmpeg Goto Github PK

View Code? Open in Web Editor NEW
265.0 265.0 59.0 1.33 MB

PyFFmpeg - Python FFmpeg wrapper

Home Page: https://mhaller.github.io/pyffmpeg

License: GNU Lesser General Public License v3.0

Python 100.00%

pyffmpeg's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyffmpeg's Issues

pyffmpeg doesn't compile with newer versions of ffmpeg

On Ubuntu 11.10, pyffmpeg doesn't compile with the version of ffmpeg in the repos. This is probably also the case with any recent build of ffmpeg.

ffmpeg version info:

ffmpeg version 0.7.2-4:0.7.2-1ubuntu1, Copyright (c) 2000-2011 the Libav developers
  built on Oct  2 2011 15:13:26 with gcc 4.6.1
  configuration: --extra-version='4:0.7.2-1ubuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
  libavutil    51.  7. 0 / 51.  7. 0
  libavcodec   53.  5. 0 / 53.  5. 0
  libavformat  53.  2. 0 / 53.  2. 0
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2.  4. 0 /  2.  4. 0
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  52.  0. 0 / 52.  0. 0

build log:

$ python setup.py build
Remember: Edit at first ffmpegpath within setup.py
running build
running build_ext
skipping 'pyffmpeg.c' Cython extension (up-to-date)
building 'pyffmpeg' extension
C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC

compile options: '-I/opt/codecs/include -I/usr/include -I./include -I/usr/lib/pymodules/python2.7/numpy/core/include -I/usr/include/python2.7 -c'
gcc: pyffmpeg.c
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_13AFFMpegReader_2open’:
pyffmpeg.c:3557:13: warning: variable ‘__pyx_v_track_selector’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_5Track_5init’:
pyffmpeg.c:4553:65: error: ‘struct AVCodecContext’ has no member named ‘hurry_up’
pyffmpeg.c:4178:13: warning: variable ‘__pyx_v_observer’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_5Track_9_reopencodec’:
pyffmpeg.c:5559:7: warning: variable ‘__pyx_v_ret’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_10VideoTrack_init’:
pyffmpeg.c:8193:7: warning: variable ‘__pyx_v_i’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_f_8pyffmpeg_10VideoTrack__read_current_ref_index’:
pyffmpeg.c:9694:7: warning: variable ‘__pyx_v_xydirection’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c:9688:7: warning: variable ‘__pyx_v_mv_stride’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_10VideoTrack_10_get_current_frame_without_copy’:
pyffmpeg.c:10481:7: warning: variable ‘__pyx_v_numBytes’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c:10480:19: warning: variable ‘__pyx_v_pFrameRes’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_10VideoTrack_18set_hurry’:
pyffmpeg.c:11628:81: error: ‘struct AVCodecContext’ has no member named ‘hurry_up’
pyffmpeg.c:11667:81: error: ‘struct AVCodecContext’ has no member named ‘hurry_up’
pyffmpeg.c: In function ‘__pyx_f_8pyffmpeg_10VideoTrack__convert_to’:
pyffmpeg.c:11826:3: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type [enabled by default]
/usr/include/libswscale/swscale.h:233:5: note: expected ‘const uint8_t * const*’ but argument is of type ‘uint8_t **’
pyffmpeg.c:11697:26: warning: variable ‘__pyx_v_pCodecCtx’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_f_8pyffmpeg_10VideoTrack__convert_withbuf’:
pyffmpeg.c:11996:3: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type [enabled by default]
/usr/include/libswscale/swscale.h:233:5: note: expected ‘const uint8_t * const*’ but argument is of type ‘uint8_t **’
pyffmpeg.c:11885:26: warning: variable ‘__pyx_v_pCodecCtx’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_12FFMpegReader_4open’:
pyffmpeg.c:13275:3: error: unknown type name ‘FF_INTERNAL_MEM_TYPE’
pyffmpeg.c:13583:7: warning: ‘url_setbufsize’ is deprecated (declared at /usr/include/libavformat/avio.h:286) [-Wdeprecated-declarations]
pyffmpeg.c:13648:57: error: ‘FF_INTERNAL_MEM_TYPE’ undeclared (first use in this function)
pyffmpeg.c:13648:57: note: each undeclared identifier is reported only once for each function it appears in
pyffmpeg.c:13825:5: warning: ‘av_open_input_stream’ is deprecated (declared at /usr/include/libavformat/avformat.h:1032) [-Wdeprecated-declarations]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_12FFMpegReader_6__finalize_open’:
pyffmpeg.c:14584:32: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
pyffmpeg.c:14760:32: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_12FFMpegReader_8process_current_packet’:
pyffmpeg.c:15945:56: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
pyffmpeg.c:15989:56: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
pyffmpeg.c:15862:7: warning: variable ‘__pyx_v_processed’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_11VideoStream_6GetCurrentFrame’:
pyffmpeg.c:19141:13: warning: variable ‘__pyx_v_fno’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_11VideoStream_7GetNextFrame’:
pyffmpeg.c:19237:13: warning: variable ‘__pyx_v_fno’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘initpyffmpeg’:
pyffmpeg.c:22575:30: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
pyffmpeg.c:22592:30: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_13AFFMpegReader_2open’:
pyffmpeg.c:3557:13: warning: variable ‘__pyx_v_track_selector’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_5Track_5init’:
pyffmpeg.c:4553:65: error: ‘struct AVCodecContext’ has no member named ‘hurry_up’
pyffmpeg.c:4178:13: warning: variable ‘__pyx_v_observer’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_5Track_9_reopencodec’:
pyffmpeg.c:5559:7: warning: variable ‘__pyx_v_ret’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_10VideoTrack_init’:
pyffmpeg.c:8193:7: warning: variable ‘__pyx_v_i’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_f_8pyffmpeg_10VideoTrack__read_current_ref_index’:
pyffmpeg.c:9694:7: warning: variable ‘__pyx_v_xydirection’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c:9688:7: warning: variable ‘__pyx_v_mv_stride’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_10VideoTrack_10_get_current_frame_without_copy’:
pyffmpeg.c:10481:7: warning: variable ‘__pyx_v_numBytes’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c:10480:19: warning: variable ‘__pyx_v_pFrameRes’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_10VideoTrack_18set_hurry’:
pyffmpeg.c:11628:81: error: ‘struct AVCodecContext’ has no member named ‘hurry_up’
pyffmpeg.c:11667:81: error: ‘struct AVCodecContext’ has no member named ‘hurry_up’
pyffmpeg.c: In function ‘__pyx_f_8pyffmpeg_10VideoTrack__convert_to’:
pyffmpeg.c:11826:3: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type [enabled by default]
/usr/include/libswscale/swscale.h:233:5: note: expected ‘const uint8_t * const*’ but argument is of type ‘uint8_t **’
pyffmpeg.c:11697:26: warning: variable ‘__pyx_v_pCodecCtx’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_f_8pyffmpeg_10VideoTrack__convert_withbuf’:
pyffmpeg.c:11996:3: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type [enabled by default]
/usr/include/libswscale/swscale.h:233:5: note: expected ‘const uint8_t * const*’ but argument is of type ‘uint8_t **’
pyffmpeg.c:11885:26: warning: variable ‘__pyx_v_pCodecCtx’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_12FFMpegReader_4open’:
pyffmpeg.c:13275:3: error: unknown type name ‘FF_INTERNAL_MEM_TYPE’
pyffmpeg.c:13583:7: warning: ‘url_setbufsize’ is deprecated (declared at /usr/include/libavformat/avio.h:286) [-Wdeprecated-declarations]
pyffmpeg.c:13648:57: error: ‘FF_INTERNAL_MEM_TYPE’ undeclared (first use in this function)
pyffmpeg.c:13648:57: note: each undeclared identifier is reported only once for each function it appears in
pyffmpeg.c:13825:5: warning: ‘av_open_input_stream’ is deprecated (declared at /usr/include/libavformat/avformat.h:1032) [-Wdeprecated-declarations]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_12FFMpegReader_6__finalize_open’:
pyffmpeg.c:14584:32: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
pyffmpeg.c:14760:32: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_12FFMpegReader_8process_current_packet’:
pyffmpeg.c:15945:56: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
pyffmpeg.c:15989:56: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
pyffmpeg.c:15862:7: warning: variable ‘__pyx_v_processed’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_11VideoStream_6GetCurrentFrame’:
pyffmpeg.c:19141:13: warning: variable ‘__pyx_v_fno’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘__pyx_pf_8pyffmpeg_11VideoStream_7GetNextFrame’:
pyffmpeg.c:19237:13: warning: variable ‘__pyx_v_fno’ set but not used [-Wunused-but-set-variable]
pyffmpeg.c: In function ‘initpyffmpeg’:
pyffmpeg.c:22575:30: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
pyffmpeg.c:22592:30: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/opt/codecs/include -I/usr/include -I./include -I/usr/lib/pymodules/python2.7/numpy/core/include -I/usr/include/python2.7 -c pyffmpeg.c -o build/temp.linux-x86_64-2.7/pyffmpeg.o" failed with exit status 1

Object of type 'AVFormatContext' has no attribute 'data_offset' with python setup build

I get this error {Object of type 'AVFormatContext' has no attribute 'data_offset'} after : python setup.py build


pyffmpeg.pyx:4564:43: Invalid types for '==' (AVMediaType, CodecType)

Error compiling Cython file:

...
ret = av_seek_frame(self.FormatCtx,-1,byte, AVSEEK_FLAG_BACKWARD|AVSEEK
_FLAG_BYTE)#|AVSEEK_FLAG_ANY)
if ret < 0:
raise IOError("Unable to seek: %d" % (ret,))
if (self.io_context!=NULL):
# used to have & here
avio_seek(self.FormatCtx.pb, self.FormatCtx.data_offset, SEEK_SET)

^

pyffmpeg.pyx:4738:55: Object of type 'AVFormatContext' has no attribute 'data_offset'
building 'pyffmpeg' extension
creating build
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nolo
go /Ox /W3 /GL /DNDEBUG /MD -IC:\Anaconda3\lib\site-packages\numpy\core\include
-IC:\ffmpeg-win64-static\include -IC:\Anaconda3\include -IC:\Anaconda3\include -
I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program
Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" -I"C:\Program Files
(x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windo
ws Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\in
clude\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Pro
gram Files (x86)\Windows Kits\8.1\include\winrt" /Tcpyffmpeg.c /Fobuild\temp.wi
n-amd64-3.5\Release\pyffmpeg.obj -static-libgcc
Found executable C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd6
4\cl.exe
cl : Command line warning D9002 : ignoring unknown option '-static-libgcc'
pyffmpeg.c
pyffmpeg.c(1): fatal error C1189: #error: Do not use this file, it is the resul
t of a failed Cython compilation.
error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64
\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Anaconda3\lib\site-packages\num
py\core\include -IC:\ffmpeg-win64-static\include -IC:\Anaconda3\include -IC:\Ana
conda3\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE
" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" -I"C
:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program F
iles (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Win
dows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\includ
e\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcpyffmpeg.c
/Fobuild\temp.win-amd64-3.5\Release\pyffmpeg.obj -static-libgcc" failed with exi
t status 2

Python 3.X support!

Collecting pyffmpeg from git+git://github.com/mhaller/pyffmpeg.git#egg=pyffmpeg (from -r requirements.txt (line 1))
  Cloning git://github.com/mhaller/pyffmpeg.git to /private/var/folders/t3/z9_f5hg928q3gy1q0xhj7ttw0000gn/T/pip-build-3uvzvduo/pyffmpeg
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/t3/z9_f5hg928q3gy1q0xhj7ttw0000gn/T/pip-build-3uvzvduo/pyffmpeg/setup.py", line 9
        print "Remember: Edit at first ffmpegpath within setup.py"
                                                                 ^
    SyntaxError: Missing parentheses in call to 'print'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/t3/z9_f5hg928q3gy1q0xhj7ttw0000gn/T/pip-build-3uvzvduo/pyffmpeg

setup.py problem

the setup.py doesnt work, in the python file there is a type error, the script is trying to add list and string, how can i fix it? and what path do i need to change to in ffmpegpath?
and by the way the 2.1 version doesnt work either i transfered the files to the folder Lib\site-packages
and i still cant import pyffmpeg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.