Video formats supported by javacv

1,752 views
Skip to first unread message

Menegussi

unread,
Aug 17, 2011, 9:07:58 AM8/17/11
to javacv
Hi there,

Its possible to read and play what kind of video format files with
javacv?

Regards,

Menegussi

Samuel Audet

unread,
Aug 18, 2011, 8:06:44 AM8/18/11
to jav...@googlegroups.com
On 2011-08-17 22:07, Menegussi wrote:
> Hi there,
>
> Its possible to read and play what kind of video format files with
> javacv?

Anything that FFmpeg supports, which is pretty much anything you can
imagine and beyond

Samuel

André Menegussi

unread,
Aug 18, 2011, 9:29:48 AM8/18/11
to jav...@googlegroups.com
Hi Samuel,
 
But I did it like this:
 
//
IplImage img2 = null;
 
File f= new File("block_on_Webjet.wmv");
 
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(f);
 
...  and Eclipse shows me these errors:

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.googlecode.javacv.cpp.avcodec

at com.googlecode.javacv.FFmpegFrameGrabber.<init>(

FFmpegFrameGrabber.java:73
)

at com.googlecode.javacv.FFmpegFrameGrabber.<init>(

FFmpegFrameGrabber.java:69)

at teste.smooth(

teste.java:57)

at teste.main(

teste.java:116)

I made any mistake?

Thank you !

Menegussi

 

Whadsdsdsds

2011/8/18 Samuel Audet <samuel...@gmail.com>

Justin Hawkins

unread,
Aug 18, 2011, 10:05:12 AM8/18/11
to jav...@googlegroups.com
Did you download ffmpeg 0.7.1 and move the dll's into your bin path? (Specifically avcodec.xx.dll ... though I'm sure there are about 4 more dll's that will be needed after that.)

André Menegussi

unread,
Aug 18, 2011, 10:12:18 AM8/18/11
to jav...@googlegroups.com
Hi Justin,
 
I didn't ! I will now! :D
 
Another question: If i would run the javacv aplication on other computer, what i need install in this computer ?
 
Thank you !


 
2011/8/18 Justin Hawkins <justin....@gmail.com>

André Menegussi

unread,
Aug 18, 2011, 10:54:19 AM8/18/11
to jav...@googlegroups.com
Hi again,
 
Now i downloaded the "ffmpeg-git-41bf67d-win32-shared" from http://ffmpeg.zeranoe.com/builds/ .
 
I put the files: avcodec-53.dll,  avdevice-53.dll,   avfilter-2.dll, avformat-53.dll, avutil-51.dll, postproc-51.dll and swscale-2.dll in the same dll opencv directory.
 
But the same error remains! what is missing to do?
 
Thanks,
 
Menegussi


2011/8/18 André Menegussi <amene...@gmail.com>

Justin Hawkins

unread,
Aug 18, 2011, 11:23:14 AM8/18/11
to jav...@googlegroups.com, jav...@googlegroups.com
Get an older version of ffmpeg. Newest isnt supported.

Justin

André Menegussi

unread,
Aug 18, 2011, 12:49:49 PM8/18/11
to jav...@googlegroups.com
Hi Justin,
 
I got the file:   ffmpeg-git-2a0d4d4-32-bit-shared.7z 09-May-2011 17:21  4.7M  and replaced them in bin directory
 
Now i have news errors
See attached file, please!
 
what can i do?
 
Thanks again!
 
Menegussi

2011/8/18 Justin Hawkins <justin....@gmail.com>
hs_err_pid5888.log

Justin Hawkins

unread,
Aug 18, 2011, 2:28:28 PM8/18/11
to javacv
Here is an example javacv app, that also has all of the compat dll's
jar's etc... for ffmpeg I'm working in.

http://dl.dropbox.com/u/846109/RenderTest.7z

Its an app that attempts to stream from an ip webcam (or an input avi
file) and perform image stabilization. It can then record to avi, and/
or display to the screen the output.

ENjoy

Justin

On Aug 18, 11:49 am, André Menegussi <amenegu...@gmail.com> wrote:
> Hi Justin,
>
> I got the file:
> ffmpeg-git-2a0d4d4-32-bit-shared.7z<http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-git-2a0d4d4-32-b...>09-May-2011
> 17:21  4.7M  and replaced them in bin directory
>
> Now i have news errors
> See attached file, please!
>
> what can i do?
>
> Thanks again!
>
> Menegussi
>
> 2011/8/18 Justin Hawkins <justin.hawk...@gmail.com>
>
>
>
> >  Get an older version of ffmpeg. Newest isnt supported.
>
> > Justin
>
> > On Aug 18, 2011, at 9:54 AM, André Menegussi <amenegu...@gmail.com> wrote:
>
> >   Hi again,
>
> > Now i downloaded the "ffmpeg-git-41bf67d-win32-shared" from
> >http://ffmpeg.zeranoe.com/builds/.
>
> > I put the files: avcodec-53.dll,  avdevice-53.dll,   avfilter-2.dll,
> > avformat-53.dll, avutil-51.dll, postproc-51.dll and swscale-2.dll in the
> > same dll opencv directory.
>
> > But the same error remains! what is missing to do?
>
> > Thanks,
>
> > Menegussi
>
> > 2011/8/18 André Menegussi <amenegu...@gmail.com>
>
> >> Hi Justin,
>
> >> I didn't ! I will now! :D
>
> >> Another question: If i would run the javacv aplication on other computer,
> >> what i need install in this computer ?
>
> >> Thank you !
>
> >> 2011/8/18 Justin Hawkins <justin.hawk...@gmail.com>
>
> >>> Did you download ffmpeg 0.7.1 and move the dll's into your bin path?
> >>> (Specifically avcodec.xx.dll ... though I'm sure there are about 4 more
> >>> dll's that will be needed after that.)
>
> >>> On Thu, Aug 18, 2011 at 8:29 AM, André Menegussi <amenegu...@gmail.com>wrote:
>
> >>>> Hi Samuel,
>
> >>>> But I did it like this:
>
> >>>> //
> >>>>  IplImage img2 = null;
>
> >>>> File f= *new* File("block_on_Webjet.wmv");
>
> >>>> FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(f);
>
> >>>> ...  and Eclipse shows me these errors:
>
> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: Could not
> >>>> initialize class com.googlecode.javacv.cpp.avcodec
>
> >>>> at com.googlecode.javacv.FFmpegFrameGrabber.<init>(
> >>>> *FFmpegFrameGrabber.java:73*)
>
> >>>> at com.googlecode.javacv.FFmpegFrameGrabber.<init>(
> >>>> *FFmpegFrameGrabber.java:69*)
>
> >>>> at teste.smooth(
> >>>> *teste.java:57*)
>
> >>>> at teste.main(
> >>>> *teste.java:116*)
>
> >>>> I made any mistake?
>
> >>>> Thank you !
>
> >>>> Menegussi
>
> >>>> Whadsdsdsds
> >>>>  2011/8/18 Samuel Audet <samuel.au...@gmail.com>
>
> >>>>> On 2011-08-17 22:07, Menegussi wrote:
>
> >>>>>> Hi there,
>
> >>>>>> Its possible to read and play what kind of video format files with
> >>>>>> javacv?
>
> >>>>> Anything that FFmpeg supports, which is pretty much anything you can
> >>>>> imagine and beyond
>
> >>>>> Samuel
>
>
>
>  hs_err_pid5888.log
> 15KViewDownload- Hide quoted text -
>
> - Show quoted text -

André Menegussi

unread,
Aug 18, 2011, 3:55:35 PM8/18/11
to jav...@googlegroups.com
OK, i will try !!!
 
I tell you how it turns out later!!
 
Thanks
 
Menegussi
 


 
2011/8/18 Justin Hawkins <justin....@gmail.com>
Here is an example javacv app, that also has all of the compat dll's

Menegussi

unread,
Oct 14, 2011, 4:19:45 PM10/14/11
to javacv
Hi all,

I made the video search and play. avi and. avi with applications in
javacv.
But still unable to open files of type. Wmv files only. Avi.

Can anyone help once more? I downloaded and copied the dll files of
ffmpeg to directory where the dll javacv. But the files of the two
links did not work.
Following is the error file that happens in the JVM.


Thanks!!


#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x01a29ff0, pid=9100,
tid=9128
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing
windows-x86 )
# Problematic frame:
# j com.googlecode.javacv.cpp.avcodec.avcodec_init()V+0
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

--------------- T H R E A D ---------------

Current thread (0x003b9c00): JavaThread "main" [_thread_in_native,
id=9128, stack(0x018d0000,0x01920000)]

siginfo: ExceptionCode=0xc0000005, writing address 0xbb769e7f

Registers:
EAX=0x0191fdd4, EBX=0x33aeaa00, ECX=0x003b9d28, EDX=0x09f1c070
ESP=0x0191fc50, EBP=0x0191fc78, ESI=0x33aeaa00, EDI=0x003b9c00
EIP=0x01a29ff0, EFLAGS=0x00010213

Top of Stack: (sp=0x0191fc50)
0x0191fc50: 00000000 09f1c070 0191fc58 33aeaa00
0x0191fc60: 0191fc84 33aef310 00000000 33aeaa00
0x0191fc70: 00000000 0191fc88 0191fca8 01a22e21
0x0191fc80: 33aef0a0 01a282e9 0191fc88 33a908a9
0x0191fc90: 0191fcb4 33acfc10 00000000 33a90908
0x0191fca0: 0191fc88 0191fcb0 0191fcdc 01a22e21
0x0191fcb0: 33add0b8 23f512a0 23f512a0 0191fcbc
0x0191fcc0: 33a87f25 0191fd10 33a91868 00000000

Instructions: (pc=0x01a29ff0)
0x01a29fd0: 0d 00 00 00 81 7d 0c fb 82 a2 01 0f 85 06 00 00
0x01a29fe0: 00 83 ec 08 dd 1c 24 52 50 64 8b 00 00 00 00 00
0x01a29ff0: 00 8b 7f f4 c7 87 64 01 00 00 05 00 00 00 8b cf
0x01a2a000: c1 e9 03 81 e1 fc 0f 00 00 89 0c 0d 00 00 24 00


Register to memory mapping:

EAX=0x0191fdd4 is pointing into the stack for thread: 0x003b9c00
EBX=0x33aeaa00 is an oop
{method}
- klass: {other class}
ECX=0x003b9d28 is an unknown value
EDX=0x09f1c070 is an unknown value
ESP=0x0191fc50 is pointing into the stack for thread: 0x003b9c00
EBP=0x0191fc78 is pointing into the stack for thread: 0x003b9c00
ESI=0x33aeaa00 is an oop
{method}
- klass: {other class}
EDI=0x003b9c00 is a thread


Stack: [0x018d0000,0x01920000], sp=0x0191fc50, free space=319k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)
j com.googlecode.javacv.cpp.avcodec.avcodec_init()V+0
j com.googlecode.javacv.FFmpegFrameGrabber.<init>(Ljava/lang/String;)V
+9
j processamento.CapturaTeste.main([Ljava/lang/String;)V+69
v ~StubRoutines::call_stub
V [jvm.dll+0xfae4b]
V [jvm.dll+0x18c531]
V [jvm.dll+0xfaecd]
V [jvm.dll+0x95846]
V [jvm.dll+0x9d683]
C [javaw.exe+0x2155]
C [javaw.exe+0x8644]
C [kernel32.dll+0x4ed6c] BaseThreadInitThunk+0x12
C [ntdll.dll+0x637f5] RtlInitializeExceptionChain+0xef
C [ntdll.dll+0x637c8] RtlInitializeExceptionChain+0xc2

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.googlecode.javacv.cpp.avcodec.avcodec_init()V+0
j com.googlecode.javacv.FFmpegFrameGrabber.<init>(Ljava/lang/String;)V
+9
j processamento.CapturaTeste.main([Ljava/lang/String;)V+69
v ~StubRoutines::call_stub

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x03eaf800 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=9192,
stack(0x079e0000,0x07a30000)]
0x03e7b800 JavaThread "AWT-Windows" daemon [_thread_in_native,
id=9172, stack(0x04320000,0x04370000)]
0x03e7b400 JavaThread "AWT-Shutdown" [_thread_blocked, id=9168,
stack(0x042d0000,0x04320000)]
0x03e78800 JavaThread "Java2D Disposer" daemon [_thread_blocked,
id=9164, stack(0x040b0000,0x04100000)]
0x019ab400 JavaThread "Low Memory Detector" daemon [_thread_blocked,
id=9156, stack(0x03d90000,0x03de0000)]
0x019a7000 JavaThread "C1 CompilerThread0" daemon [_thread_blocked,
id=9152, stack(0x03d40000,0x03d90000)]
0x019a4000 JavaThread "Attach Listener" daemon [_thread_blocked,
id=9148, stack(0x03cf0000,0x03d40000)]
0x019a3000 JavaThread "Signal Dispatcher" daemon [_thread_blocked,
id=9144, stack(0x03ca0000,0x03cf0000)]
0x0199a400 JavaThread "Finalizer" daemon [_thread_blocked, id=9140,
stack(0x03c50000,0x03ca0000)]
0x01998c00 JavaThread "Reference Handler" daemon [_thread_blocked,
id=9136, stack(0x03c00000,0x03c50000)]
=>0x003b9c00 JavaThread "main" [_thread_in_native, id=9128,
stack(0x018d0000,0x01920000)]

Other Threads:
0x0195d400 VMThread [stack: 0x03bb0000,0x03c00000] [id=9132]
0x019bd400 WatcherThread [stack: 0x03de0000,0x03e30000] [id=9160]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
def new generation total 4928K, used 767K [0x23a80000, 0x23fd0000,
0x28fd0000)
eden space 4416K, 5% used [0x23a80000, 0x23abfe88, 0x23ed0000)
from space 512K, 100% used [0x23f50000, 0x23fd0000, 0x23fd0000)
to space 512K, 0% used [0x23ed0000, 0x23ed0000, 0x23f50000)
tenured generation total 10944K, used 20K [0x28fd0000, 0x29a80000,
0x33a80000)
the space 10944K, 0% used [0x28fd0000, 0x28fd5350, 0x28fd5400,
0x29a80000)
compacting perm gen total 12288K, used 934K [0x33a80000, 0x34680000,
0x37a80000)
the space 12288K, 7% used [0x33a80000, 0x33b699e0, 0x33b69a00,
0x34680000)
ro space 10240K, 51% used [0x37a80000, 0x37fadff8, 0x37fae000,
0x38480000)
rw space 12288K, 55% used [0x38480000, 0x38b1c208, 0x38b1c400,
0x39080000)

Code Cache [0x01a20000, 0x01ac8000, 0x03a20000)
total_blobs=314 nmethods=113 adapters=137 free_code_cache=32892864
largest_free_block=0

Dynamic libraries:
0x00400000 - 0x00424000 C:\Program Files\Java\jre6\bin\javaw.exe
0x770a0000 - 0x771dc000 C:\Windows\SYSTEM32\ntdll.dll
0x75e70000 - 0x75f44000 C:\Windows\system32\kernel32.dll
0x753a0000 - 0x753ea000 C:\Windows\system32\KERNELBASE.dll
0x75d00000 - 0x75da0000 C:\Windows\system32\ADVAPI32.dll
0x75630000 - 0x756dc000 C:\Windows\system32\msvcrt.dll
0x77210000 - 0x77229000 C:\Windows\SYSTEM32\sechost.dll
0x75780000 - 0x75821000 C:\Windows\system32\RPCRT4.dll
0x75da0000 - 0x75e69000 C:\Windows\system32\USER32.dll
0x75540000 - 0x7558e000 C:\Windows\system32\GDI32.dll
0x77200000 - 0x7720a000 C:\Windows\system32\LPK.dll
0x75b00000 - 0x75b9d000 C:\Windows\system32\USP10.dll
0x771e0000 - 0x771ff000 C:\Windows\system32\IMM32.DLL
0x758e0000 - 0x759ac000 C:\Windows\system32\MSCTF.dll
0x7c340000 - 0x7c396000 C:\Program Files\Java\jre6\bin\msvcr71.dll
0x6d7f0000 - 0x6da9f000 C:\Program Files\Java\jre6\bin\client\jvm.dll
0x73370000 - 0x733a2000 C:\Windows\system32\WINMM.dll
0x75170000 - 0x751bc000 C:\Windows\system32\apphelp.dll
0x6d7a0000 - 0x6d7ac000 C:\Program Files\Java\jre6\bin\verify.dll
0x6d320000 - 0x6d33f000 C:\Program Files\Java\jre6\bin\java.dll
0x75590000 - 0x75595000 C:\Windows\system32\PSAPI.DLL
0x6d7e0000 - 0x6d7ef000 C:\Program Files\Java\jre6\bin\zip.dll
0x6d000000 - 0x6d14b000 C:\Program Files\Java\jre6\bin\awt.dll
0x04030000 - 0x04081000 C:\Windows\system32\WINSPOOL.DRV
0x75ba0000 - 0x75cfc000 C:\Windows\system32\ole32.dll
0x745e0000 - 0x7477e000 C:\Windows\WinSxS
\x86_microsoft.windows.common-
controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\COMCTL32.dll
0x75880000 - 0x758d7000 C:\Windows\system32\SHLWAPI.dll
0x71890000 - 0x71914000 C:\Windows\WinSxS
\x86_microsoft.windows.common-
controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af
\comctl32.dll
0x73a40000 - 0x73a53000 C:\Windows\system32\DWMAPI.DLL
0x73f50000 - 0x73f90000 C:\Windows\system32\uxtheme.dll
0x6d230000 - 0x6d27f000 C:\Program Files\Java\jre6\bin
\fontmanager.dll
0x6c080000 - 0x6c0d8000 C:\Program Files\Common Files\microsoft shared
\ink\tiptsf.dll
0x756f0000 - 0x7577f000 C:\Windows\system32\OLEAUT32.dll
0x743f0000 - 0x743f9000 C:\Windows\system32\version.dll
0x751c0000 - 0x751cc000 C:\Windows\system32\CRYPTBASE.dll
0x72d80000 - 0x72f43000 C:\Windows\system32\d3d9.dll
0x72d70000 - 0x72d76000 C:\Windows\system32\d3d8thk.dll
0x615f0000 - 0x61f5b000 C:\Windows\system32\nvd3dum.dll
0x73f20000 - 0x73f45000 C:\Windows\system32\powrprof.dll
0x762b0000 - 0x7644d000 C:\Windows\system32\SETUPAPI.dll
0x753f0000 - 0x75417000 C:\Windows\system32\CFGMGR32.dll
0x752c0000 - 0x752d2000 C:\Windows\system32\DEVOBJ.dll
0x76450000 - 0x7709a000 C:\Windows\system32\shell32.dll
0x755a0000 - 0x75623000 C:\Windows\system32\CLBCatQ.DLL
0x73580000 - 0x735bc000 C:\Windows\system32\oleacc.dll
0x6ae80000 - 0x6aeaa000 F:\OpenCVEclipse\docs\dll\avutil-50.dll
0x74cf0000 - 0x74d06000 C:\Windows\system32\CRYPTSP.dll
0x74a90000 - 0x74acb000 C:\Windows\system32\rsaenh.dll
0x74850000 - 0x74867000 C:\Windows\system32\USERENV.dll
0x75240000 - 0x7524b000 C:\Windows\system32\profapi.dll
0x6d600000 - 0x6d613000 C:\Program Files\Java\jre6\bin\net.dll
0x75ac0000 - 0x75af5000 C:\Windows\system32\WS2_32.dll
0x77230000 - 0x77236000 C:\Windows\system32\NSI.dll
0x74cb0000 - 0x74cec000 C:\Windows\system32\mswsock.dll
0x74ca0000 - 0x74ca6000 C:\Windows\System32\wship6.dll
0x73360000 - 0x73370000 C:\Windows\system32\NLAapi.dll
0x71960000 - 0x71970000 C:\Windows\system32\napinsp.dll
0x71920000 - 0x71932000 C:\Windows\system32\pnrpnsp.dll
0x72010000 - 0x72037000 C:\Program Files\Common Files\Microsoft Shared
\Windows Live\WLIDNSP.DLL
0x71fe0000 - 0x72001000 C:\Program Files\Bonjour\mdnsNSP.dll
0x747d0000 - 0x747ec000 C:\Windows\system32\Iphlpapi.DLL
0x747c0000 - 0x747c7000 C:\Windows\system32\WINNSI.DLL
0x74b70000 - 0x74bb4000 C:\Windows\system32\DNSAPI.dll
0x71970000 - 0x71978000 C:\Windows\System32\winrnr.dll
0x74570000 - 0x74575000 C:\Windows\System32\wshtcpip.dll
0x71fd0000 - 0x71fd6000 C:\Windows\system32\rasadhlp.dll
0x72b00000 - 0x72b38000 C:\Windows\System32\fwpuclnt.dll
0x10000000 - 0x10026000 C:\Users\andre.menegussi\AppData\Local\Temp
\jniavutil8623879044635582232.dll
0x08f20000 - 0x0a044000 F:\OpenCVEclipse\docs\dll\avcodec-52.dll
0x08a90000 - 0x08af2000 C:\Users\andre.menegussi\AppData\Local\Temp
\jniavcodec841649463223380404.dll

VM Arguments:
jvm_args: -Dfile.encoding=Cp1252
java_command: processamento.CapturaTeste
Launcher Type: SUN_STANDARD

Environment Variables:
CLASSPATH=.
PATH=C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/
bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;c:
\Program Files\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:
\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell
\v1.0\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:
\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files
\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program
Files\Windows Live\Shared;C:\Program Files\QuickTime\QTSystem\;C:
\OpenCV2.2\bin;C:\Program Files\CMake 2.8\bin;F:\OpenCVEclipse\docs
\dll
USERNAME=andre.menegussi
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 30 Stepping 5, GenuineIntel



--------------- S Y S T E M ---------------

OS: Windows 7 Build 7601 Service Pack 1

CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 30
stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1,
sse4.2, popcnt

Memory: 4k page, physical 3660856k(1251988k free), swap
7319956k(4637996k free)

vm_info: Java HotSpot(TM) Client VM (20.1-b02) for windows-x86 JRE
(1.6.0_26-b03), built on May 4 2011 00:50:59 by "java_re" with MS VC+
+ 7.1 (VS2003)

time: Fri Oct 14 20:01:23 2011
elapsed time: 2 seconds
















On 18 ago, 16:49, André Menegussi <amenegu...@gmail.com> wrote:
> Hi Justin,
>
> I got the file:
> ffmpeg-git-2a0d4d4-32-bit-shared.7z<http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-git-2a0d4d4-32-b...>09-May-2011
> 17:21  4.7M  and replaced them in bin directory
>
> Now i have news errors
> See attached file, please!
>
> what can i do?
>
> Thanks again!
>
> Menegussi
>
> 2011/8/18 Justin Hawkins <justin.hawk...@gmail.com>
>
>
>
> >  Get an older version of ffmpeg. Newest isnt supported.
>
> > Justin
>
> > On Aug 18, 2011, at 9:54 AM, André Menegussi <amenegu...@gmail.com> wrote:
>
> >   Hi again,
>
> > Now i downloaded the "ffmpeg-git-41bf67d-win32-shared" from
> >http://ffmpeg.zeranoe.com/builds/.
>
> > I put the files: avcodec-53.dll,  avdevice-53.dll,   avfilter-2.dll,
> > avformat-53.dll, avutil-51.dll, postproc-51.dll and swscale-2.dll in the
> > same dll opencv directory.
>
> > But the same error remains! what is missing to do?
>
> > Thanks,
>
> > Menegussi
>
> > 2011/8/18 André Menegussi <amenegu...@gmail.com>
>
> >> Hi Justin,
>
> >> I didn't ! I will now! :D
>
> >> Another question: If i would run the javacv aplication on other computer,
> >> what i need install in this computer ?
>
> >> Thank you !
>
> >> 2011/8/18 Justin Hawkins <justin.hawk...@gmail.com>
>
> >>> Did you download ffmpeg 0.7.1 and move the dll's into your bin path?
> >>> (Specifically avcodec.xx.dll ... though I'm sure there are about 4 more
> >>> dll's that will be needed after that.)
>
> >>> On Thu, Aug 18, 2011 at 8:29 AM, André Menegussi <amenegu...@gmail.com>wrote:
>
> >>>> Hi Samuel,
>
> >>>> But I did it like this:
>
> >>>> //
> >>>>  IplImage img2 = null;
>
> >>>> File f= *new* File("block_on_Webjet.wmv");
>
> >>>> FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(f);
>
> >>>> ...  and Eclipse shows me these errors:
>
> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: Could not
> >>>> initialize class com.googlecode.javacv.cpp.avcodec
>
> >>>> at com.googlecode.javacv.FFmpegFrameGrabber.<init>(
> >>>> *FFmpegFrameGrabber.java:73*)
>
> >>>> at com.googlecode.javacv.FFmpegFrameGrabber.<init>(
> >>>> *FFmpegFrameGrabber.java:69*)
>
> >>>> at teste.smooth(
> >>>> *teste.java:57*)
>
> >>>> at teste.main(
> >>>> *teste.java:116*)
>
> >>>> I made any mistake?
>
> >>>> Thank you !
>
> >>>> Menegussi
>
> >>>> Whadsdsdsds
> >>>>  2011/8/18 Samuel Audet <samuel.au...@gmail.com>
>
> >>>>> On 2011-08-17 22:07, Menegussi wrote:
>
> >>>>>> Hi there,
>
> >>>>>> Its possible to read and play what kind of video format files with
> >>>>>> javacv?
>
> >>>>> Anything that FFmpeg supports, which is pretty much anything you can
> >>>>> imagine and beyond
>
> >>>>> Samuel
>
>
>
>  hs_err_pid5888.log
> 15KExibirDownload- Ocultar texto das mensagens anteriores -
>
> - Mostrar texto das mensagens anteriores -

Samuel Audet

unread,
Oct 14, 2011, 10:37:35 PM10/14/11
to jav...@googlegroups.com
On 2011-10-15 05:19, Menegussi wrote:
> Hi all,
>
> I made the video search and play. avi and. avi with applications in
> javacv.
> But still unable to open files of type. Wmv files only. Avi.
>
> Can anyone help once more? I downloaded and copied the dll files of
> ffmpeg to directory where the dll javacv. But the files of the two
> links did not work.
> Following is the error file that happens in the JVM.
>
>
> Thanks!!
>
>
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x01a29ff0, pid=9100,
> tid=9128
> #
> # JRE version: 6.0_26-b03
> # Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing
> windows-x86 )
> # Problematic frame:
> # j com.googlecode.javacv.cpp.avcodec.avcodec_init()V+0

avcodec_init() does not depend on the file, it gets called only once for
initialization. So, the problem is not related to whether one tries to
read a WMV file or an AVI file

Samuel

André Menegussi

unread,
Oct 15, 2011, 1:59:53 PM10/15/11
to jav...@googlegroups.com
Ok,
 
You can tell if I did everything correct?

 1 - I went into the site http://ffmpeg.org/download.html
How do I use windows http://ffmpeg.zeranoe.com/builds/ went to the site.

 2 - I downloaded the older version Statica:
FFmpeg 2a9046c git-Static 32-bit (10/02/2011)
In this version there are only files. Exe, dll having no, that is correct?

I tried to download ffmpeg because with OpenCVFrameGrabber  I could only open files .avi.

If I'm doing something wrong in the installation you could pass the package of files to download ffmpeg?
Thank you in advance.
 


2011/10/14 Samuel Audet <samuel...@gmail.com>

André Menegussi

unread,
Oct 18, 2011, 1:15:31 PM10/18/11
to jav...@googlegroups.com
Hi all,
 
Someone could send me a package with one installation of ffmpeg compatible with Javacv?

 And any additional information if required for installation.

Thanks

 
 
 
 

2011/10/15 André Menegussi <amene...@gmail.com>

Samuel Audet

unread,
Oct 20, 2011, 3:03:11 AM10/20/11
to jav...@googlegroups.com
Hello,

Sorry for the late reply.. As indicated in the README.txt file:
* Precompiled for Windows (last compatible build: 18-Apr-2011)
* http://hawkeye.arrozcru.org/builds/win32/shared/
* http://hawkeye.arrozcru.org/builds/win64/shared/

Samuel

André Menegussi

unread,
Oct 20, 2011, 7:33:11 AM10/20/11
to jav...@googlegroups.com
Thanks Samuel,
 
I downloaded the first time but my ffmpeg did not work, as the mail I sent asking why.

 I should have to install the files in the bin directory of the same dlls javacv and ready? Or should I do anything else?

Thank you so much ;)

2011/10/20 Samuel Audet <samuel...@gmail.com>
Hello,

Sorry for the late reply.. As indicated in the README.txt file:
 * Precompiled for Windows (last compatible build: 18-Apr-2011)
  * http://hawkeye.arrozcru.org/builds/win32/shared/
  * http://hawkeye.arrozcru.org/builds/win64/shared/

Samuel

Samuel Audet

unread,
Oct 20, 2011, 7:57:39 AM10/20/11
to jav...@googlegroups.com
As for OpenCV, please take the time to read this page:
Common issues with OpenCV under Windows 7
http://code.google.com/p/javacv/wiki/Windows7AndOpenCV

Samuel

On 2011-10-20 20:33, Andr� Menegussi wrote:
> Thanks Samuel,
> I downloaded the first time but my ffmpeg did not work, as the mail I
> sent asking why.
>
> I should have to install the files in the bin directory of the same dlls
> javacv and ready? Or should I do anything else?
>
> Thank you so much ;)
>
> 2011/10/20 Samuel Audet <samuel...@gmail.com

> <mailto:samuel...@gmail.com>>


>
> Hello,
>
> Sorry for the late reply.. As indicated in the README.txt file:
> * Precompiled for Windows (last compatible build: 18-Apr-2011)

> * http://hawkeye.arrozcru.org/__builds/win32/shared/
> <http://hawkeye.arrozcru.org/builds/win32/shared/>
> * http://hawkeye.arrozcru.org/__builds/win64/shared/
> <http://hawkeye.arrozcru.org/builds/win64/shared/>
>
> Samuel


>
>
> On 2011-10-16 02:59, Andr� Menegussi wrote:
>
> Ok,
> You can tell if I did everything correct?
>

> 1 - I went into the site http://ffmpeg.org/download.__html
> <http://ffmpeg.org/download.html>
> How do I use windows http://ffmpeg.zeranoe.com/__builds/

André Menegussi

unread,
Oct 20, 2011, 8:42:31 AM10/20/11
to jav...@googlegroups.com
Hi Samuel,
 
Finally worked! I think I got a newer version after April 19.
For writing files in. Wmv. Mov and other formats how do I know the ID of the codec
in recorder.setCodecID (id) ?
 
To write a filename.wmv gave me this message:
 
java.lang.Exception: codec not found
 at com.googlecode.javacv.FFmpegFrameRecorder.start(FFmpegFrameRecorder.java:189)
 at processamento.CapturaTeste.main(CapturaTeste.java:171)
Thank you again

2011/10/20 Samuel Audet <samuel...@gmail.com>
As for OpenCV, please take the time to read this page:
   Common issues with OpenCV under Windows 7
   http://code.google.com/p/javacv/wiki/Windows7AndOpenCV

Samuel

Samuel Audet

unread,
Oct 20, 2011, 9:13:10 AM10/20/11
to jav...@googlegroups.com
On 2011-10-20 21:42, Andr� Menegussi wrote:
> Hi Samuel,
> Finally worked! I think I got a newer version after April 19.

Great!

> For writing files in. Wmv. Mov and other formats how do I know the ID of
> the codec
> in recorder.setCodecID (id) ?

http://code.google.com/p/javacv/source/browse/trunk/javacv/src/com/googlecode/javacv/cpp/avcodec.java#110

Samuel

André Menegussi

unread,
Oct 20, 2011, 9:40:06 AM10/20/11
to jav...@googlegroups.com
Samuel, executing this code:
 
if (key.getKeyChar() == 'z'){
 // recorder = new OpenCVFrameRecorder("d:/output.avi", grabbedImage.width(), grabbedImage.height());
 recorder = new FFmpegFrameRecorder("d:/output.mpeg", grabbedImage.width(), grabbedImage.height());
 System.out.println("\n\n\n\ncriei o recorder");
  
  try {
       System.out.println("\n\n\n\n antes do start");
       recorder.setCodecID(CODEC_ID_MPEG1VIDEO  );
       recorder.setFrameRate(10);
        recorder.start();
        System.out.println("\n\n\n\n  dei start");
        } catch (Exception e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
 break;
 }
}
 
Eclipse shows me this error:

antes do start
java.lang.Exception: could not open codec
 at com.googlecode.javacv.FFmpegFrameRecorder.start(FFmpegFrameRecorder.java:196)
 at processamento.CapturaTeste.main(CapturaTeste.java:171)
 
 
 
I did not understand!!
 
 

 
2011/10/20 Samuel Audet <samuel...@gmail.com>

Samuel Audet

unread,
Oct 20, 2011, 9:56:54 AM10/20/11
to jav...@googlegroups.com

I don't think MPEG-1 supports 10 FPS. Try 30

Samuel

André Menegussi

unread,
Oct 20, 2011, 11:40:43 AM10/20/11
to jav...@googlegroups.com
I tryed with 20 ,15 fps  and without set framerate and not works.
 
Can you give me an example of file name and setCODECID that works?
 
The strange thing is that the message says can not open the codec!

Regards,
 
Menegussi
2011/10/20 Samuel Audet <samuel...@gmail.com>

Samuel Audet

unread,
Oct 21, 2011, 3:31:49 AM10/21/11
to jav...@googlegroups.com
Right, MPEG-1 does not support RGB or grayscale images either. Try to
setPixelFormat(PIX_FMT_YUV420P), that should get it working, along with
setFrameRate(30). I think FFmpeg supports 10 FPS for MPEG-1, but you
would not be able to play the file with anything else AFAIK.

Samuel

On 2011-10-21 00:40, Andr� Menegussi wrote:
> I tryed with 20 ,15 fps and without set framerate and not works.
> Can you give me an example of file name and setCODECID that works?
> The strange thing is that the message says can not open the codec!
>
> Regards,
> Menegussi
> 2011/10/20 Samuel Audet <samuel...@gmail.com

> <mailto:samuel...@gmail.com>>


>
> On 2011-10-20 22:40, Andr� Menegussi wrote:
>
> Samuel, executing this code:
> if (key.getKeyChar() == 'z'){

> // recorder = new OpenCVFrameRecorder("d:/__output.avi",
> grabbedImage.width(), grabbedImage.height());
> recorder = new FFmpegFrameRecorder("d:/__output.mpeg",
> grabbedImage.width(), grabbedImage.height());
> System.out.println("\n\n\n\__ncriei o recorder");


>
> try {
> System.out.println("\n\n\n\n antes do start");

> recorder.setCodecID(CODEC_ID___MPEG1VIDEO );


> recorder.setFrameRate(10);
> recorder.start();
> System.out.println("\n\n\n\n dei start");
> } catch (Exception e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> break;
> }
> }
> Eclipse shows me this error:
>
> antes do start
> java.lang.Exception: could not open codec
> at

> com.googlecode.javacv.__FFmpegFrameRecorder.start(__FFmpegFrameRecorder.java:196)
> at processamento.CapturaTeste.__main(CapturaTeste.java:171)

André Menegussi

unread,
Oct 21, 2011, 9:20:10 AM10/21/11
to jav...@googlegroups.com
It Works!! thank you!
 
When I play the video images recorded in grayscale or binarized the video shows me three columns of information.
But I think it is possible to bypass converting the image into three channels before record.
I had to put the (com.googlecode.javacv.cpp.avutil. along with the constant PIX_FMT_YUV420P.
The import of avutil did not work.  is this normal ?. Sorry is that I am begginer in JAVA! =)

 

 
Thank you again
2011/10/21 Samuel Audet <samuel...@gmail.com>
Right, MPEG-1 does not support RGB or grayscale images either. Try to setPixelFormat(PIX_FMT_YUV420P), that should get it working, along with setFrameRate(30). I think FFmpeg supports 10 FPS for MPEG-1, but you would not be able to play the file with anything else AFAIK.

Samuel
Reply all
Reply to author
Forward
0 new messages