Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 361799 - media-video/mjpegtools-2.0.0_rc1 - version bump
Summary: media-video/mjpegtools-2.0.0_rc1 - version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-03 15:52 UTC by Daniel Pielmeier
Modified: 2011-05-12 18:32 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
diff against 1.9.0 (mjpegtools-2.0.0_rc1.diff,2.73 KB, patch)
2011-04-03 15:52 UTC, Daniel Pielmeier
Details | Diff
support libpng-1.5 (mjpegtools-2.0.0_rc1-libpng-1.5.patch,16.81 KB, patch)
2011-04-03 15:53 UTC, Daniel Pielmeier
Details | Diff
sdl-automagic.patch (mjpegtools-2.0.0_rc1-sdl-automagic.patch,1.17 KB, patch)
2011-04-03 15:53 UTC, Daniel Pielmeier
Details | Diff
gtk-automagic.patch (mjpegtools-2.0.0_rc1-gtk-automagic.patch,1.02 KB, patch)
2011-04-03 15:53 UTC, Daniel Pielmeier
Details | Diff
dga-automagic.patch (mjpegtools-2.0.0_rc1-dga-automagic.patch,1.92 KB, patch)
2011-04-03 16:52 UTC, Daniel Pielmeier
Details | Diff
diff against 1.9.0 (mjpegtools-2.0.0_rc1.diff,2.76 KB, patch)
2011-04-03 16:53 UTC, Daniel Pielmeier
Details | Diff
diff against 1.9.0 (mjpegtools-2.0.0_rc1.diff,2.76 KB, patch)
2011-04-20 16:43 UTC, Daniel Pielmeier
Details | Diff
v4l-automagic.patch (mjpegtools-2.0.0_rc1-v4l-automagic.patch,972 bytes, patch)
2011-04-20 16:44 UTC, Daniel Pielmeier
Details | Diff
diff against 1.9.0 (mjpegtools-2.0.0_rc1.diff,3.08 KB, patch)
2011-04-28 19:48 UTC, Daniel Pielmeier
Details | Diff
amd-k8.patch (mjpegtools-2.0.0_rc1-amd-k8.patch,444 bytes, patch)
2011-04-28 19:49 UTC, Daniel Pielmeier
Details | Diff
v4l-automagic.patch (mjpegtools-2.0.0_rc1-v4l-automagic.patch,1.05 KB, patch)
2011-04-28 19:50 UTC, Daniel Pielmeier
Details | Diff
diff against 1.9.0 (mjpegtools-2.0.0_rc1.diff,3.46 KB, patch)
2011-04-30 17:59 UTC, Daniel Pielmeier
Details | Diff
v4l-automagic.patch (mjpegtools-2.0.0_rc1-v4l-automagic.patch,1.09 KB, patch)
2011-04-30 18:00 UTC, Daniel Pielmeier
Details | Diff
dga-gtk-sdl-automagic.patch (mjpegtools-2.0.0_rc1-dga-gtk-sdl-automagic.patch,2.71 KB, patch)
2011-04-30 18:01 UTC, Daniel Pielmeier
Details | Diff
diff against 1.9.0 (mjpegtools-2.0.0_rc1.diff,3.62 KB, patch)
2011-05-11 18:47 UTC, Daniel Pielmeier
Details | Diff
X11.patch (mjpegtools-2.0.0_rc1-X11.patch,867 bytes, patch)
2011-05-11 18:48 UTC, Daniel Pielmeier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Pielmeier gentoo-dev 2011-04-03 15:52:41 UTC
Created attachment 268349 [details, diff]
diff against 1.9.0

The first release candidate for mjpegtools-2.0.0 is available since 2020.12.31.

I have updated the ebuild to EAPI 4. All patches from 1.9.0 have been integrated upstream. I have tried to fix the gtk and sdl automagics (Bug #259207). I am not an expert there but the patches seem to work (Patches not yet reported upstream). There is also a patch from upstream to support lipng-1.5 (Bug #355043). I have not tested this with libpng-1.5, however it works with current stable.

Remaining issues are:
Making X11 support optional (Bug #259461)
Missing v4l2 support (Bug #359491)
Comment 1 Daniel Pielmeier gentoo-dev 2011-04-03 15:53:10 UTC
Created attachment 268351 [details, diff]
support libpng-1.5
Comment 2 Daniel Pielmeier gentoo-dev 2011-04-03 15:53:36 UTC
Created attachment 268353 [details, diff]
sdl-automagic.patch
Comment 3 Daniel Pielmeier gentoo-dev 2011-04-03 15:53:48 UTC
Created attachment 268355 [details, diff]
gtk-automagic.patch
Comment 4 Daniel Pielmeier gentoo-dev 2011-04-03 16:52:17 UTC
Created attachment 268365 [details, diff]
dga-automagic.patch
Comment 5 Daniel Pielmeier gentoo-dev 2011-04-03 16:53:11 UTC
Created attachment 268367 [details, diff]
diff against 1.9.0
Comment 6 Daniel Pielmeier gentoo-dev 2011-04-20 16:43:26 UTC
Created attachment 270689 [details, diff]
diff against 1.9.0

Add v4l-automagic patch from bug 359491. Users of >=sys-kernel/linux-headers-2.6.38 now can disable v4l to make mjpegtools build.
Comment 7 Daniel Pielmeier gentoo-dev 2011-04-20 16:44:38 UTC
Created attachment 270691 [details, diff]
v4l-automagic.patch
Comment 8 Dennis Schridde 2011-04-25 09:28:32 UTC
Would be nice to see this in portage soon, since 1.9 is basically broken with >=linux-headers-2.6.38.
Comment 9 J.C. Wren 2011-04-25 13:43:15 UTC
Apparently I am doing something wrong.  I've downloaded the patches, placed them in the /usr/portage/media-video/mjpegtools/files directory, copied mjpegtools-1.9.0-r1.ebuild to mjpegtools-2.0.0.ebuild and applied the patch (patch -p0 mjpegtools-2.0.0.ebuild < mjpegtools-2.0.0_rc1.diff), built the digest, and attempted to emerge.  It whines that it can't find http://gentoo.mirrors.pair.com/distfiles/mjpegtools-2.0.0.tar.gz.

I guess I'm not smart enough to see how to correctly apply these patches.
Comment 10 Homer 2011-04-26 01:04:57 UTC
I had to change the following to make it find the sourceforge tarball:

MY_PV="${PV}rc1"
MY_P="${PN}-${MY_PV}"
S=dirname-tarball-makes
SRC_URI="mirror://sourceforge/mjpeg/${MY_P}.tar.gz"

Then download the above patches as the following:

ls -1 /usr/portage/media-video/mjpegtools/files 
mjpegtools-2.0.0-dga-automagic.patch
mjpegtools-2.0.0-gtk-automagic.patch
mjpegtools-2.0.0-libpng-1.5.patch
mjpegtools-2.0.0-sdl-automagic.patch
mjpegtools-2.0.0-v4l-automagic.patch

Then:

cd /usr/portage/media-video/mjpegtools           
ebuild mjpegtools-2.0.0-r1.ebuild manifest
emerge -av mjpegtools

Now at least I can begin the build process.

However, it's riddled with "warning: no previous prototype for..." errors, then fails here:

Making all in yuvdenoise
make[2]: Entering directory `/var/tmp/portage/media-video/mjpegtools-2.0.0-r1/work/mjpegtools-2.0.0/yuvdenoise'
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../utils   -O3 -funroll-all-loops -ffast-math -march=native -O2 -pipe -fomit-frame-pointer -fno-strict-aliasing -pthread -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual -c main.c
main.c:95: warning: no previous prototype for ‘gauss_filter_plane’
main.c:146: warning: no previous prototype for ‘temporal_filter_planes_MC’
main.c:436: warning: no previous prototype for ‘renoise’
main.c:504: warning: no previous prototype for ‘temporal_filter_planes_sse2’
main.c:663: warning: no previous prototype for ‘temporal_filter_planes_p’
main.c:811: warning: no previous prototype for ‘filter_plane_median_sse2’
main.c: In function ‘filter_plane_median_sse2’:
main.c:1035: error: ‘cnt’ undeclared (first use in this function)
main.c:1035: error: (Each undeclared identifier is reported only once
main.c:1035: error: for each function it appears in.)
main.c:1038: error: ‘avg’ undeclared (first use in this function)
main.c: At top level:
main.c:1083: warning: no previous prototype for ‘filter_plane_median_p’
main.c: In function ‘main’:
main.c:1496: warning: assignment discards qualifiers from pointer target type
main.c:1498: warning: assignment discards qualifiers from pointer target type
main.c:1500: warning: assignment discards qualifiers from pointer target type
main.c:1502: warning: assignment discards qualifiers from pointer target type
make[2]: *** [main.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-video/mjpegtools-2.0.0-r1/work/mjpegtools-2.0.0/yuvdenoise'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-video/mjpegtools-2.0.0-r1/work/mjpegtools-2.0.0'
make: *** [all] Error 2
 * ERROR: media-video/mjpegtools-2.0.0-r1 failed (compile phase):
 *   emake failed

Missing dependency, perhaps?
Comment 11 Daniel Pielmeier gentoo-dev 2011-04-27 12:54:20 UTC
(In reply to comment #9)
> Apparently I am doing something wrong.  I've downloaded the patches, placed
> them in the /usr/portage/media-video/mjpegtools/files directory, copied
> mjpegtools-1.9.0-r1.ebuild to mjpegtools-2.0.0.ebuild and applied the patch
> (patch -p0 mjpegtools-2.0.0.ebuild < mjpegtools-2.0.0_rc1.diff), built the
> digest, and attempted to emerge.  It whines that it can't find
> http://gentoo.mirrors.pair.com/distfiles/mjpegtools-2.0.0.tar.gz.
> I guess I'm not smart enough to see how to correctly apply these patches.

The name of the ebuild should be mjpegtools-2.0.0_rc1.ebuild.
Comment 12 Daniel Pielmeier gentoo-dev 2011-04-27 12:56:38 UTC
(In reply to comment #10)
> Now at least I can begin the build process.
> However, it's riddled with "warning: no previous prototype for..." errors, then fails here:
> Making all in yuvdenoise
> make[2]: Entering directory
> `/var/tmp/portage/media-video/mjpegtools-2.0.0-r1/work/mjpegtools-2.0.0/yuvdenoise'
> i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../utils   -O3
> -funroll-all-loops -ffast-math -march=native -O2 -pipe -fomit-frame-pointer
> -fno-strict-aliasing -pthread -Wall -Wunused -Wmissing-prototypes
> -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual
> -c main.c
> main.c:95: warning: no previous prototype for ‘gauss_filter_plane’
> main.c:146: warning: no previous prototype for ‘temporal_filter_planes_MC’
> main.c:436: warning: no previous prototype for ‘renoise’
> main.c:504: warning: no previous prototype for ‘temporal_filter_planes_sse2’
> main.c:663: warning: no previous prototype for ‘temporal_filter_planes_p’
> main.c:811: warning: no previous prototype for ‘filter_plane_median_sse2’
> main.c: In function ‘filter_plane_median_sse2’:
> main.c:1035: error: ‘cnt’ undeclared (first use in this function)
> main.c:1035: error: (Each undeclared identifier is reported only once
> main.c:1035: error: for each function it appears in.)
> main.c:1038: error: ‘avg’ undeclared (first use in this function)
> main.c: At top level:
> main.c:1083: warning: no previous prototype for ‘filter_plane_median_p’
> main.c: In function ‘main’:
> main.c:1496: warning: assignment discards qualifiers from pointer target type
> main.c:1498: warning: assignment discards qualifiers from pointer target type
> main.c:1500: warning: assignment discards qualifiers from pointer target type
> main.c:1502: warning: assignment discards qualifiers from pointer target type
> make[2]: *** [main.o] Error 1
> make[2]: Leaving directory
> `/var/tmp/portage/media-video/mjpegtools-2.0.0-r1/work/mjpegtools-2.0.0/yuvdenoise'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/var/tmp/portage/media-video/mjpegtools-2.0.0-r1/work/mjpegtools-2.0.0'
> make: *** [all] Error 2
>  * ERROR: media-video/mjpegtools-2.0.0-r1 failed (compile phase):
>  *   emake failed
> Missing dependency, perhaps?

It builds fine here can you post the USE flag combination used.
Comment 13 Homer 2011-04-28 06:00:09 UTC
USE="X dga dv mmx png quicktime sdl yv12 -gtk -v4l"
Comment 14 Christian Wilken 2011-04-28 07:56:49 UTC
I'm also having problems compiling -r1:


configure: The host is x86_64-pc-linux-gnu  x86_64  pc  linux-gnu .
checking for alpha architecture... no
checking linux/videodev.h usability... no
checking linux/videodev.h presence... no
checking for linux/videodev.h... no
configure: error: videodev.h not found - please install the linux kernel headers

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/media-video/mjpegtools-1.9.0-r1/work/mjpegtools-1.9.0/config.log
 * ERROR: media-video/mjpegtools-1.9.0-r1 failed (compile phase):
 *   econf failed
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 2855:  Called econf '--with-x' '--disable-xfree-ext' '--without-libquicktime' '--with-libpng' '--without-v4l' '--without-gtk' '--without-sdl' '--without-libdv' '--enable-simd-accel' '--enable-largefile' '--without-jpeg-mmx'
 *     ebuild.sh, line  557:  Called die
 * The specific snippet of code:
 *   			die "econf failed"
 * 


Trying to build with these USE flags:

[ebuild  N    ] media-video/mjpegtools-1.9.0-r1  USE="mmx png -dga -dv -gtk -quicktime -sdl -v4l -yv12" 0 kB
Comment 15 Dennis Schridde 2011-04-28 08:02:16 UTC
(In reply to comment #14)
> I'm also having problems compiling -r1:
Different problem: bug #359491
Comment 16 Christian Wilken 2011-04-28 08:07:30 UTC
I guess https://bugs.gentoo.org/show_bug.cgi?id=359491#c34 confused me...
Comment 17 Daniel Pielmeier gentoo-dev 2011-04-28 08:37:34 UTC
(In reply to comment #13)
> USE="X dga dv mmx png quicktime sdl yv12 -gtk -v4l"

I guess you have a AMD K8 processor. Can you try if applying the following patch to yuvdenoise\main.c fixes the problem?

http://mjpeg.cvs.sourceforge.net/viewvc/mjpeg/mjpeg_play/yuvdenoise/main.c?view=patch&r1=1.72&r2=1.73&pathrev=HEAD
Comment 18 Daniel Pielmeier gentoo-dev 2011-04-28 19:48:30 UTC
Created attachment 271479 [details, diff]
diff against 1.9.0

New diff changing the order of the patches applied. Add a new patch which should fix build failures on AMD K8 processors. Replace the V4L patch with the changes applied upstream. Add a warning in pkg_pretend that v4l support is disabled if the kernel version in use is 2.6.38 or higher and the v4l use flag is activated.
Comment 19 Daniel Pielmeier gentoo-dev 2011-04-28 19:49:48 UTC
Created attachment 271481 [details, diff]
amd-k8.patch
Comment 20 Daniel Pielmeier gentoo-dev 2011-04-28 19:50:14 UTC
Created attachment 271483 [details, diff]
v4l-automagic.patch
Comment 21 Homer 2011-04-29 07:28:39 UTC
(In reply to comment #17)

In my case I have a P4:

cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 1
model name	: Intel(R) Pentium(R) 4 CPU 1.70GHz
stepping	: 2
cpu MHz		: 1693.499
cache size	: 256 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pebs bts
bogomips	: 3386.99
clflush size	: 64
cache_alignment	: 128
address sizes	: 36 bits physical, 32 bits virtual

And the relevant part of my make.conf is:

CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
CHOST="i686-pc-linux-gnu"

Just FYI.
Comment 22 Daniel Pielmeier gentoo-dev 2011-04-29 09:43:15 UTC
(In reply to comment #21)
> (In reply to comment #17)
> In my case I have a P4:

Anyway, did you try if the newest ebuild diff and patches work for you?
Comment 23 Daniel Pielmeier gentoo-dev 2011-04-30 17:59:08 UTC
Created attachment 271653 [details, diff]
diff against 1.9.0

Add a corrected v4l patch from upstream CVS.
The dga,gtk and sdl automagic patches have been accepted upstream as well.
Add static-libs use flag.
Remove useless *.la-files.
Missing info dirs shouldn't be a problem anymore
append-flags -fno-strict-aliasing shouldn't be needed as there aren't any warnings about dereferenced type-punned pointers.
Remove append-flags -mno-sse2 the addition dates back to an empty log message in cvs from 2003.
Change license from as-is to GPL-2.
Comment 24 Daniel Pielmeier gentoo-dev 2011-04-30 18:00:08 UTC
Created attachment 271655 [details, diff]
v4l-automagic.patch
Comment 25 Daniel Pielmeier gentoo-dev 2011-04-30 18:01:12 UTC
Created attachment 271657 [details, diff]
dga-gtk-sdl-automagic.patch
Comment 26 Homer 2011-05-01 02:21:27 UTC
patch -i mjpegtools-2.0.0_rc1.patch -p0 -o mjpegtools-2.0.0_rc1.ebuild
patching file mjpegtools-1.9.0-r1.ebuild

ebuild mjpegtools-2.0.0_rc1.ebuild manifest
emerge -av mjpegtools

[ebuild     U ] media-video/mjpegtools-2.0.0_rc1 [1.9.0-r1] USE="dga dv mmx png quicktime sdl -gtk -static-libs% -v4l (-X%*) (-yv12%*)" 0 kB

* Applying mjpegtools-2.0.0_rc1-libpng-1.5.patch ... [ ok ]
* Applying mjpegtools-2.0.0_rc1-amd-k8.patch ... [ ok ]
* Applying mjpegtools-2.0.0_rc1-v4l-automagic.patch ... [ ok ]
* Applying mjpegtools-2.0.0_rc1-dga-gtk-sdl-automagic.patch ... [ ok ]

Completed installing mjpegtools-2.0.0_rc1

Success!

Built and installed OK.
Run-time operation untested.

Thanks.
Comment 27 Samuli Suominen (RETIRED) gentoo-dev 2011-05-01 09:12:08 UTC
Daniel, please commit your work into Portage... or even start maintaining the package.    Anarchy had some work in his overlay too for the old version.
Comment 28 Daniel Pielmeier gentoo-dev 2011-05-01 09:41:01 UTC
(In reply to comment #27)
> Daniel, please commit your work into Portage... or even start maintaining the
> package. Anarchy had some work in his overlay too for the old version.

I was about to do so, but before I wanted to resolve the outstanding issues. While doing so I documented my work here so everybody is aware of it.

I still need to contact upstream about the X11 issue, If this is resolved I will add it to the tree and myself to maintainers (given that I now have the official permission). Until then everyone can test my changes here.

Btw, I took a look at Anarchy's work it and I think everything is covered here.
Comment 29 Homer 2011-05-02 01:18:07 UTC
Just to confirm the binaries work:

[terminal 1]
mkfifo stream.yuv
mplayer -vo yuv4mpeg -ao null example.avi

[terminal 2]
cat stream.yuv | yuvscaler -M BICUBIC -M WIDE2STD -O DVD | yuvdenoise | yuv2lav -f a -q 80 -o mjpeg-test.avi

Results:
+ Runs without error
+ Output created successfully
+ Resulting AVI is valid and correct format
+ Plays correctly
- Yuvscaler's experimental "-M MMX" flag is unrecognised ("Uncorrect mode keyword: MMX")

+1 commit and close
Comment 30 tman 2011-05-05 17:58:50 UTC
i hope this find a way fast in portagemedia-tv/tvbrowser. this package faile since nearly one month
Comment 31 Daniel Pielmeier gentoo-dev 2011-05-11 18:47:33 UTC
Created attachment 272883 [details, diff]
diff against 1.9.0

The last remaining issue making X11 support optional (Bug #259461) should be solved now. If there are no objections I will add this to the tree in the next days.
Comment 32 Daniel Pielmeier gentoo-dev 2011-05-11 18:48:15 UTC
Created attachment 272885 [details, diff]
X11.patch
Comment 33 Alexis Ballier gentoo-dev 2011-05-11 19:00:56 UTC
(In reply to comment #31)
> Created attachment 272883 [details, diff]
> diff against 1.9.0
> 
> The last remaining issue making X11 support optional (Bug #259461) should be
> solved now. If there are no objections I will add this to the tree in the next
> days.

please do commit it asap, mjpegtools is currently broken in ~arch ;)
Comment 34 Daniel Pielmeier gentoo-dev 2011-05-12 18:32:47 UTC
+*mjpegtools-2.0.0_rc1 (12 May 2011)
+
+  12 May 2011; Daniel Pielmeier <billie@gentoo.org>
+  +mjpegtools-2.0.0_rc1.ebuild, +files/mjpegtools-2.0.0_rc1-X11.patch,
+  +files/mjpegtools-2.0.0_rc1-amd-k8.patch,
+  +files/mjpegtools-2.0.0_rc1-dga-gtk-sdl-automagic.patch,
+  +files/mjpegtools-2.0.0_rc1-libpng-1.5.patch,
+  +files/mjpegtools-2.0.0_rc1-v4l-automagic.patch, metadata.xml:
+  Version bump. Take over package. Fixes bug #259461, #259207, #355043, #359491
+  and #361799.