Problems with gst-plugins-bad and Cerbero

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with gst-plugins-bad and Cerbero

Vinicius Tona
Hi,

I have a docker image with GStreamer built using Cerbero.
I want to add some logs in gstwebrtcbin.c to better understand how it works but when I try to follow the documentation to recompile gst-plugins-bad I end up not seeing my change in place (Even though it was compiled properly)

I think the problem is my --prefix since I'm running inside cerbero-unstalled but I tried a bunch of paths with no success

Any help will be much appreciated 

--
"If we can really understand the problem, the answer will come out of it, 
because the answer is not separate from the problem." - Krishnamurti

Vinícius Faria Toná

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with gst-plugins-bad and Cerbero

David Ing
There is currently an unresolved bug related to debian package paths:  https://bugzilla.gnome.org/show_bug.cgi?id=796009

A likely solution is described in the bug related to a ~/custom.cbc file (part of Matthew Thyer's proposed solution).

However, if you just want to rebuild and re-install the one package, this is faster (assuming you are on Linux):

cd gst-plugins-bad
./autogen.sh
make
sudo make install && sudo ldconfig



On Tue, May 29, 2018 at 11:18 AM, Vinicius Tona <[hidden email]> wrote:
Hi,

I have a docker image with GStreamer built using Cerbero.
I want to add some logs in gstwebrtcbin.c to better understand how it works but when I try to follow the documentation to recompile gst-plugins-bad I end up not seeing my change in place (Even though it was compiled properly)

I think the problem is my --prefix since I'm running inside cerbero-unstalled but I tried a bunch of paths with no success

Any help will be much appreciated 

--
"If we can really understand the problem, the answer will come out of it, 
because the answer is not separate from the problem." - Krishnamurti

Vinícius Faria Toná

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with gst-plugins-bad and Cerbero

Vinicius Tona
Hi and thanks for the quick reply!

I tried to compile GStreamer directly in Ubuntu but I ran in a bunch of issues.
I ended up compiling it using Cerbero and using it inside cerbero-uninstalled shell.

My current problem is that I don't know where cerbero shell fetches the libs, and so far, the only solution I found was to fork gst-plugins-bad, change the remote url in the recipe and recompile.
I assumed that the prefix would delivery the libs into a folder and I could skip needing to fork, commit, etc 

Regards


On Tue, May 29, 2018 at 2:43 PM, David Ing <[hidden email]> wrote:
There is currently an unresolved bug related to debian package paths:  https://bugzilla.gnome.org/show_bug.cgi?id=796009

A likely solution is described in the bug related to a ~/custom.cbc file (part of Matthew Thyer's proposed solution).

However, if you just want to rebuild and re-install the one package, this is faster (assuming you are on Linux):

cd gst-plugins-bad
./autogen.sh
make
sudo make install && sudo ldconfig



On Tue, May 29, 2018 at 11:18 AM, Vinicius Tona <[hidden email]> wrote:
Hi,

I have a docker image with GStreamer built using Cerbero.
I want to add some logs in gstwebrtcbin.c to better understand how it works but when I try to follow the documentation to recompile gst-plugins-bad I end up not seeing my change in place (Even though it was compiled properly)

I think the problem is my --prefix since I'm running inside cerbero-unstalled but I tried a bunch of paths with no success

Any help will be much appreciated 

--
"If we can really understand the problem, the answer will come out of it, 
because the answer is not separate from the problem." - Krishnamurti

Vinícius Faria Toná

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
"If we can really understand the problem, the answer will come out of it, 
because the answer is not separate from the problem." - Krishnamurti

Vinícius Faria Toná

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with gst-plugins-bad and Cerbero

Tim Müller
On Tue, 2018-05-29 at 16:36 -0400, Vinicius Tona wrote:

Hi,

Just to be sure cerbero is not really meant for use on Linux systems,
although it can be used like that of course and there is functionality
for generating packages in various formats. Most developers will use
something else on Linux system, whether yocto or just installation from
tarballs (with dependencies then provided by the base system/distro).

For development/hacking purposes I would recommend gst-build (Meson
based, the shiny new thing) in combination with the 'uninstalled'
target if desired, or gst-uninstalled (autotools-based). And
dependencies installed from distro packages then. This is what most
GStreamer developers use on Linux.

Cheers
-Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with gst-plugins-bad and Cerbero

David Ing
Tim,

Does the gst-build tool provide deb or rpm packages?

On Tue, May 29, 2018 at 2:10 PM, Tim Müller <[hidden email]> wrote:
On Tue, 2018-05-29 at 16:36 -0400, Vinicius Tona wrote:

Hi,

Just to be sure cerbero is not really meant for use on Linux systems,
although it can be used like that of course and there is functionality
for generating packages in various formats. Most developers will use
something else on Linux system, whether yocto or just installation from
tarballs (with dependencies then provided by the base system/distro).

For development/hacking purposes I would recommend gst-build (Meson
based, the shiny new thing) in combination with the 'uninstalled'
target if desired, or gst-uninstalled (autotools-based). And
dependencies installed from distro packages then. This is what most
GStreamer developers use on Linux.

Cheers
-Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with gst-plugins-bad and Cerbero

Tim Müller
On Tue, 2018-05-29 at 14:30 -0700, David Ing wrote:

> Does the gst-build tool provide deb or rpm packages?

Nope!

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: Problems with gst-plugins-bad and Cerbero

Matthew Thyer
In reply to this post by David Ing

I have now totally given up on Cerbero and have written a script that builds just the subset of GStreamer that I require from the released sources (not git). By setting the variables in the script correctly you can but some or all of GStreamer for the installation prefix of your choice.

The script is Ubuntu or at least Debian specific in that it installs the required prerequisite packages using “sudo apt install”.

Just look for the two comment lines that include “(assumes Ubuntu host)” if you want to modify this behaviour.

You’ll want to carefully consider the prerequisite packages and the arguments to configure for each GStreamer module to get your desired behaviour.

By default, the script will build in folder GStreamer release 1.14.1 for the prefix “/usr/local/gstreamer1.0” in the temporary build folder “~/build”.

By default it only builds the modules “gstreamer”, “gst-plugins-base”, “gst-plugins-good” & “gst-rtsp-server” as that’s what I require.

Note that if you build for a prefix other than “/usr/local” you’ll need to set LD_LIBRARY_PATH to include your prefix/lib or correctly link your application for the appropriate runtime library search path.

 

The script is:

 

#!/usr/bin/env bash

 

# Author: Matthew Thyer

# Date: 24-28 May 2018

# Build and install a subset of GStreamer from released sources.

# Actually a generic autoconf project builder that can build anything

#   with appropriate setting of the environment variables

# Note that sudo must already be installed

 

# Where we'll fetch, extract and build the sources (must not already exist!)

BUILD_ROOT="${BUILD_ROOT:-~/build}"

 

# The release to fetch, configure, build & install

RELEASE="${RELEASE:-1.14.1}"

 

# Installation prefix

PREFIX="${PREFIX:-/usr/local/gstreamer1.0}"

export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"

 

# Prerequisite packages that need to be installed (assumes Ubuntu host)

PREREQS="curl xz-utils build-essential bison flex python3 glib2.0 liborc-0.4-dev"

# If building the x264 codec from the gst-plugins-ugly module you'll also need libx264-dev

#PREREQS="curl xz-utils build-essential bison flex python3 glib2.0 liborc-0.4-dev libx264-dev"

 

# Where to source the sources

SRC_URL="https://gstreamer.freedesktop.org/src/"

 

# Arrary of which GStreamer components to build

declare -a COMPONENTS=('gstreamer'

'gst-plugins-base'

'gst-plugins-good'

#'gst-plugins-ugly'

'gst-rtsp-server');

 

# Common configure flags for each of the above components

COMMON_CONF_FLAGS='--disable-maintainer-mode --disable-examples --disable-gtk-doc-html'

 

# Array of additional configure flags for each of the above components

declare -a ADDL_CONF_FLAGS=('--disable-tests --disable-benchmarks --disable-check'

'--enable-orc'

'--enable-orc'

#'--enable-orc'

'')

 

# Number of parallel make jobs

njobs=$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)

 

# Start

prog=`basename $0`

num_comps=${#COMPONENTS[@]}

num_flags=${#ADDL_CONF_FLAGS[@]}

 

if [ -d "${BUILD_ROOT}" ]; then

   echo "${prog}: ERROR: Build folder \"${BUILD_ROOT}\" already exists!"

   exit 1

fi

 

if [ $num_comps -ne $num_flags ]; then

   echo "${prog}: ERROR: Arrays COMPONENTS & ADDL_CONF_FLAGS must contain the same number of elements"

   exit 1

fi

 

# Install prerequisites (assumes Ubuntu host) and make the build root folder

sudo apt update

sudo apt -y upgrade

sudo apt install -y ${PREREQS}

mkdir -p "${BUILD_ROOT}"

 

x=0

while [ $x -lt $num_comps ]; do

   cd "${BUILD_ROOT}"

   y=`expr $x + 1`

 

# Fetch

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> fetch ]"

   echo "Fetching ${SRC_URL}${COMPONENTS[$x]}/${COMPONENTS[$x]}-${RELEASE}.tar.xz"

   curl -LO ${SRC_URL}${COMPONENTS[$x]}/${COMPONENTS[$x]}-${RELEASE}.tar.xz

 

# Extract

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> extract ]"

   tar -xJpf ${COMPONENTS[$x]}-${RELEASE}.tar.xz

 

# Configure

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> configure ]"

   cd "${COMPONENTS[$x]}-${RELEASE}"

   ./configure --prefix="${PREFIX}" ${COMMON_CONF_FLAGS} ${ADDL_CONF_FLAGS[$x]} 2>&1 | tee configure.log

 

# Make

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> make ]"

   make -j $njobs 2>&1 | tee make.log

 

# Install

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> make install ]"

   sudo make install 2>&1 | tee make-install.log

 

   x=$y

done

 

echo "${prog}: INFO: All done!"

exit 0

 

From: gstreamer-devel <[hidden email]> On Behalf Of David Ing
Sent: Wednesday, 30 May 2018 4:13 AM
To: Discussion of the development of and with GStreamer <[hidden email]>
Subject: Re: Problems with gst-plugins-bad and Cerbero

 

There is currently an unresolved bug related to debian package paths:  https://bugzilla.gnome.org/show_bug.cgi?id=796009

 

A likely solution is described in the bug related to a ~/custom.cbc file (part of Matthew Thyer's proposed solution).

 

However, if you just want to rebuild and re-install the one package, this is faster (assuming you are on Linux):

 

cd gst-plugins-bad

./autogen.sh

make

sudo make install && sudo ldconfig

 

 

 

On Tue, May 29, 2018 at 11:18 AM, Vinicius Tona <[hidden email]> wrote:

Hi,

 

I have a docker image with GStreamer built using Cerbero.

I want to add some logs in gstwebrtcbin.c to better understand how it works but when I try to follow the documentation to recompile gst-plugins-bad I end up not seeing my change in place (Even though it was compiled properly)

 

I think the problem is my --prefix since I'm running inside cerbero-unstalled but I tried a bunch of paths with no success

 

Any help will be much appreciated 

 

--

"If we can really understand the problem, the answer will come out of it, 

because the answer is not separate from the problem." - Krishnamurti

 

Vinícius Faria Toná


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with gst-plugins-bad and Cerbero

Vinicius Tona
Thanks for all the inputs!

I will give it a try and see how it goes

Regards

On Wed, May 30, 2018 at 12:21 AM, Matthew Thyer <[hidden email]> wrote:

I have now totally given up on Cerbero and have written a script that builds just the subset of GStreamer that I require from the released sources (not git). By setting the variables in the script correctly you can but some or all of GStreamer for the installation prefix of your choice.

The script is Ubuntu or at least Debian specific in that it installs the required prerequisite packages using “sudo apt install”.

Just look for the two comment lines that include “(assumes Ubuntu host)” if you want to modify this behaviour.

You’ll want to carefully consider the prerequisite packages and the arguments to configure for each GStreamer module to get your desired behaviour.

By default, the script will build in folder GStreamer release 1.14.1 for the prefix “/usr/local/gstreamer1.0” in the temporary build folder “~/build”.

By default it only builds the modules “gstreamer”, “gst-plugins-base”, “gst-plugins-good” & “gst-rtsp-server” as that’s what I require.

Note that if you build for a prefix other than “/usr/local” you’ll need to set LD_LIBRARY_PATH to include your prefix/lib or correctly link your application for the appropriate runtime library search path.

 

The script is:

 

#!/usr/bin/env bash

 

# Author: Matthew Thyer

# Date: 24-28 May 2018

# Build and install a subset of GStreamer from released sources.

# Actually a generic autoconf project builder that can build anything

#   with appropriate setting of the environment variables

# Note that sudo must already be installed

 

# Where we'll fetch, extract and build the sources (must not already exist!)

BUILD_ROOT="${BUILD_ROOT:-~/build}"

 

# The release to fetch, configure, build & install

RELEASE="${RELEASE:-1.14.1}"

 

# Installation prefix

PREFIX="${PREFIX:-/usr/local/gstreamer1.0}"

export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"

 

# Prerequisite packages that need to be installed (assumes Ubuntu host)

PREREQS="curl xz-utils build-essential bison flex python3 glib2.0 liborc-0.4-dev"

# If building the x264 codec from the gst-plugins-ugly module you'll also need libx264-dev

#PREREQS="curl xz-utils build-essential bison flex python3 glib2.0 liborc-0.4-dev libx264-dev"

 

# Where to source the sources

SRC_URL="https://gstreamer.freedesktop.org/src/"

 

# Arrary of which GStreamer components to build

declare -a COMPONENTS=('gstreamer'

'gst-plugins-base'

'gst-plugins-good'

#'gst-plugins-ugly'

'gst-rtsp-server');

 

# Common configure flags for each of the above components

COMMON_CONF_FLAGS='--disable-maintainer-mode --disable-examples --disable-gtk-doc-html'

 

# Array of additional configure flags for each of the above components

declare -a ADDL_CONF_FLAGS=('--disable-tests --disable-benchmarks --disable-check'

'--enable-orc'

'--enable-orc'

#'--enable-orc'

'')

 

# Number of parallel make jobs

njobs=$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)

 

# Start

prog=`basename $0`

num_comps=${#COMPONENTS[@]}

num_flags=${#ADDL_CONF_FLAGS[@]}

 

if [ -d "${BUILD_ROOT}" ]; then

   echo "${prog}: ERROR: Build folder \"${BUILD_ROOT}\" already exists!"

   exit 1

fi

 

if [ $num_comps -ne $num_flags ]; then

   echo "${prog}: ERROR: Arrays COMPONENTS & ADDL_CONF_FLAGS must contain the same number of elements"

   exit 1

fi

 

# Install prerequisites (assumes Ubuntu host) and make the build root folder

sudo apt update

sudo apt -y upgrade

sudo apt install -y ${PREREQS}

mkdir -p "${BUILD_ROOT}"

 

x=0

while [ $x -lt $num_comps ]; do

   cd "${BUILD_ROOT}"

   y=`expr $x + 1`

 

# Fetch

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> fetch ]"

   echo "Fetching ${SRC_URL}${COMPONENTS[$x]}/${COMPONENTS[$x]}-${RELEASE}.tar.xz"

   curl -LO ${SRC_URL}${COMPONENTS[$x]}/${COMPONENTS[$x]}-${RELEASE}.tar.xz

 

# Extract

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> extract ]"

   tar -xJpf ${COMPONENTS[$x]}-${RELEASE}.tar.xz

 

# Configure

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> configure ]"

   cd "${COMPONENTS[$x]}-${RELEASE}"

   ./configure --prefix="${PREFIX}" ${COMMON_CONF_FLAGS} ${ADDL_CONF_FLAGS[$x]} 2>&1 | tee configure.log

 

# Make

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> make ]"

   make -j $njobs 2>&1 | tee make.log

 

# Install

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> make install ]"

   sudo make install 2>&1 | tee make-install.log

 

   x=$y

done

 

echo "${prog}: INFO: All done!"

exit 0

 

From: gstreamer-devel <[hidden email]> On Behalf Of David Ing
Sent: Wednesday, 30 May 2018 4:13 AM
To: Discussion of the development of and with GStreamer <[hidden email]>
Subject: Re: Problems with gst-plugins-bad and Cerbero

 

There is currently an unresolved bug related to debian package paths:  https://bugzilla.gnome.org/show_bug.cgi?id=796009

 

A likely solution is described in the bug related to a ~/custom.cbc file (part of Matthew Thyer's proposed solution).

 

However, if you just want to rebuild and re-install the one package, this is faster (assuming you are on Linux):

 

cd gst-plugins-bad

./autogen.sh

make

sudo make install && sudo ldconfig

 

 

 

On Tue, May 29, 2018 at 11:18 AM, Vinicius Tona <[hidden email]> wrote:

Hi,

 

I have a docker image with GStreamer built using Cerbero.

I want to add some logs in gstwebrtcbin.c to better understand how it works but when I try to follow the documentation to recompile gst-plugins-bad I end up not seeing my change in place (Even though it was compiled properly)

 

I think the problem is my --prefix since I'm running inside cerbero-unstalled but I tried a bunch of paths with no success

 

Any help will be much appreciated 

 

--

"If we can really understand the problem, the answer will come out of it, 

because the answer is not separate from the problem." - Krishnamurti

 

Vinícius Faria Toná


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
"If we can really understand the problem, the answer will come out of it, 
because the answer is not separate from the problem." - Krishnamurti

Vinícius Faria Toná

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with gst-plugins-bad and Cerbero

Mark Howell
In reply to this post by Tim Müller
On 05/29/2018 02:10 PM, Tim Müller wrote:
> On Tue, 2018-05-29 at 16:36 -0400, Vinicius Tona wrote:
>
> Hi,
>
> Just to be sure cerbero is not really meant for use on Linux systems,
> although it can be used like that of course and there is functionality
> for generating packages in various formats. Most developers will use
> something else on Linux system, whether yocto or just installation from
> tarballs (with dependencies then provided by the base system/distro).
[snip]

Tim et al,

I have been using cerbero for years to generate deb packages on Linux.
How much should I read into this implicit deprecation of that? I'm the
guy who asks every now and then if there's going to be a 1.x.y tag for
cerbero after gstreamer 1.x.y is released.... is that really 'cause I'm
the only one using it?

BTW is there going to be a 1.14.1 tag for cerbero? ;-)

Cheers,

Mark.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with gst-plugins-bad and Cerbero

Tim Müller
On Wed, 2018-05-30 at 10:16 -0700, Mark Howell wrote:

> Tim et al,
>
> I have been using cerbero for years to generate deb packages on
> Linux.  How much should I read into this implicit deprecation of
> that? I'm the  guy who asks every now and then if there's going to be
> a 1.x.y tag for  cerbero after gstreamer 1.x.y is released.... is
> that really 'cause I'm  the only one using it?
>
> BTW is there going to be a 1.14.1 tag for cerbero? ;-)

You shouldn't read anything into it.

If it works for you - great.

It wasn't clear to me from the original mail what the envisioned use
case was here. It's still worth pointing out that cerbero is not
something people use for development on Linux, and few for packaging on
Linux. That's not to say it can't be used like that of course. All
depends on what exactly is needed.

There will be a 1.14.1 tag once binaries are officially released. We're
still tracking down an issue on android.

Cheers
-Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with gst-plugins-bad and Cerbero

Mark Howell
On 05/30/2018 01:08 PM, Tim Müller wrote:

> You shouldn't read anything into it.
>
> If it works for you - great.
>
> It wasn't clear to me from the original mail what the envisioned use
> case was here. It's still worth pointing out that cerbero is not
> something people use for development on Linux, and few for packaging on
> Linux. That's not to say it can't be used like that of course. All
> depends on what exactly is needed.
>
> There will be a 1.14.1 tag once binaries are officially released. We're
> still tracking down an issue on android.
>
> Cheers
> -Tim
>
Thanks Tim. Mark.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: Problems with gst-plugins-bad and Cerbero

Matthew Thyer
In reply to this post by Vinicius Tona

Quick fix…

 

Line:

BUILD_ROOT="${BUILD_ROOT:-~/build}"

 

Should actually read:

BUILD_ROOT="${BUILD_ROOT:-${HOME}/build}"

 

From: gstreamer-devel <[hidden email]> On Behalf Of Vinicius Tona
Sent: Wednesday, 30 May 2018 10:05 PM
To: Discussion of the development of and with GStreamer <[hidden email]>
Subject: Re: Problems with gst-plugins-bad and Cerbero

 

Thanks for all the inputs!

 

I will give it a try and see how it goes

 

Regards

 

On Wed, May 30, 2018 at 12:21 AM, Matthew Thyer <[hidden email]> wrote:

I have now totally given up on Cerbero and have written a script that builds just the subset of GStreamer that I require from the released sources (not git). By setting the variables in the script correctly you can but some or all of GStreamer for the installation prefix of your choice.

The script is Ubuntu or at least Debian specific in that it installs the required prerequisite packages using “sudo apt install”.

Just look for the two comment lines that include “(assumes Ubuntu host)” if you want to modify this behaviour.

You’ll want to carefully consider the prerequisite packages and the arguments to configure for each GStreamer module to get your desired behaviour.

By default, the script will build in folder GStreamer release 1.14.1 for the prefix “/usr/local/gstreamer1.0” in the temporary build folder “~/build”.

By default it only builds the modules “gstreamer”, “gst-plugins-base”, “gst-plugins-good” & “gst-rtsp-server” as that’s what I require.

Note that if you build for a prefix other than “/usr/local” you’ll need to set LD_LIBRARY_PATH to include your prefix/lib or correctly link your application for the appropriate runtime library search path.

 

The script is:

 

#!/usr/bin/env bash

 

# Author: Matthew Thyer

# Date: 24-28 May 2018

# Build and install a subset of GStreamer from released sources.

# Actually a generic autoconf project builder that can build anything

#   with appropriate setting of the environment variables

# Note that sudo must already be installed

 

# Where we'll fetch, extract and build the sources (must not already exist!)

BUILD_ROOT="${BUILD_ROOT:-~/build}"

 

# The release to fetch, configure, build & install

RELEASE="${RELEASE:-1.14.1}"

 

# Installation prefix

PREFIX="${PREFIX:-/usr/local/gstreamer1.0}"

export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"

 

# Prerequisite packages that need to be installed (assumes Ubuntu host)

PREREQS="curl xz-utils build-essential bison flex python3 glib2.0 liborc-0.4-dev"

# If building the x264 codec from the gst-plugins-ugly module you'll also need libx264-dev

#PREREQS="curl xz-utils build-essential bison flex python3 glib2.0 liborc-0.4-dev libx264-dev"

 

# Where to source the sources

SRC_URL="https://gstreamer.freedesktop.org/src/"

 

# Arrary of which GStreamer components to build

declare -a COMPONENTS=('gstreamer'

'gst-plugins-base'

'gst-plugins-good'

#'gst-plugins-ugly'

'gst-rtsp-server');

 

# Common configure flags for each of the above components

COMMON_CONF_FLAGS='--disable-maintainer-mode --disable-examples --disable-gtk-doc-html'

 

# Array of additional configure flags for each of the above components

declare -a ADDL_CONF_FLAGS=('--disable-tests --disable-benchmarks --disable-check'

'--enable-orc'

'--enable-orc'

#'--enable-orc'

'')

 

# Number of parallel make jobs

njobs=$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)

 

# Start

prog=`basename $0`

num_comps=${#COMPONENTS[@]}

num_flags=${#ADDL_CONF_FLAGS[@]}

 

if [ -d "${BUILD_ROOT}" ]; then

   echo "${prog}: ERROR: Build folder \"${BUILD_ROOT}\" already exists!"

   exit 1

fi

 

if [ $num_comps -ne $num_flags ]; then

   echo "${prog}: ERROR: Arrays COMPONENTS & ADDL_CONF_FLAGS must contain the same number of elements"

   exit 1

fi

 

# Install prerequisites (assumes Ubuntu host) and make the build root folder

sudo apt update

sudo apt -y upgrade

sudo apt install -y ${PREREQS}

mkdir -p "${BUILD_ROOT}"

 

x=0

while [ $x -lt $num_comps ]; do

   cd "${BUILD_ROOT}"

   y=`expr $x + 1`

 

# Fetch

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> fetch ]"

   echo "Fetching ${SRC_URL}${COMPONENTS[$x]}/${COMPONENTS[$x]}-${RELEASE}.tar.xz"

   curl -LO ${SRC_URL}${COMPONENTS[$x]}/${COMPONENTS[$x]}-${RELEASE}.tar.xz

 

# Extract

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> extract ]"

   tar -xJpf ${COMPONENTS[$x]}-${RELEASE}.tar.xz

 

# Configure

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> configure ]"

   cd "${COMPONENTS[$x]}-${RELEASE}"

   ./configure --prefix="${PREFIX}" ${COMMON_CONF_FLAGS} ${ADDL_CONF_FLAGS[$x]} 2>&1 | tee configure.log

 

# Make

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> make ]"

   make -j $njobs 2>&1 | tee make.log

 

# Install

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> make install ]"

   sudo make install 2>&1 | tee make-install.log

 

   x=$y

done

 

echo "${prog}: INFO: All done!"

exit 0

 

From: gstreamer-devel <[hidden email]> On Behalf Of David Ing
Sent: Wednesday, 30 May 2018 4:13 AM
To: Discussion of the development of and with GStreamer <[hidden email]>
Subject: Re: Problems with gst-plugins-bad and Cerbero

 

There is currently an unresolved bug related to debian package paths:  https://bugzilla.gnome.org/show_bug.cgi?id=796009

 

A likely solution is described in the bug related to a ~/custom.cbc file (part of Matthew Thyer's proposed solution).

 

However, if you just want to rebuild and re-install the one package, this is faster (assuming you are on Linux):

 

cd gst-plugins-bad

./autogen.sh

make

sudo make install && sudo ldconfig

 

 

 

On Tue, May 29, 2018 at 11:18 AM, Vinicius Tona <[hidden email]> wrote:

Hi,

 

I have a docker image with GStreamer built using Cerbero.

I want to add some logs in gstwebrtcbin.c to better understand how it works but when I try to follow the documentation to recompile gst-plugins-bad I end up not seeing my change in place (Even though it was compiled properly)

 

I think the problem is my --prefix since I'm running inside cerbero-unstalled but I tried a bunch of paths with no success

 

Any help will be much appreciated 

 

--

"If we can really understand the problem, the answer will come out of it, 

because the answer is not separate from the problem." - Krishnamurti

 

Vinícius Faria Toná


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



 

--

"If we can really understand the problem, the answer will come out of it, 

because the answer is not separate from the problem." - Krishnamurti

 

Vinícius Faria Toná


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: Problems with gst-plugins-bad and Cerbero

Matthew Thyer

Trying again for a safer solution…

 

Replace line:

BUILD_ROOT="${BUILD_ROOT:-~/build}"

 

With the two lines:

BUILD_ROOT="${BUILD_ROOT/#\~/$HOME}"

BUILD_ROOT="${BUILD_ROOT:-${HOME}/build}"

 

From: gstreamer-devel <[hidden email]> On Behalf Of Matthew Thyer
Sent: Thursday, 31 May 2018 11:26 AM
To: Discussion of the development of and with GStreamer <[hidden email]>
Subject: RE: Problems with gst-plugins-bad and Cerbero

 

Quick fix…

 

Line:

BUILD_ROOT="${BUILD_ROOT:-~/build}"

 

Should actually read:

BUILD_ROOT="${BUILD_ROOT:-${HOME}/build}"

 

From: gstreamer-devel <[hidden email]> On Behalf Of Vinicius Tona
Sent: Wednesday, 30 May 2018 10:05 PM
To: Discussion of the development of and with GStreamer <[hidden email]>
Subject: Re: Problems with gst-plugins-bad and Cerbero

 

Thanks for all the inputs!

 

I will give it a try and see how it goes

 

Regards

 

On Wed, May 30, 2018 at 12:21 AM, Matthew Thyer <[hidden email]> wrote:

I have now totally given up on Cerbero and have written a script that builds just the subset of GStreamer that I require from the released sources (not git). By setting the variables in the script correctly you can but some or all of GStreamer for the installation prefix of your choice.

The script is Ubuntu or at least Debian specific in that it installs the required prerequisite packages using “sudo apt install”.

Just look for the two comment lines that include “(assumes Ubuntu host)” if you want to modify this behaviour.

You’ll want to carefully consider the prerequisite packages and the arguments to configure for each GStreamer module to get your desired behaviour.

By default, the script will build in folder GStreamer release 1.14.1 for the prefix “/usr/local/gstreamer1.0” in the temporary build folder “~/build”.

By default it only builds the modules “gstreamer”, “gst-plugins-base”, “gst-plugins-good” & “gst-rtsp-server” as that’s what I require.

Note that if you build for a prefix other than “/usr/local” you’ll need to set LD_LIBRARY_PATH to include your prefix/lib or correctly link your application for the appropriate runtime library search path.

 

The script is:

 

#!/usr/bin/env bash

 

# Author: Matthew Thyer

# Date: 24-28 May 2018

# Build and install a subset of GStreamer from released sources.

# Actually a generic autoconf project builder that can build anything

#   with appropriate setting of the environment variables

# Note that sudo must already be installed

 

# Where we'll fetch, extract and build the sources (must not already exist!)

BUILD_ROOT="${BUILD_ROOT:-~/build}"

 

# The release to fetch, configure, build & install

RELEASE="${RELEASE:-1.14.1}"

 

# Installation prefix

PREFIX="${PREFIX:-/usr/local/gstreamer1.0}"

export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"

 

# Prerequisite packages that need to be installed (assumes Ubuntu host)

PREREQS="curl xz-utils build-essential bison flex python3 glib2.0 liborc-0.4-dev"

# If building the x264 codec from the gst-plugins-ugly module you'll also need libx264-dev

#PREREQS="curl xz-utils build-essential bison flex python3 glib2.0 liborc-0.4-dev libx264-dev"

 

# Where to source the sources

SRC_URL="https://gstreamer.freedesktop.org/src/"

 

# Arrary of which GStreamer components to build

declare -a COMPONENTS=('gstreamer'

'gst-plugins-base'

'gst-plugins-good'

#'gst-plugins-ugly'

'gst-rtsp-server');

 

# Common configure flags for each of the above components

COMMON_CONF_FLAGS='--disable-maintainer-mode --disable-examples --disable-gtk-doc-html'

 

# Array of additional configure flags for each of the above components

declare -a ADDL_CONF_FLAGS=('--disable-tests --disable-benchmarks --disable-check'

'--enable-orc'

'--enable-orc'

#'--enable-orc'

'')

 

# Number of parallel make jobs

njobs=$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)

 

# Start

prog=`basename $0`

num_comps=${#COMPONENTS[@]}

num_flags=${#ADDL_CONF_FLAGS[@]}

 

if [ -d "${BUILD_ROOT}" ]; then

   echo "${prog}: ERROR: Build folder \"${BUILD_ROOT}\" already exists!"

   exit 1

fi

 

if [ $num_comps -ne $num_flags ]; then

   echo "${prog}: ERROR: Arrays COMPONENTS & ADDL_CONF_FLAGS must contain the same number of elements"

   exit 1

fi

 

# Install prerequisites (assumes Ubuntu host) and make the build root folder

sudo apt update

sudo apt -y upgrade

sudo apt install -y ${PREREQS}

mkdir -p "${BUILD_ROOT}"

 

x=0

while [ $x -lt $num_comps ]; do

   cd "${BUILD_ROOT}"

   y=`expr $x + 1`

 

# Fetch

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> fetch ]"

   echo "Fetching ${SRC_URL}${COMPONENTS[$x]}/${COMPONENTS[$x]}-${RELEASE}.tar.xz"

   curl -LO ${SRC_URL}${COMPONENTS[$x]}/${COMPONENTS[$x]}-${RELEASE}.tar.xz

 

# Extract

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> extract ]"

   tar -xJpf ${COMPONENTS[$x]}-${RELEASE}.tar.xz

 

# Configure

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> configure ]"

   cd "${COMPONENTS[$x]}-${RELEASE}"

   ./configure --prefix="${PREFIX}" ${COMMON_CONF_FLAGS} ${ADDL_CONF_FLAGS[$x]} 2>&1 | tee configure.log

 

# Make

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> make ]"

   make -j $njobs 2>&1 | tee make.log

 

# Install

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> make install ]"

   sudo make install 2>&1 | tee make-install.log

 

   x=$y

done

 

echo "${prog}: INFO: All done!"

exit 0

 

From: gstreamer-devel <[hidden email]> On Behalf Of David Ing
Sent: Wednesday, 30 May 2018 4:13 AM
To: Discussion of the development of and with GStreamer <[hidden email]>
Subject: Re: Problems with gst-plugins-bad and Cerbero

 

There is currently an unresolved bug related to debian package paths:  https://bugzilla.gnome.org/show_bug.cgi?id=796009

 

A likely solution is described in the bug related to a ~/custom.cbc file (part of Matthew Thyer's proposed solution).

 

However, if you just want to rebuild and re-install the one package, this is faster (assuming you are on Linux):

 

cd gst-plugins-bad

./autogen.sh

make

sudo make install && sudo ldconfig

 

 

 

On Tue, May 29, 2018 at 11:18 AM, Vinicius Tona <[hidden email]> wrote:

Hi,

 

I have a docker image with GStreamer built using Cerbero.

I want to add some logs in gstwebrtcbin.c to better understand how it works but when I try to follow the documentation to recompile gst-plugins-bad I end up not seeing my change in place (Even though it was compiled properly)

 

I think the problem is my --prefix since I'm running inside cerbero-unstalled but I tried a bunch of paths with no success

 

Any help will be much appreciated 

 

--

"If we can really understand the problem, the answer will come out of it, 

because the answer is not separate from the problem." - Krishnamurti

 

Vinícius Faria Toná


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



 

--

"If we can really understand the problem, the answer will come out of it, 

because the answer is not separate from the problem." - Krishnamurti

 

Vinícius Faria Toná


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with gst-plugins-bad and Cerbero

Vinicius Tona
In reply to this post by Matthew Thyer
Hi everyone, 

I tried using meson and the script but it didn't work for me on Ubuntu
But since I learned a lot from both solutions, I was able to compile from source on Mac. I guess it was an environment issue or something.

Thank you all

On Wed, May 30, 2018 at 9:56 PM, Matthew Thyer <[hidden email]> wrote:

Quick fix…

 

Line:

BUILD_ROOT="${BUILD_ROOT:-~/build}"

 

Should actually read:

BUILD_ROOT="${BUILD_ROOT:-${HOME}/build}"

 

From: gstreamer-devel <[hidden email]> On Behalf Of Vinicius Tona
Sent: Wednesday, 30 May 2018 10:05 PM


To: Discussion of the development of and with GStreamer <[hidden email]>
Subject: Re: Problems with gst-plugins-bad and Cerbero

 

Thanks for all the inputs!

 

I will give it a try and see how it goes

 

Regards

 

On Wed, May 30, 2018 at 12:21 AM, Matthew Thyer <[hidden email]> wrote:

I have now totally given up on Cerbero and have written a script that builds just the subset of GStreamer that I require from the released sources (not git). By setting the variables in the script correctly you can but some or all of GStreamer for the installation prefix of your choice.

The script is Ubuntu or at least Debian specific in that it installs the required prerequisite packages using “sudo apt install”.

Just look for the two comment lines that include “(assumes Ubuntu host)” if you want to modify this behaviour.

You’ll want to carefully consider the prerequisite packages and the arguments to configure for each GStreamer module to get your desired behaviour.

By default, the script will build in folder GStreamer release 1.14.1 for the prefix “/usr/local/gstreamer1.0” in the temporary build folder “~/build”.

By default it only builds the modules “gstreamer”, “gst-plugins-base”, “gst-plugins-good” & “gst-rtsp-server” as that’s what I require.

Note that if you build for a prefix other than “/usr/local” you’ll need to set LD_LIBRARY_PATH to include your prefix/lib or correctly link your application for the appropriate runtime library search path.

 

The script is:

 

#!/usr/bin/env bash

 

# Author: Matthew Thyer

# Date: 24-28 May 2018

# Build and install a subset of GStreamer from released sources.

# Actually a generic autoconf project builder that can build anything

#   with appropriate setting of the environment variables

# Note that sudo must already be installed

 

# Where we'll fetch, extract and build the sources (must not already exist!)

BUILD_ROOT="${BUILD_ROOT:-~/build}"

 

# The release to fetch, configure, build & install

RELEASE="${RELEASE:-1.14.1}"

 

# Installation prefix

PREFIX="${PREFIX:-/usr/local/gstreamer1.0}"

export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"

 

# Prerequisite packages that need to be installed (assumes Ubuntu host)

PREREQS="curl xz-utils build-essential bison flex python3 glib2.0 liborc-0.4-dev"

# If building the x264 codec from the gst-plugins-ugly module you'll also need libx264-dev

#PREREQS="curl xz-utils build-essential bison flex python3 glib2.0 liborc-0.4-dev libx264-dev"

 

# Where to source the sources

SRC_URL="https://gstreamer.freedesktop.org/src/"

 

# Arrary of which GStreamer components to build

declare -a COMPONENTS=('gstreamer'

'gst-plugins-base'

'gst-plugins-good'

#'gst-plugins-ugly'

'gst-rtsp-server');

 

# Common configure flags for each of the above components

COMMON_CONF_FLAGS='--disable-maintainer-mode --disable-examples --disable-gtk-doc-html'

 

# Array of additional configure flags for each of the above components

declare -a ADDL_CONF_FLAGS=('--disable-tests --disable-benchmarks --disable-check'

'--enable-orc'

'--enable-orc'

#'--enable-orc'

'')

 

# Number of parallel make jobs

njobs=$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)

 

# Start

prog=`basename $0`

num_comps=${#COMPONENTS[@]}

num_flags=${#ADDL_CONF_FLAGS[@]}

 

if [ -d "${BUILD_ROOT}" ]; then

   echo "${prog}: ERROR: Build folder \"${BUILD_ROOT}\" already exists!"

   exit 1

fi

 

if [ $num_comps -ne $num_flags ]; then

   echo "${prog}: ERROR: Arrays COMPONENTS & ADDL_CONF_FLAGS must contain the same number of elements"

   exit 1

fi

 

# Install prerequisites (assumes Ubuntu host) and make the build root folder

sudo apt update

sudo apt -y upgrade

sudo apt install -y ${PREREQS}

mkdir -p "${BUILD_ROOT}"

 

x=0

while [ $x -lt $num_comps ]; do

   cd "${BUILD_ROOT}"

   y=`expr $x + 1`

 

# Fetch

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> fetch ]"

   echo "Fetching ${SRC_URL}${COMPONENTS[$x]}/${COMPONENTS[$x]}-${RELEASE}.tar.xz"

   curl -LO ${SRC_URL}${COMPONENTS[$x]}/${COMPONENTS[$x]}-${RELEASE}.tar.xz

 

# Extract

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> extract ]"

   tar -xJpf ${COMPONENTS[$x]}-${RELEASE}.tar.xz

 

# Configure

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> configure ]"

   cd "${COMPONENTS[$x]}-${RELEASE}"

   ./configure --prefix="${PREFIX}" ${COMMON_CONF_FLAGS} ${ADDL_CONF_FLAGS[$x]} 2>&1 | tee configure.log

 

# Make

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> make ]"

   make -j $njobs 2>&1 | tee make.log

 

# Install

   echo "[(${y}/${num_comps}) ${COMPONENTS[$x]} -> make install ]"

   sudo make install 2>&1 | tee make-install.log

 

   x=$y

done

 

echo "${prog}: INFO: All done!"

exit 0

 

From: gstreamer-devel <[hidden email]> On Behalf Of David Ing
Sent: Wednesday, 30 May 2018 4:13 AM
To: Discussion of the development of and with GStreamer <[hidden email]>
Subject: Re: Problems with gst-plugins-bad and Cerbero

 

There is currently an unresolved bug related to debian package paths:  https://bugzilla.gnome.org/show_bug.cgi?id=796009

 

A likely solution is described in the bug related to a ~/custom.cbc file (part of Matthew Thyer's proposed solution).

 

However, if you just want to rebuild and re-install the one package, this is faster (assuming you are on Linux):

 

cd gst-plugins-bad

./autogen.sh

make

sudo make install && sudo ldconfig

 

 

 

On Tue, May 29, 2018 at 11:18 AM, Vinicius Tona <[hidden email]> wrote:

Hi,

 

I have a docker image with GStreamer built using Cerbero.

I want to add some logs in gstwebrtcbin.c to better understand how it works but when I try to follow the documentation to recompile gst-plugins-bad I end up not seeing my change in place (Even though it was compiled properly)

 

I think the problem is my --prefix since I'm running inside cerbero-unstalled but I tried a bunch of paths with no success

 

Any help will be much appreciated 

 

--

"If we can really understand the problem, the answer will come out of it, 

because the answer is not separate from the problem." - Krishnamurti

 

Vinícius Faria Toná


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



 

--

"If we can really understand the problem, the answer will come out of it, 

because the answer is not separate from the problem." - Krishnamurti

 

Vinícius Faria Toná


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
"If we can really understand the problem, the answer will come out of it, 
because the answer is not separate from the problem." - Krishnamurti

Vinícius Faria Toná

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel