Log in

View Full Version : FFmpeg/Mplayer supports E-AC-3 format now...


Pages : [1] 2 3 4 5 6 7

Kurtnoise
19th August 2007, 10:28
Since revision 15103, FFmpeg supports entirely E-AC-3 format.

To play your evo files with mplayer >>

Use this command line :
mplayer -demuxer lavf -fps 30000/1001 -ac ffeac3 input.evo

and don't forget to tweak the codecs.conf file. Just add this :
audiocodec ffeac3
info "FFmpeg EAC3"
status buggy
format 0x0
driver ffmpeg
dll "E-AC3"

fps value can be tuned according to your video stream. (either 29.970 or 30000/1001, 23.976, 24000/1001, etc...)

To transcode your audio streams with FFmpeg >>
E-AC3 to AC3 @384 kbps (Stereo with the native AC3 encoder):
ffmpeg -i input.evo -vn -acodec ac3 -ab 384k -ac 2 -y output.ac3
E-AC3 to AC3 @448 kbps (5.1 with the native AC3 encoder):
ffmpeg -i input.evo -vn -acodec ac3 -ab 448k -ac 6 -y output.ac3
E-AC3 to AC3 @384 kbps (Stereo with Aften):
ffmpeg -i input.evo -vn -acodec pcm_s16le -ac 2 -f wav - | aften -b 384 - output.ac3
E-AC3 to AC3 @448 kbps (5.1 with Aften):
ffmpeg -i input.evo -vn -acodec pcm_s16le -ac 6 -f wav - | aften -b 448 -chmap 1 - output.ac3
E-AC3 to LC-AAC @192 kbps (Stereo with FAAC Encoder):
ffmpeg -i input.evo -vn -acodec libfaac -ac 2 -ab 192k -y output.aac
E-AC3 to LC-AAC @256 kbps (Multichannel with FAAC Encoder):
ffmpeg -i input.evo -vn -acodec libfaac -ac 6 -ab 256k -y output.aac
E-AC3 to HE-AAC @256 kbps (Multichannel with enc_aacplus encoder):
ffmpeg -i input.evo -vn -acodec pcm_s16le -ac 6 -f wav - | enc_aacPlus - output.aac --cbr 256000
E-AC3 to HE-AAC @Q 0.20 (Stereo with Nero Digital Encoder):
ffmpeg -i input.evo -vn -acodec pcm_s16le -ac 2 -f wav - | neroAacEnc -ignorelength -q 0.20 -if - -of output.m4a
E-AC3 to HE-AAC v2 @Q 0.20 (Stereo with Nero Digital Encoder):
ffmpeg -i input.evo -vn -acodec pcm_s16le -ac 2 -f wav - | neroAacEnc -ignorelength -q 0.20 -hev2 -if - -of output.m4a
E-AC3 to HE-AAC @128 kbps (Multichannel with Nero Digital Encoder):
ffmpeg -i input.evo -vn -acodec pcm_s16le -ac 6 -f wav - | neroAacEnc -ignorelength -br 128000 -if - -of output.m4a
E-AC3 to Ogg Vorbis @Q50 (Stereo with libvorbis):
ffmpeg -i input.evo -vn -acodec vorbis -ac 2 -aq 50 -y output.ogg
E-AC3 to MP3 @128 kbps (Stereo with LAME encoder):
ffmpeg -i input.evo -vn -acodec libmp3lame -ac 2 -ab 128k -y output.mp3


/!\ If your input files contain multiple audio streams, you need to add -map 0:x (where x is the stream desired)

fbd
20th August 2007, 15:41
I just compiled and uploaded (http://kurtnoise.free.fr/index.php?dir=misc/) FFmpeg and Mplayer to play with the E-AC3 decoder from the GSoC. Feel free to test it. Keep in mind that it's not fully completed yet. So, If you want to to help developpers, please submit samples and several explanations.

Thanks Kurtnoise.
Could you compile the same files with --enable-libfaac in the ./configure please? :thanks:

Kurtnoise
20th August 2007, 17:45
done...;)

fbd
21st August 2007, 08:22
Thanks kurtnoise but there is a error message : "zlib1.dll est introuvable"....

Kurtnoise
21st August 2007, 12:14
mmh...static vs shared lib.

Should be ok now. :)



Slight OT : in my last build, there is also the matroska muxer included.

fbd
22nd August 2007, 08:37
Thanks kurtnoise, it's ok with the new build:)

Ayla
22nd August 2007, 17:16
Hi

I have been waiting forever to try out E-AC3 with MPlayer, thanks a lot! :)

What do I have to do to try the E-AC3 patch on my Intel Mac?

I usually compile the source snapshot from the MPlayer homepage, but it's not included there yet, is it?

Hope you can help
/Martin

Kurtnoise
22nd August 2007, 17:35
Nope, it's not included yet in the trunk...you have to use the files from the GSoC subversion directory.

What do I have to do to try the E-AC3 patch on my Intel Mac?
svn co svn://svn.mplayerhq.hu/soc/eac3 eac3_ff
svn co svn://svn.mplayerhq.hu/mplayer/trunk mplayer
Copy ffmpeg.patch from eac3_ff folder to your mplayer folder
patch -p0 < ffmpeg.patch
Copy the others files from eac3_ff folder to mplayer/libavcodec/ folder
./configure && make && make install

Ayla
22nd August 2007, 18:34
Thanks a lot for helping out!

I'm a bit of a newbie and haven't used "svn" before.

I followed the link: http://svn.mplayerhq.hu/soc/eac3 - But I can't see a file called "eac3_ff"?

Could you maybe explain it more step by step for a beginner like me? :)


I know how to compile mplayer on my mac, I just need to know how to get the files and what to do with them first.

Thanks again..
Martin

Ayla
22nd August 2007, 18:43
Update 2:

I think I got the files downloaded, but when I run the ./patch command you wrote I get this error:

iMac:~/mplayer martin$ ./patch -p0 < ffmpeg.patch
-bash: ./patch: No such file or directory

Any idea what I do wrong?



Update:

I installed SVN on my mac but when running the line you wrote: svn co http://svn.mplayerhq.hu/soc/eac3 eac3_ff


I get this error:

iMac:~ martin$ /usr/local/bin/svn co http://svn.mplayerhq.hu/soc/eac3/ eac3_ff
svn: PROPFIND request failed on '/soc/eac3'
svn: PROPFIND of '/soc/eac3': 301 Moved Permanently (http://svn.mplayerhq.hu)

Kurtnoise
22nd August 2007, 19:18
my fault...use this command line instead : svn co svn://svn.mplayerhq.hu/soc/eac3 xxxx

where xxxx is your name folder to store these files. I called it eac3_ff in the how-to but you can specify what you want.

iMac:~/mplayer martin$ ./patch -p0 < ffmpeg.patch
-bash: ./patch: No such file or directory

Any idea what I do wrong?
remove the ./

Ayla
22nd August 2007, 19:24
my fault...use this command line instead : svn co svn://svn.mplayerhq.hu/soc/eac3 xxxx

where xxxx is your name folder to store these files. I called it eac3_ff in the how-to but you can specify what you want.


remove the ./

when running the patch the command i get this:

iMac:~/mplayer-export-2007-08-22 martin$ patch -p0 < ffmpeg.patch
patching file libavcodec/ac3_parser.c
patching file libavcodec/Makefile
patching file libavcodec/aac_ac3_parser.c
patching file libavcodec/aac_ac3_parser.h
patching file libavcodec/aac_parser.c
patching file libavcodec/allcodecs.c
patching file libavcodec/avcodec.h
Hunk #2 FAILED at 2781.
1 out of 2 hunks FAILED -- saving rejects to file libavcodec/avcodec.h.rej
patching file libavcodec/allcodecs.h
patching file libavcodec/ac3enc.c
can't find file to patch at input line 175
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: ffmpeg.c
|===================================================================
|--- ffmpeg.c (wersja 10118)
|+++ ffmpeg.c (kopia robocza)
--------------------------
File to patch:



Can you help me once again? :)

Kurtnoise
22nd August 2007, 19:30
yeah...;) it's because the FFmpeg maintainers have changed something in the trunk. That's why you have this.

Wait a minute...I'm creating a new patch.

Ayla
22nd August 2007, 19:38
great :)

Let me know what to do when you're ready!

And what to download?

Kurtnoise
22nd August 2007, 20:08
http://kurtnoise.free.fr/index.php?dir=misc/&file=mplayer_eac3.patch

First remove your mplayer folder, then :

1/ Grab the last mplayer from the subversion trunk : svn co svn://svn.mplayerhq.hu/mplayer/trunk mplayer
2/ cd mplayer and put mplayer_eac3.patch in the libavcodec directory.
3/ Apply the patch : patch -p0 < mplayer_eac3.patch

Should be ok...

Ayla
22nd August 2007, 20:26
http://kurtnoise.free.fr/index.php?dir=misc/&file=mplayer_eac3.patch

First remove your mplayer folder, then :

1/ Grab the last mplayer from the subversion trunk : svn co svn://svn.mplayerhq.hu/mplayer/trunk mplayer
2/ cd mplayer
3/ Apply the patch : patch -p0 < mplayer_eac3.patch

Should be ok...

It tells me this when I run the patch command now:

iMac:~ martin$ cd mplayer/
iMac:~/mplayer martin$ patch -p0 < mplayer_eac3.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: aac_ac3_parser.c
|===================================================================
|--- aac_ac3_parser.c (revision 10186)
|+++ aac_ac3_parser.c (working copy)
--------------------------
File to patch:



Not right?


If I run ./configure and make afterwards I get this compile error:

ac3enc.c: In function 'bit_alloc':
ac3enc.c:482: error: too few arguments to function 'ff_ac3_bit_alloc_calc_bap'
make[1]: *** [ac3enc.o] Error 1
make: *** [libavcodec/libavcodec.a] Error 2
iMac:~/mplayer martin$

DJN8B
22nd August 2007, 23:26
Hi Kurtnoise13,

When I try to execute your compiled mplayer I get an error saying "libfontconfig-1.dll not found. Any ideas?

Apologies for the simple question.

Kurtnoise
23rd August 2007, 07:41
@ayla : where did you put mplayer_eac3.patch file ? in which folder ?

@DJN8B: yeah, sorry...last time I compiled mplayer with shared libs. That's why you have this notice. Try googling to find this dll (GTK+ runtime or something). Or you can wait in a few hours when I'm back home. I'll recompile it with static libs.

edit: ok...new build is up now.

Ayla
23rd August 2007, 18:19
@ayla : where did you put mplayer_eac3.patch file ? in which folder ?


I put the patch in the mplayer folder (the trunk folder that is created when I download with svn).

Isn't that correct?

Could you tell me once again what to do step by step, I don't know what's wrong?

Do you have to copy all the files from the eac3 folder downloaded with SVN and do you have to copy them before you patch or after?

The files I have are:

ac3.c
ac3.h
ac3dec.c
ac3dec.h
ac3tab.c
ac3tab.h
checkout.sh
eac3.h
eac3dec.c
mplayer_eac3.patch


PS. Do you have MSN Kurtnoise13? Thanks

Kurtnoise
24th August 2007, 09:03
Just (re)read again my post #15...

Anyway, you don't have to copy any files just apply the patch. That should be ok. Otherwise I don't know why...

Ayla
24th August 2007, 10:19
Just (re)read again my post #15...

Anyway, you don't have to copy any files just apply the patch. That should be ok. Otherwise I don't know why...

Thanks for the reply.

If I put the patch in the mplayer folder it only patches 2 files.

If I put the patch in the /libavcodec folder it patches all the files.

Should I put it in the /libavcodec folder then?


PS. Just to be clear :) - After patching I should be able to play .EVO files from ripped HD DVD's with DD+ audio tracks, right?

Kurtnoise
24th August 2007, 10:38
Should I put it in the /libavcodec folder ?
yes...

PS. Just to be clear :) - After patching I should be able to play .EVO files from ripped HD DVD's with DD+ audio tracks, right?
yeah, in theory. The patch for E-AC3 is not yet complete. So, don't expect too much for now...

Ayla
24th August 2007, 10:55
yes...


yeah, in theory. The patch for E-AC3 is not yet complete. So, don't expect too much for now...

Ok, it compiles just fine now! At last :)

I have a lot of HD DVD .EVO's.

All of them give me this error in the mplayer console log when I play them:

==========================================================================
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
ADecoder init failed :(
Opening audio decoder: [hwac3] AC3/DTS pass-through S/PDIF
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
ADecoder init failed :(
Read DOCS/HTML/en/codecs.html!
Audio: no sound
Starting playback...

---------

And this error in the MplayerOSXlog:

Too many video packets in the buffer: (4096 in 8269604 bytes).
A52 sync failed
ADecoder init failed :(
Requested audio codec family [ac3] (afm=libac3) not available.
Enable it at compilation.
No accelerated IMDCT transform found

Too many video packets in the buffer: (4096 in 8269604 bytes).
AC3/DTS sync failed
ADecoder init failed :(
Cannot find codec for audio format 0x2000.

Kurtnoise
24th August 2007, 12:25
Did you enable liba52 during compilation ? if yes, try to disable it...

As I said, don't expect to much for now but you can try this :

mplayer -demuxer -lavf -ac ffeac3 input.evo

by editing codecs.conf file with that :

audiocodec ffeac3
info "FFmpeg EAC3"
status buggy
format 0x0
driver ffmpeg
dll "E-AC3"

Ayla
24th August 2007, 13:20
Did you enable liba52 during compilation ? if yes, try to disable it...

As I said, don't expect to much for now but you can try this :

mplayer -demuxer -lavf -ac ffeac3 input.evo

by editing codecs.conf file with that :

audiocodec ffeac3
info "FFmpeg EAC3"
status buggy
format 0x0
driver ffmpeg
dll "E-AC3"


Thanks I'll try it!

Should I edit /mplayer/etc/codecs.conf and then compile again?

Ayla
24th August 2007, 13:42
I have edited the codecs.conf file and added the code you wrote.

I then recompiled and play the files with the commandline you wrote.

It now says:

==========================================================================
==========================================================================
Forced audio codec: ffeac3
Read DOCS/HTML/en/codecs.html!
Audio: no sound
Starting playback...


Guess I'm unlucky or not skilled enough to get it to work :)

Ayla
25th August 2007, 16:13
I spoke to the developer and everything is working fine now :)

Alosaur
25th August 2007, 16:50
I spoke to the developer and everything is working fine now :)

What did you do to get it fixed? I'm getting that no sound issue too.

DJN8B
26th August 2007, 06:08
@kurtnoise13, is your page down? when I try to go there I get the message:

"Error in count_file on line 588.
./Aften/AftenGUI-1.4.zip is already defined."

Cheers!

Kurtnoise
26th August 2007, 10:06
@DJN8B: should be fine now...

@Alosaur: update your build and to be able to play such files try this:

mplayer -demuxer lavf -ac ffeac3 input.evo

Alosaur
26th August 2007, 10:20
@Alosaur: update your build and to be able to play such files try this:

Has there been some major change since I made the build from the latest SVN 18 hours ago?


mplayer -demuxer lavf -ac ffeac3 input.evo

I had already tried that but it just gave the no sound issue. That's why I was curious as to what Ayla did to fix things.

Kurtnoise
26th August 2007, 10:42
Has there been some major change since I made the build from the latest SVN 18 hours ago?
if you speak about eac3 svn entry, I'd say yes...

Are you running on MacOS too ?

Alosaur
26th August 2007, 10:46
if you speak about eac3 svn entry, I'd say yes...

Okay.

Are you running on MacOS too ?

No, Ubuntu but I was getting the same issue as Alya and tried everything you had suggested to them.

Alosaur
26th August 2007, 10:53
BTW Kurtnoise would you be able to create a new patch for mplayer like you did a few days ago? I noticed you had taken that one down just recently.

Alosaur
26th August 2007, 11:13
@Alosaur: update your build and to be able to play such files try this:

mplayer -demuxer lavf -ac ffeac3 input.evo

Okay just did a brand new build with the latest SVN of both and I get the same error as before:

Forced audio codec: ffeac3
Cannot find codec for audio format 0x0.
Read DOCS/HTML/en/codecs.html!
Audio: no sound
Starting playback...

Rockas
26th August 2007, 12:30
hmmm... am I the only one that can't access the site to download? :)

Alosaur
26th August 2007, 12:36
hmmm... am I the only one that can't access the site to download? :)

Seems to have gone down again. It was working when I posted last.

Kurtnoise
26th August 2007, 12:56
BTW Kurtnoise would you be able to create a new patch for mplayer like you did a few days ago? I noticed you had taken that one down just recently.
http://kurtnoise.free.fr/misc/m_eac3.patch

edit: when you configure mplayer for the compilation, don't forget to disable liba52...It's enable by default.


am I the only one that can't access the site to download?
If the problem is still there, use the old entry: http://kurtnoise.free.fr/misc/

Kurtnoise
26th August 2007, 13:11
This is what I get when I play an evo sample :
http://img209.imageshack.us/img209/8479/mplayereac3260820071407vp4.th.png (http://img209.imageshack.us/my.php?image=mplayereac3260820071407vp4.png)

Both A/V are read...:)

Alosaur
26th August 2007, 13:15
Well recompiled with that new patch you made and made sure to disable liba52 but it still reports the same thing where it says no sound. I'm stumped. :confused:

Alosaur
26th August 2007, 13:20
Here's the commandline when I try to play an EVO:

http://img251.imageshack.us/img251/4497/thingsy3.png

Ayla
26th August 2007, 13:38
I wrote this guide on another site.

This is for Mac:

I will post the link here, as Mplayer is opensource. If anyone objects, contact me and I will immediately remove the link.

-------------------
Guide:

1. Download the .zip file from the link and unpack it.
http://www.mediafire.com/?6gd2rxgxz1z

2. Place MPlayer OSX.app in Applications.

3. Start MPlayer and go to Preferences.

4. Under "Miscellaneous" mark "Additional parameters" and put in:

(This depends on what you want to do and which movie you are watching!)

-v -demuxer lavf -ac ffeac3 -fps 24000/1001 -aid x


Explanation:

-v: Verbose mode. You use this to see which Audio tracks are available for Mplayer. After playing an .EVO file. Close the player window and choose "Window", "Show Log".

Somewhere in your log you will see something similar to "found audio stream: 2" for example. This is the Audio PID. You use this later (There will be multiple Audio PID's for each movie!).

-demuxer lavf: Is the demuxer you need to use.

-ac ffeac3: Forces the E-AC3 Audio codec.

-fps 24000/1001: Forces 24fps playback (you can play around with this).

-aid x: This is the Audio track (which you found earlier) that you want to use. Where x is the number from the Mplayer Log.
-------------------

Example:

For the HD DVD "300", I use this line: -v -demuxer lavf -ac ffeac3 -fps 24000/1001 -aid 6

Audio track 6 is the English Dolby Digital+ Audio track on "300".


PS. On my system I experience a little out of sync audio/video. To correct this you can play around with the parameter: -autosync 30

"30" can of course be another number.

If you figure out how to get perfect sync please let me know in this thread!

Have fun
Martin

Alosaur
26th August 2007, 13:59
Okay I got it working finally. Apparently mplayer wasn't reading the correct codecs.conf and that was causing it to not be able to play the audio. Now that I've gotten it to play audio I am getting the same desync you are Ayla.

On a secondary note, with the eac3 support I wonder if it would be advisable to use ffmpeg now with the compiled eac3 support to conver the files to wav or if it's still a bit too early to try doing that.

Alosaur
26th August 2007, 14:12
Actually never mind the desync I got was from not setting the -fps switch. Everything is playing flawlessly now. Now just can't wait for someone to get us some support for DD True HD and DTS HD in ffmpeg. :p

Ayla
26th August 2007, 19:14
Actually never mind the desync I got was from not setting the -fps switch. Everything is playing flawlessly now. Now just can't wait for someone to get us some support for DD True HD and DTS HD in ffmpeg. :p

Glad you got it working! :)

With the -fps setting I'm still experiencing a little bit of sync problems (for example on 300).

Are you experiencing perfect sync on all your .EVO's?

Alosaur
26th August 2007, 20:36
Glad you got it working! :)

With the -fps setting I'm still experiencing a little bit of sync problems (for example on 300).

Are you experiencing perfect sync on all your .EVO's?

On everything I've tested so far, yes. I've played tested Full Metal Jacket, The Matrix, Shaun of the Dead and Hot Fuzz so far. Though I don't think those are as high bitrate as 300 so maybe it's an issue with the bitrate peaks being an issue for you on playback.

Kurtnoise
26th August 2007, 20:54
@all : I've added some command lines examples in my 1st post to transcode an audio stream directly from (or with the help from) FFmpeg. Feel free to test it...Not sure that multichannel outputs have the correct mapping though.

Ayla
26th August 2007, 21:41
@all : I've added some command lines examples in my 1st post to transcode an audio stream directly from (or with the help from) FFmpeg. Feel free to test it...Not sure that multichannel outputs have the correct mapping though.

Thanks Kurtnoise13!

When I play an .EVO now, my receiver doesn't detect the Audio as a Dolby Digital stream (it detects PCM). And it doesn't seem like I have surround.

Is this normal?

Will the transcoding to, for example Dolby Digital 5.1, fix that?

And does the transcoding work in real-time?

hdnut
27th August 2007, 00:45
kurtnoise13, great job - i downloaded your mplayer binary and with some help from this thread got .evo's playing with sound.

Quick question as this is my first time using mplayer on windows: I get alot of tearing in the video (though cpu usage seems ok @ ~40%), is there a more efficient -vo device that is not compiled in your binary?

It could be the integrated graphics (Intel G965) that can't keep up, but directx players seem to do fine with the bluray & hd-dvd titles I can play.

I will try to patch & compile on linux when I get my box up and running (xv should be no problem), but I am just curious if it is worth trying to recompile fro windows.

Thanks in advance.

DJN8B
27th August 2007, 07:04
kurtnoise13,

I've finally had some luck with your complied mplayer under WinXP (audio from 2CH inbuilt laptop speakers):

using the following commands:

mplayer -demuxer lavf -ac ffeac3 -fps 24000/1001 -aid 4 /location/file.evo

I could not see detect a difference between 24000/1001 and 24000/1000, Ayla? Also, sound seems nearly, but not quite, in sync.

Finally, can anyone get "-vf cropdetect" to work? I'd like to see the actual size of the video (since they are all encoded as 1920x1080p with black bars accordingly). Knowing the exact size I can "-vf crop" as needed.

Still hoping to get Ayla's OS X version working but no luck yet...