Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.
3075 Discussions

INDE Media - Video Capturing for Unity3d* Applications on Android

Oliver_E_
Beginner
1,234 Views

Moving it to the Media forum as it is more appropriate here.

Thanks,

Karthi

Hi,

I use this Tutorial to to add video capturing capability to Unity applications on Android.:

https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials-video-capturing-for-unity3d-applications

And have this output after building the jar-file on Mac OS X:

Buildfile: /Users/user/Documents/app/Assets/Plugins/Android/build.xml

message:

     [echo] Android Ant Build for Unity Android Plugin

     [echo]    message:      Displays this message.

     [echo]    clean:     Removes output files created by other targets.

     [echo]    compile:   Compiles project's .java files into .class files.

     [echo]    build-jar: Compiles project's .class files into .jar file.

 

-dirs:

     [echo] Creating output directory: Users/user/Documents/app/Assets/Plugins/Android/classes 

    [mkdir] Created dir: /Users/user/Documents/app/Assets/Plugins/Android/Users/user/Documents/app/Assets/Plugins/Android/classes

 

compile:

build-jar:
[zip] Warning: skipping zip archive /Users/user/Documents/app/Assets/Plugins/Android/Capturing.jar because no files were included.

clean-post-jar:
[echo] Removing post-build-jar-clean
[delete] Deleting directory /Users/user/Documents/app/Assets/Plugins/Android/Users/user/Documents/app/Assets/Plugins/Android/classes
 

BUILD SUCCESSFUL
Total time: 0 seconds

I use this directories:

    <!-- Change this in order to match your configuration -->
    <property name="sdk.dir" value="Users/user/NVPACK/android-sdk-macosx/SDK"/>
    <property name="target" value="android-18"/>
    <property name="unity.androidplayer.jarfile" value="Applications/Unity/Unity.app/Contents/PlaybackEngines/AndroidPlayer/development/bin/classes.jar"/>
    <!-- Source directory -->
    <property name="source.dir" value="Users/user/Documents/app/Assets/Plugins/Android" />
    <!-- Output directory for .class files-->
    <property name="output.dir" value="Users/user/Documents/app/Assets/Plugins/Android/classes"/>
 

Where is the problem?

Thanks,
Oli

0 Kudos
8 Replies
Alexey_S_Intel1
Employee
1,234 Views

Hi Oli,

We will check the video capturing tutorial building on Mac OS X and get back with further information.

Thanks, Alexey

0 Kudos
Oliver_E_
Beginner
1,234 Views

Hi Alexey,

Thank you!

The question is why have I this output directory "/Users/user/Documents/app/Assets/Plugins/Android/Users/user/Documents/app/Assets/Plugins/Android/classes"
and not only this?

"Users/user/Documents/app/Assets/Plugins/Android/classes"

This is the issue:
[zip] Warning: skipping zip archive /Users/user/Documents/app/Assets/Plugins/Android/Capturing.jar because no files were included.

Best regards,
Oli

0 Kudos
Ilya_Aleshkov
Beginner
1,234 Views

Hi Oliver,

I've built jar-file on MacOS X successfully without any issues. Would you please provide your build.xml file? It seems something wrong with it.

Best regards,

Ilya

0 Kudos
Oliver_E_
Beginner
1,234 Views

Hi Ilya,

here is my build.xml: 

<?xml version="1.0" encoding="UTF-8"?>

<project name="UnityCapturing">
    <!-- Change this in order to match your configuration -->
    <property name="sdk.dir" value="Users/user/NVPACK/android-sdk-macosx/SDK"/>
    <property name="target" value="android-18"/>
    <property name="unity.androidplayer.jarfile" value="Applications/Unity/Unity.app/Contents/PlaybackEngines/AndroidPlayer/development/bin/classes.jar"/>
    <!-- Source directory -->
    <property name="source.dir" value="Users/user/Documents/app/Assets/Plugins/Android" />
    <!-- Output directory for .class files-->
    <property name="output.dir" value="Users/user/Documents/app/Assets/Plugins/Android/classes"/>
    <!-- Name of the jar to be created. Please note that the name should match the name of the class and the name
    placed in the AndroidManifest.xml-->
    <property name="output.jarfile" value="Capturing.jar"/>
      <!-- Creates the output directories if they don't exist yet. -->
    <target name="-dirs"  depends="message">
        <echo>Creating output directory: ${output.dir} </echo>
        <mkdir dir="${output.dir}" />
    </target>
   <!-- Compiles this project's .java files into .class files. -->
    <target name="compile" depends="-dirs"
                description="Compiles project's .java files into .class files">
        <javac encoding="ascii" target="1.6" debug="true" destdir="${output.dir}" verbose="${verbose}" includeantruntime="false">
            <src path="${source.dir}" />
            <classpath>
                <pathelement location="${sdk.dir}\platforms\${target}\android.jar"/>
                <pathelement location="${source.dir}\domain-1.2.2415.jar"/>
                <pathelement location="${source.dir}\android-1.2.2415.jar"/>
                <pathelement location="${unity.androidplayer.jarfile}"/>
            </classpath>
        </javac>
    </target>
    <target name="build-jar" depends="compile">
        <zip zipfile="${output.jarfile}"
            basedir="${output.dir}" />
    </target>
    <target name="clean-post-jar">
         <echo>Removing post-build-jar-clean</echo>
         <delete dir="${output.dir}"/>
    </target>
    <target name="clean" description="Removes output files created by other targets.">
        <delete dir="${output.dir}" verbose="${verbose}" />
    </target>
    <target name="message">
     <echo>Android Ant Build for Unity Android Plugin</echo>
        <echo>   message:      Displays this message.</echo>
        <echo>   clean:     Removes output files created by other targets.</echo>
        <echo>   compile:   Compiles project's .java files into .class files.</echo>
        <echo>   build-jar: Compiles project's .class files into .jar file.</echo>
    </target>
</project>

 

0 Kudos
Oliver_E_
Beginner
1,234 Views

I fixed the issue, but now I have this error log on start recording:

11-20 11:36:10.096: I/OMXClient(25821): Using client-side OMX mux.
11-20 11:36:10.101: E/OMX-VENC-720p(188):  Is component secure 0
11-20 11:36:10.193: I/VideoCapabilities(25821): Unsupported profile 4 for video/mp4v-es
11-20 11:36:10.205: I/OMXClient(25821): Using client-side OMX mux.
11-20 11:36:10.209: E/OMXMaster(25821): A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one.
11-20 11:36:10.249: E/OMX-VENC-720p(188): set_parameter: metamode is valid for input port only
11-20 11:36:10.249: E/OMXNodeInstance(188): OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x80001019
11-20 11:36:10.249: I/AudioFlinger(188): AudioFlinger's thread 0xb7886280 ready to run
11-20 11:36:10.250: E/ACodec(25821): [OMX.qcom.video.encoder.avc] storeMetaDataInBuffers (output) failed w/ err -2147483648
11-20 11:36:10.257: W/ACodec(25821): do not know color format 0x7f000789 = 2130708361
11-20 11:36:10.259: E/OMX-VENC-720p(188): WARNING: Unsupported Color format [2130708361]
11-20 11:36:10.259: E/OMX-VENC-720p(188): C2D init is successful
11-20 11:36:10.260: E/OMX-VENC-720p(188): WARNING: Unsupported Color format [2130708361]
11-20 11:36:10.260: E/OMX-VENC-720p(188): WARNING: Requested i/p bufsize[1181520],Driver's updated i/p bufsize = 1183744
11-20 11:36:10.262: E/OMX-VENC-720p(188):  venc_set_intra_period: nPFrames = 30 nBFrames = 0
11-20 11:36:10.262: I/ACodec(25821): setupVideoEncoder succeeded
11-20 11:36:10.263: W/ACodec(25821): do not know color format 0x7f000789 = 2130708361
11-20 11:36:10.277: D/audio_hw_primary(188): select_devices: out_snd_device(0: none) in_snd_device(16: handset-mic)
11-20 11:36:10.277: E/ACDB-LOADER(188): Error: ACDB AudProc vol returned = -8
11-20 11:36:10.277: D/audio_hw_primary(188): enable_snd_device: snd_device(16: handset-mic)
11-20 11:36:10.280: D/audio_hw_primary(188): enable_audio_route: apply and update mixer path: audio-record
11-20 11:36:10.306: E/OMX-VENC-720p(188):  Allocated virt:0xb36b4000, FD: 59 of size 1302528 at index: 0
11-20 11:36:10.307: E/OMX-VENC-720p(188):  Allocated virt:0xb3576000, FD: 61 of size 1302528 at index: 1
11-20 11:36:10.329: E/OMX-VENC-720p(188):  open Color conv for RGBA888
11-20 11:36:10.379: I/AMP(25821): New frame allocated for buffer 0
11-20 11:36:10.387: I/MPEG4Writer(25821): limits: 4294967295/0 bytes/us, bit rate: -1 bps and the estimated moov size 3072 bytes
11-20 11:36:10.392: I/AMP(25821): New frame allocated for buffer 0
11-20 11:36:10.396: I/AMP(25821): New frame allocated for buffer 1
11-20 11:36:10.407: I/MPEG4Writer(25821): setStartTimestampUs: 0
11-20 11:36:10.407: I/MPEG4Writer(25821): Earliest track starting time: 0
11-20 11:36:10.418: I/AMP(25821): New frame allocated for buffer 1
11-20 11:36:10.422: I/MPEG4Writer(25821): setStartTimestampUs: 99008
11-20 11:36:10.430: I/AMP(25821): New frame allocated for buffer 2
11-20 11:36:10.439: I/AMP(25821): New frame allocated for buffer 3

The created video file is not playable..

Nexus 4
Android 5.0

Thanks,
Oli

0 Kudos
Oliver_E_
Beginner
1,234 Views

No solution?

0 Kudos
Ilya_Aleshkov
Beginner
1,234 Views

Hi Oliver,

I've checked it successfully on Nexus 5 with Android L. 

Do you get corrupted output video every time?

Best regards,

Ilya

0 Kudos
Oliver_E_
Beginner
1,234 Views

Hey Ilya,

yes, I get currupted output video every time.

Best regards,

Oli

0 Kudos
Reply