Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown encoder 'libvo_aacenc' #37

Closed
jvvosantos opened this issue Dec 11, 2018 · 7 comments
Closed

Unknown encoder 'libvo_aacenc' #37

jvvosantos opened this issue Dec 11, 2018 · 7 comments
Assignees
Labels
Milestone

Comments

@jvvosantos
Copy link

jvvosantos commented Dec 11, 2018

public static File encodeMp4(File mp4Video, String outputPath) throws IllegalArgumentException, InputFormatException, EncoderException {
		File LQmp4 = new File(outputPath);

		AudioAttributes audioAttr = new AudioAttributes();
		VideoAttributes videoAttr = new VideoAttributes();
		EncodingAttributes encodingAttr = new EncodingAttributes();

		audioAttr.setChannels(new Integer(2));
		audioAttr.setCodec("aac");
		audioAttr.setBitRate(new Integer(128000));
		audioAttr.setSamplingRate(new Integer(44100));
		
		videoAttr.setCodec("libx264");
		videoAttr.setBitRate(new Integer(4000000));
		
		encodingAttr.setAudioAttributes(audioAttr);
		encodingAttr.setVideoAttributes(videoAttr);
		encodingAttr.setFormat("mp4");

		Encoder encoder = new Encoder();
		encoder.encode(new MultimediaObject(mp4Video), LQmp4, encodingAttr);


		return LQmp4;
	}

I'm using this version in my pom.xml

<dependency>
		    <groupId>ws.schild</groupId>
		    <artifactId>jave-core</artifactId>
		    <version>2.4.4</version>
		</dependency>
		
		<dependency>
		    <groupId>ws.schild</groupId>
		    <artifactId>jave-native-linux64</artifactId>
		    <version>2.4.4</version>
		</dependency>

Here's the log:

15:23:17.135 [main] DEBUG ws.schild.jave.ConversionOutputAnalyzer - Input Line (25): <Unknown encoder 'libvo_aacenc'>
15:23:17.135 [main] INFO ws.schild.jave.ConversionOutputAnalyzer - Unhandled message in step: 1 Line: 25 message: <Unknown encoder 'libvo_aacenc'>
15:23:17.135 [main] ERROR ws.schild.jave.Encoder - Process exit code: 1 for in.mp4 to out.mp4
Exception in thread "main" ws.schild.jave.EncoderException: Exit code of ffmpeg encoding run is 1
at ws.schild.jave.Encoder.encode(Encoder.java:563)
at ws.schild.jave.Encoder.encode(Encoder.java:349)
at app.duyuinc.duyurecord.util.MidiaManagement.encodeMp4(MidiaManagement.java:55)
at app.duyuinc.duyurecord.DuyurecordApplication.main(DuyurecordApplication.java:22)

@a-schild a-schild self-assigned this Dec 12, 2018
@a-schild a-schild added the bug label Dec 12, 2018
@a-schild a-schild added this to the 2.4.5 milestone Dec 12, 2018
a-schild added a commit that referenced this issue Dec 12, 2018
Added video and audio quality flags for conversion (see VideoAttributes.quality and AudioAttributes.quality) (Issue #31)
Changed aac de/encoder from libvo_aacenc to default aac settings from ffmpeg (Issue #37)
@a-schild
Copy link
Owner

@jvvosantos Can you please try with the 2.4.5-SNAPSHOT release?
If it's OK I will release the 2.4.5 version

@jvvosantos
Copy link
Author

@a-schild How can I use the 2.4.5-SNAPSHOT? Should I clone your github and compile it?

@a-schild
Copy link
Owner

Just change the version to 2.4.5-SNAPSHOT in your pom.xml file and do a clean build, the snapshots are published on maven central

@jvvosantos
Copy link
Author

I put the dependencies like this

		<dependency>
		    <groupId>ws.schild</groupId>
		    <artifactId>jave-core</artifactId>
		    <version>2.4.5-SNAPSHOT</version>
		</dependency>
		
		<dependency>
		    <groupId>ws.schild</groupId>
		    <artifactId>jave-native-linux64</artifactId>
		    <version>2.4.5-SNAPSHOT</version>
		</dependency>

It says Missing artifact ws.schild:jave-core:jar:2.4.5-SNAPSHOT, I tried the mvn clean install and it did not work, also in https://mvnrepository.com/artifact/ws.schild/jave-all-deps your last version is 2.4.4

@a-schild
Copy link
Owner

Put this in your ~/.m2/settings.xml

<profiles>
  <profile>
     <id>allow-snapshots</id>
        <activation><activeByDefault>true</activeByDefault></activation>
     <repositories>
       <repository>
         <id>snapshots-repo</id>
         <url>https://oss.sonatype.org/content/repositories/snapshots</url>
         <releases><enabled>false</enabled></releases>
         <snapshots><enabled>true</enabled></snapshots>
       </repository>
     </repositories>
   </profile>
</profiles>

@jvvosantos
Copy link
Author

sorry for the delay. it worked fine on 2.4.5-SNAPSHOT, thanks

@a-schild
Copy link
Owner

a-schild commented Dec 13, 2018

2.4.5 is now published (Might take a few hours to sync)
Thanks for reporting and testing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants