Git Product home page Git Product logo

gmf's Introduction

Go FFmpeg Bindings

Installation

Prerequisites

Current master branch supports all major Go versions, starting from 1.6.

Build/install FFmpeg

build lastest version of ffmpeg, obtained from https://github.com/FFmpeg/FFmpeg
There is one required option, which is disabled by default, you should turn on: --enable-shared

E.g.:

./configure --prefix=/usr/local/ffmpeg --enable-shared
make
make install

Add pkgconfig path:

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/ffmpeg/lib/pkgconfig/

Ensure, that PKG_CONFIG_PATH contains path to ffmpeg's pkgconfig folder.

# check it by running
pkg-config --libs libavformat

It should print valid path to the avformat library.

Now, just run

go get github.com/3d0c/gmf
Other methods

This package uses pkg-config way to obtain flags, includes and libraries path, so if you have ffmpeg installed, just ensure, that your installation has them (pkgconfig/ folder with proper pc files).

Docker containers

Thanks to @ergoz you can try a docker container riftbit/ffalpine

Thanks to @denismakogon there is one more project, worth to mention https://github.com/denismakogon/ffmpeg-debian

Usage

Please see examples.

Support and Contribution

If something doesn't work, just fix it. Do not hesitate to pull request.

Credits

I borrowed the name from project, abandoned on code.google.com/p/gmf. Original code is available here in intitial commit from 03 Apr 2013.

gmf's People

Contributors

3d0c avatar baadc0de avatar brandonbloom avatar ccaum avatar cowboyrushforth avatar daozhao avatar denismakogon avatar ergoz avatar fabian-z avatar fand avatar flavioribeiro avatar gokalper avatar hn82123 avatar infinityb avatar jasonmoo avatar kaisawind avatar kishorevignesh avatar kitech avatar lukas-heiligenbrunner avatar mheers avatar mkrufky avatar mristin avatar prudhvirajkr avatar reijnenhhfm avatar samwhited avatar seanthomaswilliams avatar slugalisk avatar turingzhu avatar umitanuki avatar vvelikodny avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmf's Issues

Running in Docker container

Is there any example to implement this library with FFmpeg in a application which runs on a Docker environment?

How to create a Packet from memory

Hello!

I am looking to write a program that takes raw encoded video and then decodes it, and encodes it in another format. How would I go about creating packets from a []byte or similar?

frame to image.Image interface conversion

Hello, I am using gmf to decode video stream and read qr-codes from this stream using this library github.com/kdar/goquirc. It expects the image.Image interface as an input for Decode() function, so right now I am doing something like this:

for frame := range packet.Frames(ist.CodecCtx()) {
    swsCtx.Scale(frame, dstFrame)

    if p, ready, _ := dstFrame.EncodeNewPacket(cc); ready {
        // Decode image
        m, _, err := image.Decode(bytes.NewReader(p.Data()))
        if err != nil {
            log.Fatal(err)
        }

        // Decode QR Code
        text, err := decoder.Decode(m)
        if err != nil {
            log.Fatal(err)
        }

        chunk := text[0]

        fmt.Printf("%s,%d,%s\n", strings.ToLower(srcFileName)[:len(srcFileName)-5], frame.TimeStamp(), B2S(chunk.Payload[:chunk.PayloadLen]))

        defer gmf.Release(p)
    }
}

This is from the example here (https://github.com/3d0c/gmf/blob/master/examples/video-to-jpeg.go)
It works but does not look good to me, since I am encoding and decoding a frame just to get image.Image interface. Is there a way to get access to frame data so I could implement Image interface and would not do unnecessary encoding step?

I am new to golang, so if there is an easier way and I am doing something wrong, please tell me.

gmf AVIO WritePacket issue

AVIO WritePacket is blocked after calling av_interleaved_write_frame with ffmpeg 2.5.3, but if you use ffmpeg 2.4.3 , it`s OK.

Problem with transcode an h264 video

For further work I tried to transcode an H264/AVC Video (record with an iPhone) like your provided example. It creates an valid video file but many frames are dropped and the message [mpeg4 @ 0x580aa00] warning, too many b frames in a row is thrown many times. I'm not sure why that happens. I already tried to use the CopyExtra(ist *Stream) *CodecCtx to get more Information from the incoming stream, but it doesn't help. Do you have any suggestion or did you have a similar problem with transcoding?

readCallback and size of bytes to read

In readCallback, handlers.readPacket is called without being given the input buffer size from libav. Doesn't it mean readPacket function can overflow the expected size of buffer? I would add two arguments buf and buf_size to readPacket callback. Or am I missing something?

Audio resample

There seems to be missing functionality in audio re-sampling. I think the subject has been shortly touched upon in #19 from @hn82123 where a recalculation of nb_samples is needed.

Am I correct on this matter - will re-sampling require a PR to fix?

Go - Cross Compilation for ARM

Everything working fine with amd64 but when we are compiling it for arm, after setting GOARCH=arm, it is giving it below error, please advise how to solve it

src/Manager/MediaManager.go:28: undefined: FmtCtx
src/MediaManager.go:28: undefined: Stream
src/Manager/MediaManager.go:29: undefined: CodecCtx
src/Manager/MediaManager.go:30: undefined: Stream
src/Manager/MediaManager.go:32: undefined: FindEncoder
src/Manager/MediaManager.go:32: undefined: Codec
src/Manager/MediaManager.go:40: undefined: NewCodecCtx
src/Manager/MediaManager.go:46: undefined: CODEC_FLAG_GLOBAL_HEADER
src/Manager/MediaManager.go:50: undefined: FF_COMPLIANCE_EXPERIMENTAL
src/Manager/MediaManager.go:53: undefined: AVMEDIA_TYPE_AUDIO

Regards,

GCC deprecation error building gmf

When I tried to build gmf against latest FFMpeg, I get the following error:

github.com/3d0c/gmf

./packet.go: In function ‘_cgo_a1ea5f6a94a1_Cfunc_av_free_packet’:
./packet.go:61:2: warning: ‘av_free_packet’ is deprecated [-Wdeprecated-declarations]
if ret < 0 {
^
In file included from ./packet.go:7:0:
/usr/local/ffmpeg/include/libavcodec/avcodec.h:3980:6: note: declared here
void av_free_packet(AVPacket *pkt);

This is fixed by adding:

cgo CFLAGS: -Wno-deprecated-declarations

WebP example

I use the following CLI-command to get webp image (screenshot):

ffmpeg -i video.ts -ss 00:00:00.100 -vframes 1 screen.webp

I tried to modify video-to-jpeg.go, but in result I got empty files with .webp extensions (if I use gmf.AV_PIX_FMT_RGB32) or error ... :

[libwebp_anim @ 0x709da00] Specified pixel format argb is invalid or not supported
2016/05/12 18:38:30 Error opening codec 'libwebp_anim:libwebp WebP image', averror: Invalid argument

... if I use gmf.AV_PIX_FMT_ARGB

Code:

package main

import (
    "log"
    "os"
    "strconv"

    "github.com/3d0c/gmf"
)

func assert(i interface{}, err error) interface{} {
    if err != nil {
        log.Fatal(err)
    }

    return i
}

var i int = 0

func writeFile(b []byte) {
    name := strconv.Itoa(i) + ".webp"

    fp, err := os.Create(name)
    if err != nil {
        log.Fatal(err)
    }

    defer func() {
        if err := fp.Close(); err != nil {
            log.Fatal(err)
        }
        i++
    }()

    if n, err := fp.Write(b); err != nil {
        log.Fatal(err)
    } else {
        log.Println(n, "bytes written to", name)
    }
}

func main() {
    srcFileName := "video.ts"

    inputCtx := assert(gmf.NewInputCtx(srcFileName)).(*gmf.FmtCtx)
    defer inputCtx.CloseInputAndRelease()

    srcVideoStream, err := inputCtx.GetBestStream(gmf.AVMEDIA_TYPE_VIDEO)
    if err != nil {
        log.Println("No video stream found in", srcFileName)
    }

    codec, err := gmf.FindEncoder(gmf.AV_CODEC_ID_WEBP)
    if err != nil {
        log.Fatal(err)
    }

    cc := gmf.NewCodecCtx(codec)
    defer gmf.Release(cc)

    cc.SetPixFmt(gmf.AV_PIX_FMT_ARGB).SetWidth(srcVideoStream.CodecCtx().Width()).SetHeight(srcVideoStream.CodecCtx().Height())

    if codec.IsExperimental() {
        cc.SetStrictCompliance(gmf.FF_COMPLIANCE_EXPERIMENTAL)
    }

    if err := cc.Open(nil); err != nil {
        log.Fatal(err)
    }

    swsCtx := gmf.NewSwsCtx(srcVideoStream.CodecCtx(), cc, gmf.SWS_BICUBIC)
    defer gmf.Release(swsCtx)

    dstFrame := gmf.NewFrame().SetWidth(srcVideoStream.CodecCtx().Width()).SetHeight(srcVideoStream.CodecCtx().Height()).SetFormat(gmf.AV_PIX_FMT_ARGB)
    defer gmf.Release(dstFrame)

    if err := dstFrame.ImgAlloc(); err != nil {
        log.Fatal(err)
    }

    for packet := range inputCtx.GetNewPackets() {
        if packet.StreamIndex() != srcVideoStream.Index() {
            // skip non video streams
            continue
        }
        ist := assert(inputCtx.GetStream(packet.StreamIndex())).(*gmf.Stream)

        for frame := range packet.Frames(ist.CodecCtx()) {
            swsCtx.Scale(frame, dstFrame)

            if p, ready, _ := dstFrame.EncodeNewPacket(cc); ready {
                writeFile(p.Data())
                defer gmf.Release(p)
            }
        }
        gmf.Release(packet)
    }

    gmf.Release(dstFrame)
}

Could you say how to do it right?

How to write image.Image to the frame?

I only want to compose a video by writing a series of images.

So I'm looking at the encode.go example and have no idea how to write a go image.* (let it be RGBA or whatever) to each frame written to the video via frame.SetData.

Build error libavfilter.so missing

➜ ws-highlight go get github.com/3d0c/gmf

github.com/3d0c/gmf

/usr/bin/ld: warning: libavfilter.so.5, needed by /usr/local/ffmpeg/lib/libavdevice.so, not found (try using -rpath or -rpath-link)
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_register_all@LIBAVFILTER_5' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference toavfilter_get_by_name@LIBAVFILTER_5'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_graph_config@LIBAVFILTER_5' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference toavfilter_inout_free@LIBAVFILTER_5'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_link_get_channels@LIBAVFILTER_5' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference toav_buffersink_get_frame_flags@LIBAVFILTER_5'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_graph_alloc@LIBAVFILTER_5' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference toavfilter_graph_dump@LIBAVFILTER_5'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_graph_free@LIBAVFILTER_5' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference toavfilter_graph_parse_ptr@LIBAVFILTER_5'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_graph_create_filter@LIBAVFILTER_5' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference toavfilter_link@LIBAVFILTER_5'
collect2: error: ld returned 1 exit status

signal arrived during cgo execution

system: Mac OSX 10.9
go version go1.2 darwin/amd64
ffmpeg version 2.1.4 Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 3 2014 09:09:13 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-gnutls --enable-fontconfig --enable-libfreetype --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
libavutil 52. 48.101 / 52. 48.101
libavcodec 55. 39.101 / 55. 39.101
libavformat 55. 19.104 / 55. 19.104
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 90.100 / 3. 90.100
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100

go run encoding.go
[mpeg @ 0x6812600] VBV buffer size not set, muxing may fail
2014/08/08 16:37:30 Write frame=1 size=17078 pts=0 dts=-3600
2014/08/08 16:37:30 Write frame=2 size=17718 pts=3600 dts=0
2014/08/08 16:37:30 Write frame=3 size=8800 pts=7200 dts=3600
2014/08/08 16:37:30 Write frame=4 size=8459 pts=10800 dts=7200
2014/08/08 16:37:31 Write frame=5 size=8248 pts=14400 dts=10800
2014/08/08 16:37:31 Write frame=6 size=6848 pts=18000 dts=14400
2014/08/08 16:37:31 Write frame=7 size=5171 pts=21600 dts=18000
2014/08/08 16:37:31 Write frame=8 size=5501 pts=25200 dts=21600
2014/08/08 16:37:31 Write frame=9 size=3938 pts=28800 dts=25200
2014/08/08 16:37:31 Write frame=10 size=4722 pts=32400 dts=28800
2014/08/08 16:37:31 Write frame=11 size=4024 pts=36000 dts=32400
2014/08/08 16:37:31 Write frame=12 size=4970 pts=39600 dts=36000
2014/08/08 16:37:31 Write frame=13 size=21005 pts=43200 dts=39600
2014/08/08 16:37:31 Write frame=14 size=3352 pts=46800 dts=43200
2014/08/08 16:37:31 Write frame=15 size=4241 pts=50400 dts=46800
2014/08/08 16:37:31 Write frame=16 size=3188 pts=54000 dts=50400
2014/08/08 16:37:32 Write frame=17 size=3008 pts=57600 dts=54000
2014/08/08 16:37:32 Write frame=18 size=2667 pts=61200 dts=57600
2014/08/08 16:37:32 Write frame=19 size=3446 pts=64800 dts=61200
2014/08/08 16:37:32 Write frame=20 size=2850 pts=68400 dts=64800
2014/08/08 16:37:32 Write frame=21 size=2912 pts=72000 dts=68400
2014/08/08 16:37:32 Write frame=22 size=2771 pts=75600 dts=72000
2014/08/08 16:37:32 Write frame=23 size=2854 pts=79200 dts=75600
2014/08/08 16:37:32 Write frame=24 size=3097 pts=82800 dts=79200
2014/08/08 16:37:32 Write frame=25 size=14828 pts=86400 dts=82800
SIGSEGV: segmentation violation
PC=0x4270965
signal arrived during cgo execution

runtime.cgocall(0x4001cc0, 0x6561c28)
/usr/local/go/src/pkg/runtime/cgocall.c:149 +0x11b fp=0x6561c10
github.com/3d0c/gmf._Cfunc_av_write_trailer(0x6812600, 0x0)
github.com/3d0c/gmf/_obj/_cgo_defun.c:419 +0x31 fp=0x6561c28
github.com/3d0c/gmf.(*FmtCtx).CloseOutput(0xc210050020)
/Users/daozhao/Documents/SourceCode/goPath/src/github.com/3d0c/gmf/format.go:172 +0x68 fp=0x6561c40
main.main()
/Users/daozhao/Documents/SourceCode/goPath/src/github.com/3d0c/gmf/examples/encoding.go:106 +0xdb1 fp=0x6561f48
runtime.main()
/usr/local/go/src/pkg/runtime/proc.c:220 +0x11f fp=0x6561fa0
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1394 fp=0x6561fa8

goroutine 3 [syscall]:
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1394

rax 0x0
rbx 0x7800000
rcx 0x7029600
rdx 0x7029600
rdi 0x7800000
rsi 0x0
rbp 0x7029600
rsp 0x7fff5fbff600
r8 0x2d3
r9 0x8000000000000000
r10 0x4389b10
r11 0x80124a
r12 0x0
r13 0x4270960
r14 0x0
r15 0x5
rip 0x4270965
rflags 0x10246
cs 0x2b
fs 0x0
gs 0x0
exit status 2

'AVCODEC_MAX_AUDIO_FRAME_SIZE' undeclared

go get github.com/3d0c/gmf/gmf

1: error: 'AVCODEC_MAX_AUDIO_FRAME_SIZE' undeclared (first use in this function)
1: note: each undeclared identifier is reported only once for each function it appears in
1: error: 'avcodec_get_context_defaults2' undeclared (first use in this function)

$ ffmpeg

ffmpeg version git-2013-08-12-c103d5f Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 12 2013 18:07:57 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
libavutil 52. 42.100 / 52. 42.100
libavcodec 55. 27.100 / 55. 27.100
libavformat 55. 13.102 / 55. 13.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

OS: Ubuntu 12.04 64bit

C.av_codec_iterate

Hi,
I am trying to install Live Stream Analyzer on my Raspberry Pi 3B+ (Raspbian Kernel 4.14.98-v7+) for which gmf is a prerequisite.
I installed ffmpeg Version 3.2.12-1 via apt-get including all development packages (libavutil-dev, libavcodec-dev, etc.)

libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100

Unfortunately "go get" installation of gmf exit with the following error message:

#github.com/3d0c/gmf
could not determine kind of name for C.av_codec_iterate

Thankful for any hints to solve this issue.

Cheers
Jens

Seek and extract jpeg

One thing I learned with using ffmpeg on the command line is that the absolutely fastest way to extract JPEGs from a video is to do something like this:

ffmpeg -ss 00:00:01 -i tests-sample.mp4 -vframes 1 ./tmp2/01.jpg
ffmpeg -ss 00:00:02 -i tests-sample.mp4 -vframes 1 ./tmp2/02.jpg
ffmpeg -ss 00:00:03 -i tests-sample.mp4 -vframes 1 ./tmp2/03.jpg
...

I modified the video-to-jpeg-p.go example so that it only generates 14 thumbnails (from a ~14 second video) (using 10 workers).
So both your example script and my little bash script produces 14 JPEGs.

Benchmarking these, it's clear that the bash script version is faster.

Would it be possible to do the same in gmf?
Like, opening a input context and seeking it to a certain number of seconds, then do something like dstFrame.EncodeNewPacket(cc).

Possibility to return the data after ImgAlloc()

Is there any possibility to get the data of the frame, after I call Frame.ImgAlloc()? Only errors will returned if there any or does I not see the right point?

func (this *Frame) ImgAlloc() error {
    if ret := int(C.av_image_alloc(
        (**C.uint8_t)(unsafe.Pointer(&this.avFrame.data)),
        (*_Ctype_int)(unsafe.Pointer(&this.avFrame.linesize)),
        C.int(this.Width()), C.int(this.Height()), int32(this.Format()), 32)); ret < 0 {
        return errors.New(fmt.Sprintf("Unable to allocate raw image buffer: %v", AvError(ret)))
    }

    return nil
}

Installation error

I've got installation error while install

./codec.go:29: constant -9223372036854775808 overflows int

Bad jpeg quality

Hello.

I am trying to make the quality for jpeg file same as video has but it is not working as I expect.

There is Frame.SetQuality func which set the quality in C struct which I have tried to call here but it has no effect on jpeg files(sha1sum stays the same).

Do you have some idea why quality has no effect? I want to fix this :)

Help - Decoding H.264 Stream from Channel

I really have tried reading the examples and tests, but I can't seem to put together the code to extract RGBA images from a stream of H.264 data coming in as a channel of []byte.

Nearly all the examples assume a file as the source; I think I need to use AVIO for a channel, but nothing I try seems to work.

Can anyone provide either the steps I need to follow, or code to achieve this?

Invalid Thumbnails

I tried the examples video-to-jpeg.go and video-to-jpeg-p.go, and both are producing invalid JPGs. I tried several mp4 and avi files, as well as the tests-sample.mp4 that's included with the examples. I tried viewing the created JPGs with several image viewers which all failed, and I took a look at the binary code in the files and they do not appear to be jpgs. I'm not having any problems creating thumbnails using the ffmpeg command line app. I didn't have any problems building gmf.

I wish this was a problem I could fix myself, but ffmpeg internals are a little over my head. Here's my info.

$ go version
go version go1.3.1 linux/amd64

$ ffmpeg -version
ffmpeg version N-65769-ga6af4bf Copyright (c) 2000-2014 the FFmpeg developers
built on Aug 20 2014 00:11:34 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/usr/local/ffmpeg --enable-shared
libavutil 54. 5.100 / 54. 5.100
libavcodec 56. 0.101 / 56. 0.101
libavformat 56. 1.100 / 56. 1.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.100 / 5. 0.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100

$ echo $PKG_CONFIG_PATH
/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/local/ffmpeg/lib/pkgconfig

$ pkg-config --libs libavformat
-L/usr/local/ffmpeg/lib -lavformat

go get failed

root@ubuntu-HP-ProDesk-680-G2-MT:~/software/ffmpeg-3.4.2# go get github.com/3d0c/gmf

github.com/3d0c/gmf

../../go/src/github.com/3d0c/gmf/packet.go: In function ‘_cgo_5625a69e2c98_Cfunc_av_copy_packet’:
../../go/src/github.com/3d0c/gmf/packet.go:52:2: warning: ‘av_copy_packet’ is deprecated [-Wdeprecated-declarations]
func (p *Packet) Decode(cc *CodecCtx) (*Frame, bool, int, error) {
^
In file included from ../../go/src/github.com/3d0c/gmf/packet.go:7:0:
/usr/local/include/libavcodec/avcodec.h:4630:5: note: declared here
int av_copy_packet(AVPacket *dst, const AVPacket *src);
^
../../go/src/github.com/3d0c/gmf/packet.go: In function ‘_cgo_5625a69e2c98_Cfunc_avcodec_decode_audio4’:
../../go/src/github.com/3d0c/gmf/packet.go:87:2: warning: ‘avcodec_decode_audio4’ is deprecated [-Wdeprecated-declarations]
In file included from ../../go/src/github.com/3d0c/gmf/packet.go:7:0:
/usr/local/include/libavcodec/avcodec.h:4944:5: note: declared here
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
^
../../go/src/github.com/3d0c/gmf/packet.go: In function ‘_cgo_5625a69e2c98_Cfunc_avcodec_decode_video2’:
../../go/src/github.com/3d0c/gmf/packet.go:104:2: warning: ‘avcodec_decode_video2’ is deprecated [-Wdeprecated-declarations]
if ret < 0 {
^
In file included from ../../go/src/github.com/3d0c/gmf/packet.go:7:0:
/usr/local/include/libavcodec/avcodec.h:4993:5: note: declared here
int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
^

github.com/3d0c/gmf

../../go/src/github.com/3d0c/gmf/stream.go: In function ‘_cgo_5625a69e2c98_Cfunc_avcodec_copy_context’:
../../go/src/github.com/3d0c/gmf/stream.go:45:2: warning: ‘avcodec_copy_context’ is deprecated [-Wdeprecated-declarations]
// and it should be decoder.
^
In file included from /usr/local/include/libavformat/avformat.h:319:0,
from ../../go/src/github.com/3d0c/gmf/stream.go:7:
/usr/local/include/libavcodec/avcodec.h:4412:5: note: declared here
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
^

github.com/3d0c/gmf

/usr/local/lib/libavutil.a(hwcontext_vaapi.o): In function vaapi_device_create': /home/ubuntu/software/ffmpeg-3.4.2/libavutil/hwcontext_vaapi.c:1197: undefined reference to vaGetDisplay'
/home/ubuntu/software/ffmpeg-3.4.2/libavutil/hwcontext_vaapi.c:1221: undefined reference to vaGetDisplayDRM' /usr/local/lib/libavutil.a(hwcontext_vdpau.o): In function vdpau_device_create':
/home/ubuntu/software/ffmpeg-3.4.2/libavutil/hwcontext_vdpau.c:439: undefined reference to `vdp_device_create_x11'
collect2: error: ld returned 1 exit status

root@ubuntu-HP-ProDesk-680-G2-MT:/software/ffmpeg-3.4.2# ffmpeg -version
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1
16.04.9) 20160609
configuration: --prefix=/usr/local
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100

unexpected signal during runtime execution

I am using master gmf with golang 1.7, I got this error when concurrency convert flv to mjpeg

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xaf7bab]

runtime stack:
runtime.throw(0x19d1577, 0x2a)
        /usr/local/go/src/runtime/panic.go:566 +0x95
runtime.sigpanic()
        /usr/local/go/src/runtime/sigpanic_unix.go:12 +0x2cc

goroutine 14747 [syscall, locked to thread]:
runtime.cgocall(0x895260, 0xc420358738, 0xc400000000)
        /usr/local/go/src/runtime/cgocall.go:131 +0x110 fp=0xc420358708 sp=0xc4203586c8
square_snapshot/vendor/github.com/3d0c/gmf._Cfunc_av_read_frame(0x7f6cd73fa8c0, 0xc420189560, 0xc400000000)
        ??:0 +0x4d fp=0xc420358738 sp=0xc420358708
square_snapshot/vendor/github.com/3d0c/gmf.(*FmtCtx).GetNewPackets.func1(0xc420187680, 0xc4204f3f20)
        /go/src/square_snapshot/vendor/github.com/3d0c/gmf/format.go:332 +0x157 fp=0xc4203587b0 sp=0xc420358738
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4203587b8 sp=0xc4203587b0
created by square_snapshot/vendor/github.com/3d0c/gmf.(*FmtCtx).GetNewPackets

what could I do with this error?

Image Capture Rotation

I'm using the example script to take screenshots of videos taken by Android and iOS devices. When the screen-shot is taken, it's always taken in landscape mode, even though the video's are portrait.

Playing back the video on my machine is fine (portrait). So I can't tell if FFMPG is playing back the video in landscape, or if the photo engine it rotating the screen-shots it's taking.

Is there a way to instruct the engine to snap the screen-shot as portrait? Alternatively, if FFMPG is playing the video back as landscape, is there a way to instruct it to rotate the video before playback?

Memory leak

Hello! I have some problem. And I can't resolve it. When I use sws_scale i have a memory leak.
In examples, I show only the main part of the code.

// reader.go
// ...
func (v *VFile) GetFrame() *gmf.Frame {
	f := gmf.NewFrame().
				SetWidth(960).
				SetHeight(480).
				SetFormat(gmf.AV_PIX_FMT_YUV420P)
	if err := f.ImgAlloc(); err != nil {
		log.Fatal(err)
	}
	return f
}
//...
for _, f := range frames {
	tmpFrame = v.GetFrame()
	v.SwsContext.Scale(f, tmpFrame)
	tmpFrame.SetPts(f.Pts())
	tmpFrame.SetPktPts(f.PktPts())
	tmpFrame.SetPktDts(f.PktDts())
	scaledFrames = append(scaledFrames, tmpFrame)
	f.Free() // free source frame
}
// ...

In next part i send scaledFrames through channel to another file(writer.go), create packages from frames:

//writer.go
//....
packets, err = stream.CodecCtx().Encode(f.Frames, f.Flush)
// I know, that in method Encode frames will be released
//...

And as result, i have memory leak. If do not scale frames and only clone data, memory will not leak.

// reader.go (without memory leak)
// ...
for _, f := range frames {
	// example without leak
	tmpFrame = v.GetFrame()
	tmpFrame.Free()
	// example
	tmpFrame = f.CloneNewFrame()
	tmpFrame.SetPts(f.Pts())
	tmpFrame.SetPktPts(f.PktPts())
	tmpFrame.SetPktDts(f.PktDts())
	scaledFrames = append(scaledFrames, tmpFrame)
	f.Free()
}
// ...

I have not checked how work example. Maybe i have problem by wrong version ffmpeg. If i will find some answers i write information bellow.
P.S Sorry for my English)

Crop video

Hey

Is there any way to crop a input video for a given dimensions using this lib

Thanks

Linking Issues with gmf master with ffmpeg tag n3.3.2

[kishore-4306@localhost ~]$ go get github.com/3d0c/gmf
&#35 github.com/3d0c/gmf
cgo-gcc-prolog: In function ‘_cgo_e1ea90aebbbc_Cfunc_avcodec_encode_audio2’:
cgo-gcc-prolog:197:2: warning: ‘avcodec_encode_audio2’ is deprecated (declared at /usr/local/ffmpeg/include/libavcodec/avcodec.h:5377) [-Wdeprecated-declarations]
cgo-gcc-prolog: In function ‘_cgo_e1ea90aebbbc_Cfunc_avcodec_encode_video2’:
cgo-gcc-prolog:218:2: warning: ‘avcodec_encode_video2’ is deprecated (declared at /usr/local/ffmpeg/include/libavcodec/avcodec.h:5416) [-Wdeprecated-declarations]
&#35github.com/3d0c/gmf
cgo-gcc-prolog: In function ‘_cgo_e1ea90aebbbc_Cfunc_avcodec_decode_audio4’:
cgo-gcc-prolog:87:2: warning: ‘avcodec_decode_audio4’ is deprecated (declared at /usr/local/ffmpeg/include/libavcodec/avcodec.h:4852) [-Wdeprecated-declarations]
cgo-gcc-prolog: In function ‘_cgo_e1ea90aebbbc_Cfunc_avcodec_decode_video2’:
cgo-gcc-prolog:108:2: warning: ‘avcodec_decode_video2’ is deprecated (declared at /usr/local/ffmpeg/include/libavcodec/avcodec.h:4901) [-Wdeprecated-declarations]
&#35github.com/3d0c/gmf
cgo-gcc-prolog: In function ‘_cgo_e1ea90aebbbc_Cfunc_avcodec_copy_context’:
cgo-gcc-prolog:42:2: warning: ‘avcodec_copy_context’ is deprecated (declared at /usr/local/ffmpeg/include/libavcodec/avcodec.h:4326) [-Wdeprecated-declarations]
&#35 github.com/3d0c/gmf
/usr/bin/ld: warning: libavfilter.so.6, needed by /usr/local/ffmpeg/lib/libavdevice.so, not found (try using -rpath or -rpath-link)
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to av_buffersink_get_channel_layout@LIBAVFILTER_6' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_pad_get_type@LIBAVFILTER_6'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_graph_alloc@LIBAVFILTER_6' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference to av_buffersink_get_sample_aspect_ratio@LIBAVFILTER_6'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to av_buffersink_get_w@LIBAVFILTER_6' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference to av_buffersink_get_channels@LIBAVFILTER_6'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_graph_parse_ptr@LIBAVFILTER_6' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_graph_create_filter@LIBAVFILTER_6'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to av_buffersink_get_format@LIBAVFILTER_6' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_graph_free@LIBAVFILTER_6'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_get_by_name@LIBAVFILTER_6' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference to av_buffersink_get_frame_flags@LIBAVFILTER_6'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to av_buffersink_get_type@LIBAVFILTER_6' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_inout_free@LIBAVFILTER_6'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to av_buffersink_get_h@LIBAVFILTER_6' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_register_all@LIBAVFILTER_6'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_graph_dump@LIBAVFILTER_6' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_graph_config@LIBAVFILTER_6'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to avfilter_link@LIBAVFILTER_6' /usr/local/ffmpeg/lib/libavdevice.so: undefined reference to av_buffersink_get_time_base@LIBAVFILTER_6'
/usr/local/ffmpeg/lib/libavdevice.so: undefined reference to `av_buffersink_get_sample_rate@LIBAVFILTER_6'
collect2: error: ld returned 1 exit status
[kishore-4306@localhost ~]$

Should Stream close CodecCtx?

Stream.Free() doesn't do anything, but current examples miss to call srcVideoStream.CodecCtx().Close(). I believe this results in leaking threads used in AVCodecContext (I observed this after create and destroy reading the same file more than 200 times in one process). I am working around by doing defer srcVideoStream.CodecCtx().Close() in the client code for now, but I wonder if there could be better support from gmf side. I tried adding Release for all open streams in FmtCtx, and having Stream.Free call cc.Close if this.cc is set. However it crashes very soon but not always, and I am running out of idea how to do it. I'm basically just spilling what's in my mind here, hoping someone gives better idea.

Panic streaming to nginx

I have a ffmpeg command line that runs well streaming to nginx rtmp module:

i want to control this from my code, so i implement proper output:

	outputFormat := gmf.FindOutputFmt("flv", "rtmp://localhost:1935/live/test", "")
	log.Println("OutputFormat:")
	log.Println("\t", outputFormat.Infomation())
	dashOutCtx, err := gmf.NewOutputCtx(outputFormat)
	if err != nil {
		panic(err)
	}
	for i := 0; i < inputCtx.StreamsCnt(); i++ {
		srcStream, err := inputCtx.GetStream(i)
		if err != nil {
			fmt.Println("GetStream error")
		}
		dashOutCtx.AddStreamWithCodeCtx(srcStream.CodecCtx())
	}

        for packet := range inputCtx.GetNewPackets() {
            if err := dashOutCtx.WritePacket(packet); err != nil {
		log.Println("Error writing to live stream:", err)
            }
        }

but it hits error immediately every time:

Error writing to live stream: Unable to write packet to 'rtmp://localhost:1935/live/test': Invalid argument
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7f958ca1606e]

runtime stack:
runtime.throw(0x924cb4, 0x2a)
        /usr/local/go/src/runtime/panic.go:608 +0x72
runtime.sigpanic()
        /usr/local/go/src/runtime/signal_unix.go:374 +0x2f2

goroutine 14 [syscall]:
runtime.cgocall(0x814140, 0xc0000cfb78, 0xc000166d20)
        /usr/local/go/src/runtime/cgocall.go:128 +0x5e fp=0xc0000cfb48 sp=0xc0000cfb10 pc=0x42b58e
gitlab.com/cavillis/hsnotify/vendor/github.com/3d0c/gmf._Cfunc_av_interleaved_write_frame(0x7f952c04cb00, 0xc000166d20, 0xc000000000)
        _cgo_gotypes.go:1676 +0x4d fp=0xc0000cfb78 sp=0xc0000cfb48 pc=0x7d9ebd
gitlab.com/cavillis/hsnotify/vendor/github.com/3d0c/gmf.(*FmtCtx).WritePacket.func1(0x7f952c04cb00, 0xc000166d20, 0x7e8acd)
        /media/nickl/Workspace/workspace/tune/go/src/gitlab.com/cavillis/hsnotify/vendor/github.com/3d0c/gmf/format.go:312 +0xd2 fp=0xc0000cfbb0 sp=0xc0000cfb78 pc=0x7e6c22
gitlab.com/cavillis/hsnotify/vendor/github.com/3d0c/gmf.(*FmtCtx).WritePacket(0xc0002d8000, 0xc000166d20, 0x3, 0x2)
        /media/nickl/Workspace/workspace/tune/go/src/gitlab.com/cavillis/hsnotify/vendor/github.com/3d0c/gmf/format.go:312 +0x47 fp=0xc0000cfc38 sp=0xc0000cfbb0 pc=0x7e0a47

This same code is writing out mp4/mkv files no problem. Only the live stream to nginx causes problems

Coping with streams unreadable by ffmpeg

Apple seems to add additional streams that are unreadable by ffmpeg which causes a panic when asking for details about the stream ie is video etc.

panic: unable to initialize codec for stream '2', error:%!(EXTRA *errors.errorString=Unable to find codec by value '0') [recovered]
panic: unable to initialize codec for stream '2', error:%!(EXTRA *errors.errorString=Unable to find codec by value '0')

Would be good if either an error is returned by the get stream method or something like an isReadable function on the stream, doesn't feel like the client should have to cope with a panic.

I enclose an example of what I mean.

Thanks in advance
invalid_streams.zip

image stream to video

how can I use image stream([]byte) convert to video?

I saw the example of 'images-to-video.go',
but it reads image files,
can I use image []byte to do it?

cgo type conversion error building gmf

When I try to build gmf against recent FFMpeg, I get the following error:

./codecCtx.go:285: cannot use C.int(val) (type C.int) as type C.int64_t in assignment
./packet.go:193: cannot use C.long(duration) (type C.long) as type C.int64_t in assignment

This is fixed by changing C.int to C.int64_t.

format.go GetNewPacket() memory leak?

Is there a memory leak at here "if ret := C.av_read_frame(this.avCtx, &p.avPacket); int(ret) < 0"?
Because when I use the function ,my system memory always increase.

func (this *FmtCtx) GetNewPackets() chan *Packet {
yield := make(chan *Packet)

    go func() {
            for {
                    p := NewPacket()
                    if ret := C.av_read_frame(this.avCtx, &p.avPacket); int(ret) < 0 {//here memory leak
                            break
                    }
                    yield <- p
            }

            close(yield)
    }()

    return yield

}

Cannot build by golang 1.3

system: Mac OSX 10.9
go version: go1.3 darwin/amd64
ffmpeg version 2.1.4 Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 3 2014 09:09:13 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-gnutls --enable-fontconfig --enable-libfreetype --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
libavutil 52. 48.101 / 52. 48.101
libavcodec 55. 39.101 / 55. 39.101
libavformat 55. 19.104 / 55. 19.104
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 90.100 / 3. 90.100
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100

when run "go run encoding.go" show some error. When use golang 1.2 is can work.but have other bug.

github.com/3d0c/gmf

../avio.go:89: cannot use _Cfunc_avio_alloc_context(this.buffer, C.int(IO_BUFFER_SIZE), 0, unsafe.Pointer(ctx.avCtx), ptrRead, ptrWrite, ptrSeek) (type *C.struct_AVIOContext) as type *C.AVIOContext in assignment
../codec.go:49: cannot use _Cfunc_avcodec_find_decoder_by_name(cname) (type *C.struct_AVCodec) as type *C.AVCodec in assignment
../codec.go:53: cannot use _Cfunc_avcodec_find_decoder(uint32(i.(int))) (type *C.struct_AVCodec) as type *C.AVCodec in assignment
../codec.go:75: cannot use _Cfunc_avcodec_find_encoder_by_name(cname) (type *C.struct_AVCodec) as type *C.AVCodec in assignment
../codec.go:79: cannot use _Cfunc_avcodec_find_encoder(uint32(i.(int))) (type *C.struct_AVCodec) as type *C.AVCodec in assignment
../codecCtx.go:94: cannot use codec.avCodec (type *C.AVCodec) as type *C.struct_AVCodec in argument to _Cfunc_avcodec_alloc_context3
../codecCtx.go:99: cannot use codec.avCodec (type *C.AVCodec) as type *C.struct_AVCodec in argument to _Cfunc_avcodec_get_context_defaults3
../codecCtx.go:101: cannot use codecctx (type *C.struct_AVCodecContext) as type *C.AVCodecContext in assignment
../codecCtx.go:173: cannot use this.avCodecCtx (type *C.AVCodecContext) as type *C.struct_AVCodecContext in argument to _Cfunc_avcodec_open2
../codecCtx.go:173: cannot use this.codec.avCodec (type *C.AVCodec) as type *C.struct_AVCodec in argument to _Cfunc_avcodec_open2
../codecCtx.go:173: too many errors

run encoding_mp4.go overflows uint64

go run encoding_mp4.go

# github.com/3d0c/gmf
cgo-gcc-prolog: In function ‘_cgo_2ed26a316b1d_Cfunc_avcodec_encode_audio2’:
cgo-gcc-prolog:197:2: warning: ‘avcodec_encode_audio2’ is deprecated (declared at /root/local/ffmpeg/include/libavcodec/avcodec.h:5440) [-Wdeprecated-declarations]
cgo-gcc-prolog: In function ‘_cgo_2ed26a316b1d_Cfunc_avcodec_encode_video2’:
cgo-gcc-prolog:218:2: warning: ‘avcodec_encode_video2’ is deprecated (declared at /root/local/ffmpeg/include/libavcodec/avcodec.h:5479) [-Wdeprecated-declarations]
# github.com/3d0c/gmf
cgo-gcc-prolog: In function ‘_cgo_2ed26a316b1d_Cfunc_avcodec_decode_audio4’:
cgo-gcc-prolog:87:2: warning: ‘avcodec_decode_audio4’ is deprecated (declared at /root/local/ffmpeg/include/libavcodec/avcodec.h:4915) [-Wdeprecated-declarations]
cgo-gcc-prolog: In function ‘_cgo_2ed26a316b1d_Cfunc_avcodec_decode_video2’:
cgo-gcc-prolog:108:2: warning: ‘avcodec_decode_video2’ is deprecated (declared at /root/local/ffmpeg/include/libavcodec/avcodec.h:4964) [-Wdeprecated-declarations]
# github.com/3d0c/gmf
cgo-gcc-prolog: In function ‘_cgo_2ed26a316b1d_Cfunc_avcodec_copy_context’:
cgo-gcc-prolog:42:2: warning: ‘avcodec_copy_context’ is deprecated (declared at /root/local/ffmpeg/include/libavcodec/avcodec.h:4389) [-Wdeprecated-declarations]
# github.com/3d0c/gmf
/root/go/src/github.com/3d0c/gmf/codec.go:95: constant -9223372036854775808 overflows uint64

Cut up Video

can you add an example for cutup video?

ffmpeg -ss 00:03:00 -i video.mp4 -t 60 -c copy -avoid_negative_ts 1 cut.mp4

jpeg sample error

Error opening codec 'jpeg2000:JPEG 2000', averror: Invalid argument

error code line

codeCtx.go : 200 line

if averr := C.avcodec_open2(this.avCodecCtx, this.codec.avCodec, &avDict); averr < 0 {
return errors.New(fmt.Sprintf("Error opening codec '%s:%s', averror: %s", this.codec.Name(), this.codec.LongName(), AvError(int(averr))))
}

Help me

The version of ffmpeg

My ffmpeg version: 4.0 with go get:

go get github.com/3d0c/gmf
# github.com/3d0c/gmf
go-python/muagent/src/github.com/3d0c/gmf/codec.go:198:43: could not determine kind of name for C.CODEC_CAP_EXPERIMENTAL

ffmpeg version 2.6.8 with go get:

# go get github.com/3d0c/gmf
# github.com/3d0c/gmf
../muagent/src/github.com/3d0c/gmf/codec.go:54:31: could not determine kind of name for C.FF_PROFILE_DTS_EXPRESS
../muagent/src/github.com/3d0c/gmf/codec.go:103:25: could not determine kind of name for C.FF_PROFILE_VP9_0
../muagent/src/github.com/3d0c/gmf/codec.go:104:25: could not determine kind of name for C.FF_PROFILE_VP9_1
../muagent/src/github.com/3d0c/gmf/codec.go:105:25: could not determine kind of name for C.FF_PROFILE_VP9_2
../muagent/src/github.com/3d0c/gmf/codec.go:106:25: could not determine kind of name for C.FF_PROFILE_VP9_3

So, what's the ffmpeg version is this project for?

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.