Reading from libav using cgo

I am trying to call av_dict_get_string. Why my GetStrings function returns nil

func GetStrings(avdict *C.AVDictionary, key, row string) (loaded string, err error) {
	var bufferstring string
	cbuffer := C.CString(bufferstring)
	ckey := C.CString(key)
	crow := C.CString(row)

	// (*_Ctype_struct_AVDictionary, **_Ctype_char, _Ctype_char, _Ctype_char)
	if err = GetAVError(C.av_dict_get_string(avdict, (**C.char)(&cbuffer), *ckey, *crow)); err != nil {
		return "", nil

	}

	return bufferstring, nil
}
πŸ‘︎ 12
πŸ’¬︎
πŸ‘€︎ u/nocontrol666-
πŸ“…︎ Dec 16 2021
🚨︎ report
Developing with libav and C++

Hi guys,

I am having some trouble working with the ffmpeg's API while porting from the 0.6 version (32 bit) to the 4.[3.2|4] version 64 bit. (I know, big leap, but nothing I can do about it :-( )

Specifically, I am having trouble with the MDAT atom, which as I understand should be written by the av_write_trailer function and should indicate the size of the video data. Conseguentely I fail to write the MOOV atom and the file is unreadable.

Some context: the file is streamed from a proprietary server and it is played in the application. While streaming I also save it to a file with av_read_frame/av_write_frame after having called avformat_write_header. When I write the last frame I call the av_write_trailer function and close all the contexts/codecs.
After that, using the qt-faststart tool I try to move the MOOV atom at the beginning, to write a cached file which can be played without the need to stream it again, but I get the first 4 bytes of the MDAT atom filled with 0's, which indicate that the MDAT size is 0 (while the file in this case is about 100 Mb) and at this point the program enter in a infinite loop, reading continuously the MDAT atom.

I tried to debug the code in parallel with the version which work (ffmpeg 0.6 32 bit) and it seems that they do the same things at every step, aside the modifications I needed to compile with the new version. No call to the library functions return an error, which is what it is baffling me.

Any idea about what can be the problem ?
Or, if this is not the right place to ask, any pointer to some documentation (aside the official's one that I have already combed through)

Thanks

πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/mgianpm
πŸ“…︎ Aug 05 2021
🚨︎ report
super quick FFmpeg and libav tutorial

if you're looking for an FFmpeg / libav tutorial:

Leandro moreira's tutorial teaches how to use FFmpeg as a library, and it's super quick and easy to follow

Highly recommend, link below:

https://github.com/leandromoreira/ffmpeg-libav-tutorial#learn-ffmpeg-libav-the-hard-way

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/moetsi_op
πŸ“…︎ Jun 08 2021
🚨︎ report
Cannot install Bitwig on Ubuntu 20 because of libav-tools dependencies INSANE CIRCLE

[EDIT : this seems to be solved]

Hi everyone, please forgive me if my english isn't good, it's not my native language.

I'm using Bitwig since many years under Ubuntu 16. Recently I bought a new pc which came under Ubuntu 20, and I was happy to install Bitwig once again... except it didn't work.

When I try to unpack the .deb file with the Installer software, I get an error message "unmet dependencies" without more information. So I used the terminal (with the dpkg command), and the new message was more precise : unmet dependencies for libav-tools.

Here it starts to get really insane : when I try to get libav-tools packages, I've got an error message : no package available (my terminal doesn't speak english so I translate roughly). So I made online researches and found many sources mentioning ffmpeg as an alternative to libav.

BUT when I try to get ffmpeg packages, I've got error messages too. So here I am : brand new computer, new Ubuntu Studio version, and no way to execute the .deb file of my Bitwig licence...

Does anyone have an explanation and a solution to help me ?

(I didn't buy the new pc to make music but my old one is starting to fall into pieces, so I will need to use Bitwig on another machine sooner or later)

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/emptyshellaxiom
πŸ“…︎ Dec 06 2020
🚨︎ report
libav developers receive €51,000 to build rust-av prototype blog.mozilla.org/blog/201…
πŸ‘︎ 201
πŸ’¬︎
πŸ‘€︎ u/joshmatthews
πŸ“…︎ Jan 23 2018
🚨︎ report
FAudio now has WMA support, via gstreamer (gst-libav)

FAudio 20.08 has been been releasesed with WMA support.
Whilst Archlinux does provide an AUR for lib32-gst-libav, it would be nice to have it in the official repos, this would benefit older games through wine.

Sidenote, FAudio needs -DGSTREAMER=ON build flag for gstreamer support.

πŸ‘︎ 18
πŸ’¬︎
πŸ‘€︎ u/ukbeast89
πŸ“…︎ Aug 02 2020
🚨︎ report
The FFmpeg/Libav situation blog.pkh.me/p/13-the-ffmp…
πŸ‘︎ 332
πŸ’¬︎
πŸ‘€︎ u/mariuz
πŸ“…︎ Jul 01 2012
🚨︎ report
Libav - a fork of FFMPEG libav.org/
πŸ‘︎ 109
πŸ’¬︎
πŸ‘€︎ u/loonyphoenix
πŸ“…︎ Mar 14 2011
🚨︎ report
What good ffmpeg/libav resources am I not finding?

I've been learning ffmpeg/libav pretty much since the beginning of quarantine a few months ago.

I was learning Rust, and wanting to get a pet project to work on, and ended up going down this rabbit hole (it's a whole other story)

I've used the CLI tool from time to time for basic conversions, but I wanted to get a deeper understanding about how video codecs work, and how to build my own tools on top of ffmpeg.

I was a bit surprised with the lack of quality learning resources around this though. I understand the project is quite old, and it's easy to bump into outdated newsletters and forums. It also uses a very archaic C API design, which makes the learning curve even worse. It seems to me that both of these facts make it quite difficult for people not already experienced to work with it.

For context, the only decent resource I found, and the one through which I learned the most, was this tutorial: https://github.com/leandromoreira/ffmpeg-libav-tutorial

Since then, I also started to write my own tutorial, in hopes to provide a more friendly introduction to other newcomers, and also target Rust as well, instead of C/C++

But I'm wondering, am I missing any other good learning resource out there?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/naps62
πŸ“…︎ Jul 01 2020
🚨︎ report
Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav gist.github.com/Brainiarc…
πŸ‘︎ 45
πŸ’¬︎
πŸ‘€︎ u/Brainiarc7
πŸ“…︎ Jun 27 2016
🚨︎ report
Hello r/linux... We have a (Linux && libav powered) live stream of a couple of Little Penguin chicks growing up in their nest box. Hopfully they will grow to be great mascots for Linux and their species! (i know it's a tentative link, but hope you enjoy anyway!) taronga.org.au/penguin
πŸ‘︎ 53
πŸ’¬︎
πŸ‘€︎ u/taronga
πŸ“…︎ Nov 05 2013
🚨︎ report
Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav gist.github.com/Brainiarc…
πŸ‘︎ 35
πŸ’¬︎
πŸ‘€︎ u/Brainiarc7
πŸ“…︎ Jun 27 2016
🚨︎ report
PSA: Whatever you do, don't use the LibAV AAC encoder

I'm really no audiophile, but for some reason my 192 kbps AAC audio sounded like complete trash sometimes. This is how I found out about LibAV AAC that handbrake has to use for licensing reasons: https://forum.handbrake.fr/viewtopic.php?f=33&t=34143

If you want FDK-AAC you have to compile handbrake yourself. I did it and the audio sounds great now.

Guides:

https://handbrake.fr/docs/en/latest/developer/build-windows.html

https://forum.handbrake.fr/viewtopic.php?f=11&t=34953#p163970

https://forum.videohelp.com/threads/383208-How-to-get-HandBrake-with-FDK-AAC-for-Windows

πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Jul 10 2017
🚨︎ report
How people get started contributing to open-source? A few questions to Luca Barbato, contributor to Gentoo, MPlayer, Libav, VLC, cairo/pixman tomassetti.me/how-people-…
πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/ftomassetti
πŸ“…︎ Mar 25 2015
🚨︎ report
Learn FFmpeg libav the Hard Way github.com/leandromoreira…
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/dreampeppers99
πŸ“…︎ Nov 14 2017
🚨︎ report
How people get started contributing to open-source? A few questions to Luca Barbato, contributor to Gentoo, MPlayer, Libav, VLC, cairo/pixman tomassetti.me/how-people-…
πŸ‘︎ 37
πŸ’¬︎
πŸ‘€︎ u/ftomassetti
πŸ“…︎ Mar 25 2015
🚨︎ report
Libav updated!

Finally got the Libav codec fix yesterday. Heads up folks.

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/tommytimbertoes
πŸ“…︎ Dec 08 2016
🚨︎ report
Does ffmpeg or libav have a method of using the pi's hardware h264 encoder on raspbian?
πŸ‘︎ 14
πŸ’¬︎
πŸ‘€︎ u/ocdude
πŸ“…︎ Sep 14 2012
🚨︎ report
Libav is trying to tell me lies about ffmpeg being depreciated

>ffmpeg version 0.8.6-6:0.8.6-0ubuntu0.12.10.1, Copyright (c) 2000-2013 the Libav developers built on Apr 2 2013 17:02:16 with gcc 4.7.2 *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.

libav needs to calm down

πŸ‘︎ 26
πŸ’¬︎
πŸ‘€︎ u/ase1590
πŸ“…︎ May 13 2013
🚨︎ report
[Hiring] Video streaming C++ app using libav

We are looking for someone to develop a simple baseline application to build the rest of an application off of. The application is intended to stream video from one person’s computer to another’s. We are a small team of developers, and intend to use this baseline application to develop on further. On that same note, assuming everything goes well, we may choose to offer the a long term role within our team.

We are looking at a budget of $750 (USD), but are willing to negotiate. We prefer someone local to the US time zones (GMT -7ish), but it is definitely not a strict requirement.

If anything is unclear please don’t hesitate to ask – we’ll do our best to make sure this is as easy as possible for you. Below are requirements for the code – again, please let us know if there is anything we can clarify further.

Requirements in shall format:

Structure and Features

  • 1.0 Shall be written in C++

  • 2.0 Shall be compilable by g++ and MSVC

  • 2.1. Shall provide brief instruction on compilation

  • 3.0 Shall be written using Libav v9.9 libraries

  • 3.1. Other libraries are not strictly excluded, however the primary video streaming portion of the application shall use Libav

  • 4.0 Shall stream variable resolution desktop video (variable at the initialization of the stream) from one client’s computer, to another client’s computer, either over a local or extended network

  • 4.1. Video stream shall be receivable by Vlc stream player

  • 4.2. Video can be received by standard video decoder – vlc, windows media player, ffplayer, etc.. Vlc is preferred

  • 4.3. Video resolution shall be variable from 480p to 1080p

  • 5.0 Shall use a standard video container (mpeg, avi, mkv, or flv)

Operation and usage

  • 1.0 Application shall be runnable on Linux (Ubuntu), and as a Windows executable

  • 2.0 Application’s video streaming features shall not change significantly from Linux to Windows

  • 3.0 Variable resolution setting shall be available at application run time

  • 4.0 Destination address setting shall be available at application run time

Deliverables

  • 1.0 Source code

  • 2.0 Accompanying makefile

Please PM or comment with any questions!

Edit: Thanks for the replies everyone - by "Shall stream variable resolution desktop video.." I was really getting at the program streaming live video from the display of the computer it is running on. So the input video format would be whatever format the directx frames are in.

And to answer n0usernamesleft questions 1.

... keep reading on reddit ➑

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/sirromsystems
πŸ“…︎ Oct 08 2013
🚨︎ report
libav and FFmpeg: switch over lists.debian.org/debian-d…
πŸ‘︎ 48
πŸ’¬︎
πŸ‘€︎ u/grelphy
πŸ“…︎ Jul 08 2015
🚨︎ report
Docker/Container as a dev/exec environment for FFmpeg (libav) / AV1 tests

If want to write some programs using libav with libaom you can use docker as your dev/exec enviroment!

For instance I published a ffmpeg-devel docker image and one can write programs locally and test them (compile, link and run) "remotely".

Here's a possible Makefile to run a PROGRAM.c:

clean:
	@rm -rf ./build/*

make_hello: clean
	docker run -w /files --rm -it  -v `pwd`:/files leandromoreira/ffmpeg-devel \
	  gcc -L/opt/ffmpeg/lib -I/opt/ffmpeg/include/ /files/PROGRAM.c \
	  -lavcodec -lavformat -lavfilter -lavdevice -lswresample -lswscale -lavutil \
	  -o /files/PROGRAM

run_hello: make_hello
docker run -w /files --rm -it -v `pwd`:/files leandromoreira/ffmpeg-devel /files/PROGRAM /files/local_bunny_1080p_60fps.mp4

And this Docker image already includes the aom library.

πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/dreampeppers99
πŸ“…︎ Nov 08 2018
🚨︎ report
Which should be the default in Gentoo, ffmpeg or libav? forums.gentoo.org/viewtop…
πŸ‘︎ 24
πŸ’¬︎
πŸ‘€︎ u/waWyUPx3
πŸ“…︎ Feb 05 2015
🚨︎ report
How to contribute to Libav (VLC): just got my first patch approved tomassetti.me/how-to-cont…
πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/ftomassetti
πŸ“…︎ Feb 18 2015
🚨︎ report
Considerations on splitting an open-source library (from a libav committer) blogs.gentoo.org/lu_zero/…
πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/ftomassetti
πŸ“…︎ May 06 2015
🚨︎ report
Libav vs ffmpeg question

If those 2 are mutually exclusive, why libav use flag is all about "support libav instead of ffmpeg when both are supported"? By definition if libav is supported, then ffmpeg can't be the same time.

It would be more straightforward to be described as "libav support". At first I thought they can co-exist and the ebuild will choose libav.

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/e46_Wizo
πŸ“…︎ Feb 19 2018
🚨︎ report
FFmpeg vs libav: A distribution maintainer point of view almost two years after the split aballier.wordpress.com/20…
πŸ‘︎ 103
πŸ’¬︎
πŸ‘€︎ u/iLiekCaeks
πŸ“…︎ Jan 18 2013
🚨︎ report
Debian Switching from libav to FFmpeg lists.debian.org/debian-d…
πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/superjoe30
πŸ“…︎ Jul 09 2015
🚨︎ report
Program i tried packaging for a few distros has hardcoded libav dependency, 5 bundled libraries and downloads a bundled copy of proprietary libspotify without asking for user's consent

Author works for said company, so there's his bias. Said library support can be easily disabled, though.

Also the configure script is.... not quite a configure script.

πŸ‘︎ 29
πŸ’¬︎
πŸ‘€︎ u/yoshi314
πŸ“…︎ Dec 01 2014
🚨︎ report
I made a video explaining how to batch convert to WEBM with Libav and Bash youtube.com/watch?v=bUkHP…
πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/skriticos
πŸ“…︎ Jun 06 2014
🚨︎ report
leandromoreira/ffmpeg-libav-tutorial github.com/leandromoreira…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/personaontherun
πŸ“…︎ Jan 21 2018
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.