Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8187531

Crash in Xuggler library com.xuggle.xuggler.XugglerJNI.IContainer_open__SWIG_1(JLcom/xuggle/xuggler/IContainer;Ljava/lang/String;IJLcom/xuggle/xuggler/IContainerFormat;ZZ)I

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      FULL PRODUCT VERSION :
      JAVA SE Environment:Environment (8.0_141) (build 1.8.0_141)

      FULL OS VERSION :
      Windows 10.64 bit Operating System
      Intel(R) Core(TM) m-5Y10c CPU @ 0.80ghZ 1.00GHz

      A DESCRIPTION OF THE PROBLEM :
      I am running a java program that is extracting frames from a video, using xuggler jar file and some others.
      But cannot extracting the frames successfully.

      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: No

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: No

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      EXECUTING A PROGRAM in netbeans java, task was to extract frames from a video

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      frames of video
      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006ee76520, pid=32, tid=0x0000000000001ac4
      #
      # JRE version: Java(TM) SE Runtime Environment (8.0_141-b15) (build 1.8.0_141-b15)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.141-b15 mixed mode windows-amd64 compressed oops)
      # Problematic frame:
      # C [xuggle678445369362657074.dll+0x736520]
      #
      # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/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 (0x0000000002d00800): JavaThread "main" [_thread_in_native, id=6852, stack(0x0000000002b90000,0x0000000002c90000)]

      siginfo: ExceptionCode=0xc0000005, reading address 0xffffffffffffffff

      Registers:
      RAX=0x0000000017903650, RBX=0x0000000017906280, RCX=0x0000000017903650, RDX=0x0000000000000009
      RSP=0x0000000002c8e320, RBP=0x0000000017902d90, RSI=0x0000000017904650, RDI=0x0000000000000004
      R8 =0x000000006ee77580, R9 =0x000000006ee76490, R10=0x0000000017975cd0, R11=0x00000000176a4070
      R12=0x00000000176a4870, R13=0x0000000000000004, R14=0x0000000000000184, R15=0x000000006fab8f20
      RIP=0x000000006ee76520, EFLAGS=0x0000000000010202

      Top of Stack: (sp=0x0000000002c8e320)
      0x0000000002c8e320: 000000006ee76665 000000006ee774c5
      0x0000000002c8e330: 000000006ee77505 000000006ee77545
      0x0000000002c8e340: 000000006ee77585 000000006ee79426
      0x0000000002c8e350: 000000006fab8f20 0000000017903650
      0x0000000002c8e360: 0000000017908740 0000000002e07b30
      0x0000000002c8e370: 3fe0000000000000 0000000000000000
      0x0000000002c8e380: 40c7760000000000 0000000000000000
      0x0000000002c8e390: 3fe0000000000000 0000000000000001
      0x0000000002c8e3a0: 0000000017909740 000000006ea45d24
      0x0000000002c8e3b0: 3f40624dd2f1a9fc 0000000000000000
      0x0000000002c8e3c0: 0000000000000000 0000000000000000
      0x0000000002c8e3d0: 0000000000000000 0000000000000000
      0x0000000002c8e3e0: 0000000017912640 000000006fab7320
      0x0000000002c8e3f0: 000000001776f9b0 00000000179061e0
      0x0000000002c8e400: 0000000000000001 0000000017902d90
      0x0000000002c8e410: 0000000017902e10 0000000000000000

      Instructions: (pc=0x000000006ee76520)
      0x000000006ee76500: c4 e3 5d 0c c0 55 c5 e4 5c c8 c5 e4 58 c0 c5 fc
      0x000000006ee76510: 29 01 c5 fc 29 49 20 c3 0f 1f 84 00 00 00 00 00
      0x000000006ee76520: c5 fc 28 51 40 c5 fc 28 59 60 c5 ec 5c fb c5 ec
      0x000000006ee76530: 58 d3 c5 c4 57 3d 26 41 84 00 c5 ec c6 df be c5


      Register to memory mapping:

      RAX=0x0000000017903650 is an unknown value
      RBX=0x0000000017906280 is an unknown value
      RCX=0x0000000017903650 is an unknown value
      RDX=0x0000000000000009 is an unknown value
      RSP=0x0000000002c8e320 is pointing into the stack for thread: 0x0000000002d00800
      RBP=0x0000000017902d90 is an unknown value
      RSI=0x0000000017904650 is an unknown value
      RDI=0x0000000000000004 is an unknown value
      R8 =0x000000006ee77580 is an unknown value
      R9 =0x000000006ee76490 is an unknown value
      R10=0x0000000017975cd0 is an unknown value
      R11=0x00000000176a4070 is an unknown value
      R12=0x00000000176a4870 is an unknown value
      R13=0x0000000000000004 is an unknown value
      R14=0x0000000000000184 is an unknown value
      R15=0x000000006fab8f20 is an unknown value


      Stack: [0x0000000002b90000,0x0000000002c90000], sp=0x0000000002c8e320, free space=1016k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C [xuggle678445369362657074.dll+0x736520]

      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j com.xuggle.xuggler.XugglerJNI.IContainer_open__SWIG_1(JLcom/xuggle/xuggler/IContainer;Ljava/lang/String;IJLcom/xuggle/xuggler/IContainerFormat;ZZ)I+0
      j com.xuggle.xuggler.IContainer.open(Ljava/lang/String;Lcom/xuggle/xuggler/IContainer$Type;Lcom/xuggle/xuggler/IContainerFormat;ZZ)I+19
      j com.xuggle.mediatool.MediaReader.open()V+20
      j com.xuggle.mediatool.MediaReader.readPacket()Lcom/xuggle/xuggler/IError;+8
      j VideoThumbnailsExample.main([Ljava/lang/String;)V+29
      v ~StubRoutines::call_stub

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

      Java Threads: ( => current thread )
        0x0000000016d77000 JavaThread "Service Thread" daemon [_thread_blocked, id=2560, stack(0x0000000017140000,0x0000000017240000)]
        0x0000000015419800 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=4540, stack(0x0000000016c40000,0x0000000016d40000)]
        0x000000001540e800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=3428, stack(0x0000000016b40000,0x0000000016c40000)]
        0x0000000015409000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=2020, stack(0x0000000016a40000,0x0000000016b40000)]
        0x0000000015418000 JavaThread "Attach Listener" daemon [_thread_blocked, id=7188, stack(0x0000000016940000,0x0000000016a40000)]
        0x0000000015416800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5552, stack(0x0000000016840000,0x0000000016940000)]
        0x00000000153fa800 JavaThread "Finalizer" daemon [_thread_blocked, id=4568, stack(0x0000000016660000,0x0000000016760000)]
        0x0000000002df1000 JavaThread "Reference Handler" daemon [_thread_blocked, id=7360, stack(0x0000000016560000,0x0000000016660000)]
      =>0x0000000002d00800 JavaThread "main" [_thread_in_native, id=6852, stack(0x0000000002b90000,0x0000000002c90000)]

      Other Threads:
        0x00000000153d6800 VMThread [stack: 0x0000000016460000,0x0000000016560000] [id=2032]
        0x0000000016d79000 WatcherThread [stack: 0x0000000017240000,0x0000000017340000] [id=7432]

      VM state:not at safepoint (normal execution)

      VM Mutex/Monitor currently owned by a thread: None

      Heap:
       PSYoungGen total 18944K, used 3390K [0x00000000eb180000, 0x00000000ec680000, 0x0000000100000000)
        eden space 16384K, 20% used [0x00000000eb180000,0x00000000eb4cfac8,0x00000000ec180000)
        from space 2560K, 0% used [0x00000000ec400000,0x00000000ec400000,0x00000000ec680000)
        to space 2560K, 0% used [0x00000000ec180000,0x00000000ec180000,0x00000000ec400000)
       ParOldGen total 44032K, used 0K [0x00000000c1400000, 0x00000000c3f00000, 0x00000000eb180000)
        object space 44032K, 0% used [0x00000000c1400000,0x00000000c1400000,0x00000000c3f00000)
       Metaspace used 4535K, capacity 5088K, committed 5248K, reserved 1056768K
        class space used 501K, capacity 528K, committed 640K, reserved 1048576K

      Card table byte_map: [0x00000000121c0000,0x00000000123c0000] byte_map_base: 0x0000000011bb6000

      Marking Bits: (ParMarkBitMap*) 0x000000005c06d850
       Begin Bits: [0x0000000012910000, 0x00000000138c0000)
       End Bits: [0x00000000138c0000, 0x0000000014870000)

      Polling page: 0x00000000013b0000

      CodeCache: size=245760Kb used=1576Kb max_used=1587Kb free=244183Kb
       bounds [0x0000000002e00000, 0x0000000003070000, 0x0000000011e00000]
       total_blobs=525 nmethods=209 adapters=229
       compilation: enabled

      Compilation events (10 events):
      Event: 1.758 Thread 0x000000001540e800 209 4 java.lang.String::startsWith (72 bytes)
      Event: 1.758 Thread 0x0000000015419800 nmethod 201 0x0000000002f89050 code [0x0000000002f891c0, 0x0000000002f89588]
      Event: 1.758 Thread 0x0000000015419800 203 1 java.net.URLClassLoader::access$000 (5 bytes)
      Event: 1.758 Thread 0x0000000015419800 nmethod 203 0x0000000002f89710 code [0x0000000002f89860, 0x0000000002f89950]
      Event: 1.758 Thread 0x0000000015419800 207 1 java.security.CodeSource::getLocation (5 bytes)
      Event: 1.759 Thread 0x0000000015419800 nmethod 207 0x0000000002f899d0 code [0x0000000002f89b20, 0x0000000002f89c30]
      Event: 1.759 Thread 0x0000000015419800 208 1 sun.misc.URLClassPath$JarLoader::access$700 (5 bytes)
      Event: 1.759 Thread 0x0000000015419800 nmethod 208 0x0000000002f89c90 code [0x0000000002f89de0, 0x0000000002f89ed0]
      Event: 1.761 Thread 0x0000000015409000 nmethod 206 0x0000000002f8cd90 code [0x0000000002f8cee0, 0x0000000002f8d138]
      Event: 1.761 Thread 0x000000001540e800 nmethod 209 0x0000000002f8d290 code [0x0000000002f8d3e0, 0x0000000002f8d5b8]

      GC Heap History (0 events):
      No events

      Deoptimization events (1 events):
      Event: 0.549 Thread 0x0000000002d00800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002f7b1a0 method=java.util.zip.InflaterInputStream.read([BII)I @ 69

      Internal exceptions (10 events):
      Event: 0.117 Thread 0x0000000002d00800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000eb1f9ed8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u141\9370\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
      Event: 0.117 Thread 0x0000000002d00800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000eb1fa0e8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u141\9370\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
      Event: 0.117 Thread 0x0000000002d00800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000eb1faae8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u141\9370\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
      Event: 0.117 Thread 0x0000000002d00800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000eb1facf8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u141\9370\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
      Event: 0.117 Thread 0x0000000002d00800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000eb1fb6b8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u141\9370\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
      Event: 0.117 Thread 0x0000000002d00800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000eb1fb8c8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u141\9370\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
      Event: 0.158 Thread 0x0000000002d00800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000eb2d7370) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u141\9370\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
      Event: 0.158 Thread 0x0000000002d00800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000eb2d7580) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u141\9370\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
      Event: 0.158 Thread 0x0000000002d00800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000eb2db678) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u141\9370\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
      Event: 0.158 Thread 0x0000000002d00800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000eb2db888) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u141\9370\hotspot\src\share\vm\prims\jvm.cpp, line 1390]

      Events (10 events):
      Event: 1.763 loading class com/xuggle/mediatool/AMediaListenerMixin
      Event: 1.763 loading class com/xuggle/mediatool/AMediaListenerMixin done
      Event: 1.764 loading class java/awt/image/RenderedImage
      Event: 1.764 loading class java/awt/image/RenderedImage done
      Event: 1.764 loading class com/xuggle/xuggler/IContainer$Type
      Event: 1.764 loading class com/xuggle/xuggler/IContainer$Type done
      Event: 1.764 loading class com/xuggle/xuggler/IContainer$Type$SwigNext
      Event: 1.764 loading class com/xuggle/xuggler/IContainer$Type$SwigNext done
      Event: 1.764 loading class com/xuggle/xuggler/IContainerFormat
      Event: 1.764 loading class com/xuggle/xuggler/IContainerFormat done


      Dynamic libraries:
      0x00007ff66e7b0000 - 0x00007ff66e7e7000 C:\Program Files\Java\jdk1.8.0_141\bin\java.exe
      0x00007ffa64c90000 - 0x00007ffa64e51000 C:\WINDOWS\SYSTEM32\ntdll.dll
      0x00007ffa64ab0000 - 0x00007ffa64b5d000 C:\WINDOWS\system32\KERNEL32.DLL
      0x00007ffa55570000 - 0x00007ffa555a3000 C:\Program Files\AVAST Software\Avast\x64\aswhooka.dll
      0x00007ffa616b0000 - 0x00007ffa61898000 C:\WINDOWS\system32\KERNELBASE.dll
      0x00007ffa62090000 - 0x00007ffa62137000 C:\WINDOWS\system32\ADVAPI32.dll
      0x00007ffa63d50000 - 0x00007ffa63ded000 C:\WINDOWS\system32\msvcrt.dll
      0x00007ffa64b60000 - 0x00007ffa64bbb000 C:\WINDOWS\system32\sechost.dll
      0x00007ffa63c30000 - 0x00007ffa63d4c000 C:\WINDOWS\system32\RPCRT4.dll
      0x00007ffa63e10000 - 0x00007ffa63f66000 C:\WINDOWS\system32\USER32.dll
      0x00007ffa63a30000 - 0x00007ffa63bb7000 C:\WINDOWS\system32\GDI32.dll
      0x00007ffa54910000 - 0x00007ffa54b84000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10586.839_none_a2ddba30a539a2ae\COMCTL32.dll
      0x00007ffa63740000 - 0x00007ffa639be000 C:\WINDOWS\system32\combase.dll
      0x00007ffa62020000 - 0x00007ffa6208a000 C:\WINDOWS\system32\bcryptPrimitives.dll
      0x00007ffa636a0000 - 0x00007ffa636db000 C:\WINDOWS\system32\IMM32.DLL
      0x000000005c730000 - 0x000000005c802000 C:\Program Files\Java\jdk1.8.0_141\jre\bin\msvcr100.dll
      0x000000005b850000 - 0x000000005c0ed000 C:\Program Files\Java\jdk1.8.0_141\jre\bin\server\jvm.dll
      0x00007ffa643f0000 - 0x00007ffa643f8000 C:\WINDOWS\system32\PSAPI.DLL
      0x00007ffa5cb50000 - 0x00007ffa5cb59000 C:\WINDOWS\SYSTEM32\WSOCK32.dll
      0x00007ffa64a40000 - 0x00007ffa64aab000 C:\WINDOWS\system32\WS2_32.dll
      0x00007ffa5ecb0000 - 0x00007ffa5ecd3000 C:\WINDOWS\SYSTEM32\WINMM.dll
      0x00007ffa5f940000 - 0x00007ffa5f94a000 C:\WINDOWS\SYSTEM32\VERSION.dll
      0x00007ffa5ec50000 - 0x00007ffa5ec7c000 C:\WINDOWS\SYSTEM32\WINMMBASE.dll
      0x00007ffa61340000 - 0x00007ffa61383000 C:\WINDOWS\system32\cfgmgr32.dll
      0x000000005c6e0000 - 0x000000005c6ef000 C:\Program Files\Java\jdk1.8.0_141\jre\bin\verify.dll
      0x000000005c6b0000 - 0x000000005c6d9000 C:\Program Files\Java\jdk1.8.0_141\jre\bin\java.dll
      0x000000005c690000 - 0x000000005c6a6000 C:\Program Files\Java\jdk1.8.0_141\jre\bin\zip.dll
      0x00007ffa62140000 - 0x00007ffa6369c000 C:\WINDOWS\system32\SHELL32.dll
      0x00007ffa618c0000 - 0x00007ffa61f04000 C:\WINDOWS\system32\windows.storage.dll
      0x00007ffa63bc0000 - 0x00007ffa63c12000 C:\WINDOWS\system32\shlwapi.dll
      0x00007ffa612b0000 - 0x00007ffa612bf000 C:\WINDOWS\system32\kernel.appcore.dll
      0x00007ffa615f0000 - 0x00007ffa616a5000 C:\WINDOWS\system32\shcore.dll
      0x00007ffa612f0000 - 0x00007ffa6133b000 C:\WINDOWS\system32\powrprof.dll
      0x00007ffa612c0000 - 0x00007ffa612d4000 C:\WINDOWS\system32\profapi.dll
      0x00007ffa60920000 - 0x00007ffa60937000 C:\WINDOWS\SYSTEM32\CRYPTSP.dll
      0x00007ffa605b0000 - 0x00007ffa605e4000 C:\WINDOWS\system32\rsaenh.dll
      0x00007ffa611e0000 - 0x00007ffa61209000 C:\WINDOWS\SYSTEM32\bcrypt.dll
      0x00007ffa60700000 - 0x00007ffa6071f000 C:\WINDOWS\SYSTEM32\USERENV.dll
      0x00007ffa60a40000 - 0x00007ffa60a4b000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll
      0x000000005c670000 - 0x000000005c68a000 C:\Program Files\Java\jdk1.8.0_141\jre\bin\net.dll
      0x00007ffa60870000 - 0x00007ffa608cc000 C:\WINDOWS\system32\mswsock.dll
      0x00007ffa59510000 - 0x00007ffa59548000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
      0x00007ffa63c20000 - 0x00007ffa63c28000 C:\WINDOWS\system32\NSI.dll
      0x00007ffa58740000 - 0x00007ffa58756000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL
      0x00007ffa58640000 - 0x00007ffa5865a000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL
      0x000000005c650000 - 0x000000005c661000 C:\Program Files\Java\jdk1.8.0_141\jre\bin\nio.dll
      0x000000006e740000 - 0x000000006fda5000 C:\Users\PC\AppData\Local\Temp\xuggle\xuggle678445369362657074.dll
      0x00007ffa64180000 - 0x00007ffa642c3000 C:\WINDOWS\system32\ole32.dll
      0x00007ffa57b30000 - 0x00007ffa57b48000 C:\WINDOWS\SYSTEM32\AVICAP32.dll
      0x00007ffa561b0000 - 0x00007ffa561d9000 C:\WINDOWS\SYSTEM32\MSVFW32.dll
      0x00007ffa60e00000 - 0x00007ffa60f8c000 C:\WINDOWS\SYSTEM32\dbghelp.dll

      VM Arguments:
      jvm_args: -Dfile.encoding=UTF-8
      java_command: VideoThumbnailsExample
      java_class_path (initial): D:\usb\slf4j-1.7.25\slf4j-1.7.25\jcl-over-slf4j-1.7.25.jar;D:\usb\slf4j-1.7.25\slf4j-1.7.25\log4j-over-slf4j-1.7.25.jar;D:\usb\slf4j-1.7.25\slf4j-1.7.25\slf4j-api-1.7.25.jar;D:\usb\slf4j-1.7.25\slf4j-1.7.25\slf4j-simple-1.7.25.jar;C:\xuggle-xuggler-5.4.jar;C:\Users\PC\Documents\NetBeansProjects\JavaApplication2\build\classes
      Launcher Type: SUN_STANDARD

      Environment Variables:
      PATH=C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
      USERNAME=PC
      OS=Windows_NT
      PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 61 Stepping 4, GenuineIntel



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

      OS: Windows 10.0 , 64 bit Build 10586 (10.0.10586.589)

      CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 61 stepping 4, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx

      Memory: 4k page, physical 4107804k(1595928k free), swap 5418524k(2500948k free)

      vm_info: Java HotSpot(TM) 64-Bit Server VM (25.141-b15) for windows-amd64 JRE (1.8.0_141-b15), built on Jul 12 2017 04:25:12 by "java_re" with MS VC++ 10.0 (VS2010)

      time: Sat Sep 09 09:17:08 2017
      elapsed time: 1 seconds (0d 0h 0m 1s)



      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      /*
       * To change this license header, choose License Headers in Project Properties.
       * To change this template file, choose Tools | Templates
       * and open the template in the editor.
       */

      /**
       *
       * @author Sher
       */


      import java.awt.image.BufferedImage;
      import java.io.File;
      import java.io.IOException;

      import javax.imageio.ImageIO;

      import com.xuggle.mediatool.IMediaReader;
      import com.xuggle.mediatool.MediaListenerAdapter;
      import com.xuggle.mediatool.ToolFactory;
      import com.xuggle.mediatool.event.IVideoPictureEvent;
      import com.xuggle.xuggler.Global;

      public class VideoThumbnailsExample {
          
          public static final double SECONDS_BETWEEN_FRAMES = 1;

          private static final String inputFilename = "D:\\netbeansproject\\Speech_Music.mp4";
          private static final String outputFilePrefix = "D:\\netbeansproject\\images\\";
          private static int outputFileIndex=1;
          // The video stream index, used to ensure we display frames from one and
          // only one video stream from the media container.
          private static int mVideoStreamIndex = -1;
          
          // Time of last frame write
          private static long mLastPtsWrite = Global.NO_PTS;
          
          public static final long MICRO_SECONDS_BETWEEN_FRAMES =
              (long)(Global.DEFAULT_PTS_PER_SECOND * SECONDS_BETWEEN_FRAMES);

          public static void main(String[] args) {

              IMediaReader mediaReader = ToolFactory.makeReader(inputFilename);

              // stipulate that we want BufferedImages created in BGR 24bit color space
              mediaReader.setBufferedImageTypeToGenerate(BufferedImage.TYPE_3BYTE_BGR);
              
              mediaReader.addListener(new ImageSnapListener());

              // read out the contents of the media file and
              // dispatch events to the attached listener
              while (mediaReader.readPacket() == null) ;

          }

          private static class ImageSnapListener extends MediaListenerAdapter {

              public void onVideoPicture(IVideoPictureEvent event) {

                  if (event.getStreamIndex() != mVideoStreamIndex) {
                      // if the selected video stream id is not yet set, go ahead an
                      // select this lucky video stream
                      if (mVideoStreamIndex == -1)
                          mVideoStreamIndex = event.getStreamIndex();
                      // no need to show frames from this video stream
                      else
                          return;
                  }

                  // if uninitialized, back date mLastPtsWrite to get the very first frame
                  if (mLastPtsWrite == Global.NO_PTS)
                      mLastPtsWrite = event.getTimeStamp() - MICRO_SECONDS_BETWEEN_FRAMES;

                  // if it's time to write the next frame
                  if (event.getTimeStamp() - mLastPtsWrite >=
                          MICRO_SECONDS_BETWEEN_FRAMES) {
                                      
                      String outputFilename = dumpImageToFile(event.getImage());

                      // indicate file written
                      double seconds = ((double) event.getTimeStamp()) /
                          Global.DEFAULT_PTS_PER_SECOND;
                      System.out.printf(
                              "at elapsed time of %6.3f seconds wrote: %s\n",
                              seconds, outputFilename);

                      // update last write time
                      mLastPtsWrite += MICRO_SECONDS_BETWEEN_FRAMES;
                  }

              }
              
              private String dumpImageToFile(BufferedImage image) {
                  try {
                      String outputFilename = outputFilePrefix +
                           outputFileIndex + ".png";
                      outputFileIndex++;
                      ImageIO.write(image, "png", new File(outputFilename));
                      return outputFilename;
                  }
                  catch (IOException e) {
                      e.printStackTrace();
                      return null;
                  }
              }

          }

      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      no I have not found any

        Attachments

          Activity

            People

            • Assignee:
              fmatte Fairoz Matte
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: