View Full Version : FFmpeg/Mplayer supports E-AC-3 format now...
Kurtnoise
19th August 2007, 11: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, 16: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, 18:45
done...;)
fbd
21st August 2007, 09:22
Thanks kurtnoise but there is a error message : "zlib1.dll est introuvable"....
Kurtnoise
21st August 2007, 13: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, 09:37
Thanks kurtnoise, it's ok with the new build:)
Ayla
22nd August 2007, 18: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, 18: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, 19: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, 19: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, 20: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, 20: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, 20: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, 20:38
great :)
Let me know what to do when you're ready!
And what to download?
Kurtnoise
22nd August 2007, 21: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, 21: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
23rd August 2007, 00: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, 08: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, 19: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, 10: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, 11: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, 11: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, 11: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, 13: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, 14: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, 14: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, 17:13
I spoke to the developer and everything is working fine now :)
Alosaur
25th August 2007, 17: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, 07: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, 11: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, 11: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, 11: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, 11: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, 11: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, 12: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, 13:30
hmmm... am I the only one that can't access the site to download? :)
Alosaur
26th August 2007, 13: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, 13: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, 14: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, 14: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, 14:20
Here's the commandline when I try to play an EVO:
http://img251.imageshack.us/img251/4497/thingsy3.png
Ayla
26th August 2007, 14: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, 14: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, 15: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, 20: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, 21: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, 21: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, 22: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, 01: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, 08: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...
Kurtnoise
27th August 2007, 08:17
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?
Well, actually I don't know but are you sure that your receiver is able to detect E-AC3 streams ? (not only AC3)
Will the transcoding to, for example Dolby Digital 5.1, fix that?
And does the transcoding work in real-time?
You mean playing and transcoding as the same time ? I'm not sure but mplayer should be able to do that I think. But I might be wrong...
Kurtnoise
27th August 2007, 08:21
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?
Dunno...I don't have tearing myself with the samples that I tested. Maybe it's due to your processor (less powerfull than needed).
and btw, I don't have so much experience with the different video devices available for this player. So, I can't help too much here. Maybe somebody else...
tebasuna51
28th August 2007, 01:14
Channelmapping analysis:
1) The uncompressed output using:
ffmpeg -i input.evo -vn -acodec pcm_s16le -ac 6 -f wav out.wav
have a wrong channelmapping order (FL-FC-FR-BL-BR-LF)
2) The ac3 output with internal encoder using:
ffmpeg -i input.evo -vn -acodec ac3 -ab 448k -ac 6 -y oint.ac3
have a correct channel mapping. And using Aften with:
ffmpeg -i input.evo -vn -acodec pcm_s16le -ac 6 -f wav - | aften -b 448 -chmap 1 - oaf1.ac3
have also correct channelmapping.
3) The aac output with internal faac encoder:
ffmpeg -i input.evo -vn -acodec libfaac -ac 6 -ab 256k -y oint.aac
have a wrong channel mapping (FC-FL-FR-LF-BL-BR).
With a external encoder like enc_aacplus:
ffmpeg -i input.evo -vn -acodec pcm_s16le -ac 6 -f wav - | enc_aacPlus - oct.aac --cbr 256000
like expected the result is like uncompressed (FL-FC-FR-BL-BR-LF).
With NeroAacEnc don't work because know problem (http://forum.doom9.org/showthread.php?p=1028932#post1028932).
Rockas
28th August 2007, 01:15
@kurtnoise13
thank you... i finally managed to to download it :-)
I will start testing it for my next DAudioK release... thank you so much for your work... as far as I have seen, it looks (sounds) great.
I will feedback my results.
KpeX
28th August 2007, 03:05
when you configure mplayer for the compilation, don't forget to disable liba52...It's enable by default. Works okay here with liba52 enabled (linux x86). Thanks for putting the patch together.
Kurtnoise
28th August 2007, 07:58
@tebasuna : many thanks for your tests as usual...;) If you have some free time, you can play with the channels mapping switch (-af channels=x:y:a:a:b:b:c:c:d:d:e:e). I'll change them as soon as someone will have reported the correct one.
After reading the mailing list, this seems to be the correct order for E-AC3: -af channels=6:6:0:0:1:4:2:1:3:3:4:2:5:5
According to the documentation, we have :
0 = FL
1 = C
2 = RL
3 = Surround left
4 = Surround Right
5 = LFE
@KpeX: great that you're still around there...:) Haven't tested yet on my linux distro but on windows I need to disable it to be able to play those files. So,...
tebasuna51
28th August 2007, 14:23
If you have some free time, you can play with the channels mapping switch (-af channels=x:y:a:a:b:b:c:c:d:d:e:e). I'll change them as soon as someone will have reported the correct one.
Sorry, but mplayer don't work in my system and -af switch don't work with ffmpeg.
After reading the mailing list, this seems to be the correct order for E-AC3: -af channels=6:6:0:0:1:4:2:1:3:3:4:2:5:5
According to the documentation, we have :
0 = FL
1 = C
2 = FR
3 = Surround left
4 = Surround Right
5 = LFE
This order is the ac3 internal order, the standar uncompressed order is:
0 = FL
1 = FR
2 = C
3 = LFE
4 = Surround left
5 = Surround Right
-If the E-AC3 order is the same than AC3 the needed remap is:
-af channels=6:6:0:0:1:2:2:1:3:4:4:5:5:3
-If you need the mentioned remap:
-af channels=6:6:0:0:1:4:2:1:3:3:4:2:5:5
to obtain the AC3 order, implies the original order is:
0 = FL
1 = Surround Right
2 = C
3 = Surround left
4 = FR
5 = LFE
really strange, and to obtain the uncompresed order for WAV or external encoders we need:
-af channels=6:6:0:0:1:5:2:2:3:4:4:1:5:3
Alosaur
28th August 2007, 17:50
What would the remap be to convert the eac3 to wav for encoding to flac?
tebasuna51
28th August 2007, 20:22
What would the remap be to convert the eac3 to wav for encoding to flac?
Flac, like Aften, NeroAacEnc, Enc_AacPlus, ... need the standard wav order:
0 = FL
1 = FR
2 = C
3 = LFE
4 = Surround left
5 = Surround Right
and the actual output from ffmpeg is:
0 = FL
1 = C
2 = FR
3 = Surround left
4 = Surround Right
5 = LFE
If the parameter -af can be applied to ffmpeg:
-af channels=6:6:0:0:1:2:2:1:3:4:4:5:5:3
Jjeje007
28th August 2007, 23:54
Hi,
For the gentoo users :
I just tweak a bit the patch and add it in in this ebuild which come from the berkano overlay (cf http://forums.gentoo.org/viewtopic-t-508174-highlight-berkano.html )
I tested it, and it compil fine (x86). Just need an sample to test if the decoder is really working :rolleyes:
Any way, gentoo user, decompress the tarball in, for exemple :
/usr/local/portage/
Add this :
PORTDIR_OVERLAY="/usr/local/portage/mplayer"
In your :
/etc/make.conf
And :
emerge mplayer
Have fun
Note : You have to edit /usr/share/mplayer/codecs.conf as well
Jjeje007
Edit :
mplayer -ac help | grep ffeac3
ffeac3 ffmpeg problems FFmpeg EAC3 [E-AC3]
Edit² :
Oups, I forgot the link :p
http://www.db-instable.org/misc/mplayer_eac3_ebuild.tar.gz
tebasuna51
29th August 2007, 17:33
I am lose in ffmpeg world.
Sometimes I reported bugs or request without any answer.
But there are some bugs really basics that I can't understand how remain without solution:
- The multichannel output is wrong mapped.
- The uncompressed STDOUT have two fields empty (RiffLength and DataLength)
Is there any way to make a eac3 decoder out of the buggy ffmpeg?
A standalone decoder, an AviSynth plugin, a foobar component, ...?
Kurtnoise
29th August 2007, 17:49
Is there any way to make a eac3 decoder out of the buggy ffmpeg?
A standalone decoder, an AviSynth plugin, a foobar component, ...?
That would be great indeed. Maybe backport the stuff from the GSoC and use liba52 as a model ?
sl1pkn07
30th August 2007, 21:29
works!!!! thanks man!!
tebasuna51
31st August 2007, 03:26
That would be great indeed. Maybe backport the stuff from the GSoC and use liba52 as a model ?
Where is the sourcecode if is public?
Kurtnoise
31st August 2007, 08:14
http://liba52.sourceforge.net/
http://svn.mplayerhq.hu/soc/eac3/
lineman
31st August 2007, 19:43
Is there a way to have FFmpeg create a windows wave file containing six audio tracks?
tebasuna51
31st August 2007, 20:26
Is there a way to have FFmpeg create a windows wave file containing six audio tracks?
Of course, I say:
1) The uncompressed output using:
ffmpeg -i input.evo -vn -acodec pcm_s16le -ac 6 -f wav out.wav
have a wrong channelmapping order (FL-FC-FR-BL-BR-LF)
Now you can use different solutions depending of your desired final output format.
nickolasemp
1st September 2007, 18:55
I can hear the sound so I am really happy... Thanks very much.
Merci beaucoup.
:-D
lineman
1st September 2007, 20:27
Of course, I say:
1) The uncompressed output using:
ffmpeg -i input.evo -vn -acodec pcm_s16le -ac 6 -f wav out.wav
have a wrong channelmapping order (FL-FC-FR-BL-BR-LF)
Now you can use different solutions depending of your desired final output format.
Thanks a million for the help..
BENtheTEN
9th September 2007, 14:34
looks like the eac3 code is "finished"
http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/2007-September/001650.html
:thanks:
Mc Onyx
9th September 2007, 15:12
looks like the eac3 code is "finished"
http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/2007-September/001650.html
:thanks:
AWESOME, hope to see a FFDShow build with it...
tebasuna51
10th September 2007, 02:04
looks like the eac3 code is "finished"
http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/2007-September/001650.html
:thanks:
Of course thanks to developers, but still there are some problems:
1) The "-correct maping channels in multi-channel sound"
is only true when the internal ac3 encoder is used.
The internal faac output, the uncompressed wav format or the direct 'pipe' to flac or aac encoders are wrong mapped.
2) The DialNorm and Dynamic Range Compression are applied always. Must be optional, or at least the default must be don't apply these values: after applied we can't recover the original quality signal.
3) The internal sample format are 32 float but are geld to 16 bit int to be send to ffmpeg, please at least 32 bits int or 24, also supported by ffmpeg.
4) If the channel mapping is corrected and we want send the ffmpeg 'pipe' output to NeroAacEnc maybe is enough correct the libavformat/wav.c:
static int wav_write_header(AVFormatContext *s)
{
WAVContext *wav = s->priv_data;
ByteIOContext *pb = &s->pb;
offset_t fmt, fact;
put_tag(pb, "RIFF");
- put_le32(pb, 0); /* file length */ // always false
+ put_le32(pb, 36); // by the moment header length send
put_tag(pb, "WAVE");
...
ACrowley
10th September 2007, 10:23
Of course thanks to developers, but still there are some problems:
2) The DialNorm and Dynamic Range Compression are applied always. Must be optional, or at least the default must be don't apply these values: after applied we can't recover the original quality signal.
Is it possible to enable/disable DRC/Dialonorm with currecnts Build? And when not its possibel in next builds ?
I hope so
Chances for a ffmpeg based TrueHD Decoder are bad at the Moment right ?
great Work
Kurtnoise
10th September 2007, 16:26
The internal faac output, the uncompressed wav format or the direct 'pipe' to flac or aac encoders are wrong mapped.
did you look around the channel mapping into lavf ? Could be great to have a fix for that...:) because I assume that FFmpeg developpers don't have a 5.1 kit to fix this.
Anyway, in my last build uploaded, I added your fix for the AAC ND encodings and it seems to work fine when we decide to downmix to stereo.
tebasuna51
10th September 2007, 21:05
did you look around the channel mapping into lavf ? Could be great to have a fix for that...:) because I assume that FFmpeg developpers don't have a 5.1 kit
to fix this.
The channel mapping is a issue of encoders/decoders.
A encoder must accept the uncompressed data in standard wav order and a decoder must send the uncompressed data in the same order (FL-FR-FC-LFE-BL-BR...).
If all encoders/decoders follow this rule the channelmapping problem is finished.
Then is the eac3 decoder to modify, at line 1365 in eac3dec.c:
for (k = 0; k < AC3_BLOCK_SIZE; k++) {
- for (i = 0; i < avctx->channels; i++) {
- *(out_samples++) = c->int_output[i][k];
- }
+ if (c->lfeon) {
+ switch(avctx->channels){
+ case 6:
+ *(out_samples++) = c->int_output[0][k]; // FL
+ *(out_samples++) = c->int_output[2][k]; // FR
+ *(out_samples++) = c->int_output[1][k]; // FC
+ *(out_samples++) = c->int_output[5][k]; // LFE
+ *(out_samples++) = c->int_output[3][k]; // BL
+ *(out_samples++) = c->int_output[4][k]; // BC
+ break;
+ case 5:
+ if (c->acmod == 5) {
+ *(out_samples++) = c->int_output[0][k]; // FL
+ *(out_samples++) = c->int_output[2][k]; // FR
+ *(out_samples++) = c->int_output[1][k]; // FC
+ *(out_samples++) = c->int_output[4][k]; // LFE
+ *(out_samples++) = c->int_output[3][k]; // BC
+ } else { // acmod 6
+ *(out_samples++) = c->int_output[0][k]; // FL
+ *(out_samples++) = c->int_output[1][k]; // FR
+ *(out_samples++) = c->int_output[4][k]; // LFE
+ *(out_samples++) = c->int_output[2][k]; // BL
+ *(out_samples++) = c->int_output[3][k]; // BR
+ }
+ break;
+ case 4:
+ if (c->acmod == 3) {
+ *(out_samples++) = c->int_output[0][k]; // FL
+ *(out_samples++) = c->int_output[2][k]; // FR
+ *(out_samples++) = c->int_output[1][k]; // FC
+ *(out_samples++) = c->int_output[3][k]; // LFE
+ } else { // acmod 4
+ *(out_samples++) = c->int_output[0][k]; // FL
+ *(out_samples++) = c->int_output[1][k]; // FR
+ *(out_samples++) = c->int_output[3][k]; // LFE
+ *(out_samples++) = c->int_output[2][k]; // BC
+ }
+ break;
+ default:
+ for (i = 0; i < avctx->channels; i++)
+ *(out_samples++) = c->int_output[i][k];
+ }
+ } else {
+ switch(avctx->channels){
+ case 5:
+ *(out_samples++) = c->int_output[0][k]; // FL
+ *(out_samples++) = c->int_output[2][k]; // FR
+ *(out_samples++) = c->int_output[1][k]; // FC
+ *(out_samples++) = c->int_output[3][k]; // BL
+ *(out_samples++) = c->int_output[4][k]; // BC
+ break;
+ case 4:
+ if (c->acmod == 5) {
+ *(out_samples++) = c->int_output[0][k]; // FL
+ *(out_samples++) = c->int_output[2][k]; // FR
+ *(out_samples++) = c->int_output[1][k]; // FC
+ *(out_samples++) = c->int_output[3][k]; // BC
+ } else { // acmod 6
+ *(out_samples++) = c->int_output[0][k]; // FL
+ *(out_samples++) = c->int_output[1][k]; // FR
+ *(out_samples++) = c->int_output[2][k]; // BL
+ *(out_samples++) = c->int_output[3][k]; // BR
+ }
+ break;
+ case 3:
+ if (c->acmod == 3) {
+ *(out_samples++) = c->int_output[0][k]; // FL
+ *(out_samples++) = c->int_output[2][k]; // FR
+ *(out_samples++) = c->int_output[1][k]; // FC
+ } else { // acmod 4
+ *(out_samples++) = c->int_output[0][k]; // FL
+ *(out_samples++) = c->int_output[1][k]; // FR
+ *(out_samples++) = c->int_output[2][k]; // BC
+ }
+ break;
+ default:
+ for (i = 0; i < avctx->channels; i++)
+ *(out_samples++) = c->int_output[i][k];
+ }
+ }
Of course work only for standard 5.1 channels.
Anyway, in my last build uploaded, I added your fix for the AAC ND encodings and it seems to work fine when we decide to downmix to stereo.
Yes, work fine now adding -ignorelength parameter to NeroAacEnc.
If you put the channelmapping patch work also with multichannel.
And to avoid the DialNorm and DynamicRangeCompression loss, at line 1337 in eac3dec.c:
/* apply scaling to coefficients (dialnorm, dynrng) */
for(ch=1; ch<=c->nfchans + c->lfeon; ch++) {
float gain=2.0f;
- if(c->acmod == AC3_ACMOD_DUALMONO) {
- gain *= c->dialnorm[ch-1] * c->dynrng[ch-1];
- } else {
- gain *= c->dialnorm[0] * c->dynrng[0];
- }
for(i=0; i<c->endmant[ch]; i++) {
c->transform_coeffs[ch][i] *= gain;
}
}
Kurtnoise
11th September 2007, 09:22
Thank you...:)
FFmpeg build uploaded + several command lines added in my 1st post concerning Nero Digital trancodes.
tebasuna51
11th September 2007, 10:57
Thank you...:)
FFmpeg build uploaded
Thank to you (I don't know how compile ffmpeg to make myself any test).
But I get the same result with build 10474 than with 10469:
- Same channelmapping
- Same low volume (DialNorm + DRC applied)
Maybe we can try a more simple change to test only multichannel 5.1 forgetting unusual cases.
for (k = 0; k < AC3_BLOCK_SIZE; k++) {
+ if (avctx->channels == 6) {
+ *(out_samples++) = c->int_output[0][k]; // FL
+ *(out_samples++) = c->int_output[2][k]; // FR
+ *(out_samples++) = c->int_output[1][k]; // FC
+ *(out_samples++) = c->int_output[5][k]; // LFE
+ *(out_samples++) = c->int_output[3][k]; // BL
+ *(out_samples++) = c->int_output[4][k]; // BC
+ } else {
for (i = 0; i < avctx->channels; i++) {
*(out_samples++) = c->int_output[i][k];
}
+ }
}
Kurtnoise
11th September 2007, 11:55
On my stereo system, I've better result with the rev 10474 than the previous one. New build is up (http://kurtnoise.free.fr/index.php?dir=misc/&file=ffmpeg_rev10475.7z) anyway...
btw, there is a wiki here (http://arrozcru.no-ip.org/ffmpeg_wiki/tiki-index.php) to describe how to compile FFmpeg with MSYS system. That's the way I use...
tebasuna51
11th September 2007, 15:30
On my stereo system, I've better result with the rev 10474 than the previous one. New build is up (http://kurtnoise.free.fr/index.php?dir=misc/&file=ffmpeg_rev10475.7z) anyway...
Still don't work. Same low volume, same wrong channelmapping.
eac3_decode_frame() in eac3dec.c is not the output routine?
btw, there is a wiki here (http://arrozcru.no-ip.org/ffmpeg_wiki/tiki-index.php) to describe how to compile FFmpeg with MSYS system. That's the way I use...
I will try, but this way is dark for me.
jruggle
12th September 2007, 05:54
The channel mapping is a issue of encoders/decoders.
A encoder must accept the uncompressed data in standard wav order and a decoder must send the uncompressed data in the same order (FL-FR-FC-LFE-BL-BR...).
If all encoders/decoders follow this rule the channelmapping problem is finished.
There is one problem with what you propose. Not every output format uses WAVE channel order. What if someone wants to transcode AC3 to AAC, or from E-AC3 to AC3, or from AC3 to Vorbis? The decoder should not assume that the user wants their audio automatically converted to WAVE channel order...so FFmpeg leaves the channel order as it was in the original audio.
I do admit FFmpeg needs a way to reorder channels, but it should definitely not be done the way you propose. In fact, I started working on that task a few months ago, but alas I am just one person with only so much time. Of course, if you only want to use FFmpeg to decode AC3 to WAVE then you can use that patch in your local build.
I don't mean to sound too defensive...I know there are many things that could be done to improve FFmpeg when it comes to audio. I am the FFmpeg AC3 maintainer, and I do wish I had more time on my hands to make it better. Now if I could just win the lottery so I could program for fun all day instead of working. :)
I'll go ahead and try to answer some of the other questions here.
As for disabling DRC/dialnorm, I'll see if I can get that added. I don't see why not. If you want to do it yourself, the patch would be simple enough. Add a variable to the AVCodecContext in avcodec/avcodec.h such as apply_drc. Append a line to the options[] array in avcodec/utils.c to add the option to the commandline. Then use the variable in ac3dec.c and/or eac3dec.c to control whether or not the DRC multiplier is applied. I would do it now, but I'm trying to finish this post so I can go to bed.
I already mentioned that I'm working on channel reordering. I also want to mention that it's a pain in the ass. There is a big difference between a working solution and a clean solution. I have a working solution and several ideas for clean solutions, but I kinda stopped working on it when the Google SoC started. So maybe now I'll pick it back up.
Support for anything other than 16-bit signed samples has been needed for years. It will be a pretty big task though since the whole audio API is currently based around 16-bit. As far as I know, all the FFmpeg developers want this to change, so it's a matter of someone taking on the task. It probably won't be me. :)
TrueHD support...that would take some huge breakthrough. I only find reverse engineering a little bit fun, and I don't really have the patience to stick with it. Unless Dolby decides to become generous and publish the specs, I doubt open source support for the format will happen anytime soon. But you never know...someone did reverse engineer Apple Lossless...
-Justin
ACrowley
12th September 2007, 10:34
Can we await a ffdshow build with EAC3 decoding soon ?
tebasuna51
12th September 2007, 12:04
There is one problem with what you propose. Not every output format uses WAVE channel order. What if someone wants to transcode AC3 to AAC, or from E-AC3 to AC3, or from AC3 to Vorbis? The decoder should not assume that the user wants their audio automatically converted to WAVE channel order...so FFmpeg leaves the channel order as it was in the original audio.
I don't see the problem in my proposal, the problem is leave the uncompressed channel order in the internal compressed order without any indication from the origin.
I ask (to you and DarkAvenger) what is the soft than output wav's in other order than the standard. I don't know very much:
1) Audio editors (and encoder plugins): all I know work in the standard wav order.
2) Multichannel encoders:
Aften, NeroAacEnc, Enc_Aacplus, Flac, wma_encoders ..., work in the standar wav order.
Sonic Foundry SoftEncode (old soft) is not the default order but can be easy modified.
Only OggEnc2 need ac3_order or need use WAVE_FORMAT_EXTENSIBLE header and now admit standard wav order.
3) Multichannel decoders:
Faad, NeroAacDec, Tranzcode, OggDec, NicAudio-AviSynth, BeLight-BeSweet, Foobar2000, ..., the output is always in standard wav order (yes also OggDec).
Azid with -d3/2 -L0 -l1 -ol,r,c,lfe,sl,sr can output standard wav order.
Of course the internal transcode ac3->ac3 or ac3<->ogg work fine now, but ac3<->aac don't work at all. If the uncompressed output is the standard wav order all external compliants encoders can be used.
Then my opinion is: the decoder must assume that the user wants their uncompressed audio automatically converted to WAVE channel order.
I do admit FFmpeg needs a way to reorder channels, but it should definitely not be done the way you propose. In fact, I started working on that task a few months ago, but alas I am just one person with only so much time. Of course, if you only want to use FFmpeg to decode AC3 to WAVE then you can use that patch in your local build.
Really I don't need ffmpeg to decode anything, I only want improve the free software with my very little input.
And can't accept "it should definitely not be done the way you propose", without any reason.
I don't mean to sound too defensive...I know there are many things that could be done to improve FFmpeg when it comes to audio. I am the FFmpeg AC3 maintainer, and I do wish I had more time on my hands to make it better. Now if I could just win the lottery so I could program for fun all day instead of working. :)
Of course I accept that. But let me propose a complete solution for multichannel ac3 ffmpeg encoder/decoder.
As for disabling DRC/dialnorm, I'll see if I can get that added. I don't see why not. If you want to do it yourself, the patch would be simple enough. Add a variable to the AVCodecContext in avcodec/avcodec.h such as apply_drc. Append a line to the options[] array in avcodec/utils.c to add the option to the commandline. Then use the variable in ac3dec.c and/or eac3dec.c to control whether or not the DRC multiplier is applied. I would do it now, but I'm trying to finish this post so I can go to bed.
Thanks, I will try.
I already mentioned that I'm working on channel reordering. I also want to mention that it's a pain in the ass. There is a big difference between a working solution and a clean solution. I have a working solution and several ideas for clean solutions, but I kinda stopped working on it when the Google SoC started. So maybe now I'll pick it back up.
Really I think the best solution is manage the uncompressed audio in a unique order (and the standard is MS wav, to play and to file output).
But maybe you have other ideas. I'm not a MS defender but I think is more easy accept the MS wav order than try to impose any other.
Support for anything other than 16-bit signed samples has been needed for years. It will be a pretty big task though since the whole audio API is currently based around 16-bit. As far as I know, all the FFmpeg developers want this to change, so it's a matter of someone taking on the task. It probably won't be me. :)
Ok.
tebasuna51
12th September 2007, 12:34
On my stereo system, I've better result with the rev 10474 than the previous one. New build is up (http://kurtnoise.free.fr/index.php?dir=misc/&file=ffmpeg_rev10475.7z) anyway...
Yes, the disable DialNorm-DRC can work, but seems my only eac3 to test have DialNorm -31 and DRC 'none' and I can't detect any difference. But the same change with standard ac3 works fine.
btw, there is a wiki here (http://arrozcru.no-ip.org/ffmpeg_wiki/tiki-index.php) to describe how to compile FFmpeg with MSYS system. That's the way I use...
Yes!. My first ffmpeg compiled.
I use your ffmpeg.patch because with the sources downloaded initially from http://svn.mplayerhq.hu/soc/eac3/ don't work for me (Unsupported codec (id=86020) for input stream #0.1)
I correct the problem and the wav order is now correct, in your
ffmpeg.patch at line 3646:
+ for (k = 0; k < AC3_BLOCK_SIZE; k++) {
+ for (i = 0; i < avctx->channels; i++) {
+ *(out_samples++) = c->int_output[i][k];
+ }
+ }
+ if (c->lfeon) {
+ switch(avctx->channels){
+ case 6:
...
must be:
+ for (k = 0; k < AC3_BLOCK_SIZE; k++) {
+ if (c->lfeon) {
+ switch(avctx->channels){
+ case 6:
...
+ }
My If {} replace the for (i ...) {}
The same changes can be made for regular ac3 (ac3dec.c).
Now I want change the ac3enc.c to permit work the internal encoder.
Mc Onyx
12th September 2007, 15:49
Can we await a ffdshow build with EAC3 decoding soon ?
Well i've asked a few times, but haven't got an answer! Damn, i wish i knew how to compile stuff, like libavcodec, etc.
ACrowley
12th September 2007, 16:04
Well i've asked a few times, but haven't got an answer! Damn, i wish i knew how to compile stuff, like libavcodec, etc.
ok thx..i dont know how to compile too
a ffdhow Build with EAC3 support would be extremly usefull for EAC3 Playback. So far we can disable DRC, as like as for AC3.
Kurtnoise
12th September 2007, 18:02
The AC3 decoder build in FFdshow uses liba52 not lavc...
@tebasuna : 10x...I'll look at this later. :)
Mc Onyx
12th September 2007, 18:44
The AC3 decoder build in FFdshow uses liba52 not lavc...
I forgot about that, so there's no way to get this decoder into FFDShow, unless somebody ports it?
Kurtnoise
12th September 2007, 18:50
yep...
damngod
12th September 2007, 21:23
I'm still getting this error when trying to encode E-AC3 to AAC-LC :
ffmpeg : unrecognized option '-aid'
I'm missing something but... what ?
If i omit -aid x, i'm getting a "output file does not contain any stream".
Kurtnoise
12th September 2007, 21:44
try this cmd ffmpeg -i input.evo and copy & paste the stdout here...
damngod
12th September 2007, 21:48
Here is it :
F:\>ffmpeg -i video.evo
FFmpeg version SVN-r10475, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-memalign-hack --enable-avisynth --enable-
libfaac --enable-libfaad --enable-libogg --enable-libvorbis --enable-libmp3lame
--enable-libx264 --enable-pp
libavutil version: 49.5.0
libavcodec version: 51.43.0
libavformat version: 51.12.3
built on Sep 11 2007 11:45:37, gcc: 4.2.1-dw2 (mingw32-2)
Input #0, mpeg, from 'video.evo':
Duration: N/A, start: 0.038556, bitrate: N/A
Stream #0.0[0xfd55]: Video: vc1, yuv420p, 1920x1080, 29.97 fps(r)
Must supply at least one output file
F:\>
Kurtnoise
12th September 2007, 23:33
no audio stream in your input file...that's why you have this message.
jruggle
13th September 2007, 01:38
Really I don't need ffmpeg to decode anything, I only want improve the free software with my very little input.
And can't accept "it should definitely not be done the way you propose", without any reason.
[...]
Really I think the best solution is manage the uncompressed audio in a unique order (and the standard is MS wav, to play and to file output).
But maybe you have other ideas. I'm not a MS defender but I think is more easy accept the MS wav order than try to impose any other.
I'm sorry, I'll explain a little more. FFmpeg is made up of several separate libraries, the biggest 2 being libavcodec and libavformat. Channel ordering is complex because sometimes it is dependent on the codec and sometimes on the format. There also needs to be a way for the user to specify the order. Some containers support 1 channel order, some support many orders, etc... We can't design the solution based on raw audio in WAVE order without taking other possibilities into account.
A form of your proposed solution was actually discussed. We decided that the decoder should not modify the channel order, but could modify the number of channels (i.e. downmixing). The most recent solution I was working on went something like this:
Input side (source channel layout)
1. The user can optionally specify the source channel layout.
2. The input format (container), if present, can optionally specify the channel layout when initialized.
3. The decoder can optionally specify the channel layout when initialized.
4. If none of the above occur, revert to a default channel layout.
Output side (destination channel layout)
5. The user can optionally request the output channel layout. If the encoder or container do not support it, give error message.
6. The encoder, when initialized, can optionally specify a channel layout.
7. The output format (container), when initialized, can optionally specify a channel layout.
8. If none of the above occur, revert to a default channel layout.
Take the example of AC3 source and WAVE output.
1. The user could override the source layout if they wanted to.
2. source container: raw AC3, no preferred layout
3. source codec: AC3, standard AC3 channel layout
4. skip, the input layout has been set to AC3 order with layout based on number of channels and acmod value.
5. The user can request a different output channel layout. For example, downmixed from 5.1 to stereo.
6. The encoder, raw pcm, doesn't care about the channel order
7. The output container, WAVE, needs to be in WAVE order.
All this is pretty straight-forward except for figuring out which options take precedence, and in what situations. The tricky part comes in deciding where the actual conversion should take place. In addition to reordering, there is also potential for downmixing when converting channel layouts. I implemented a solution which worked at the user level, which is also where sample rate conversion is done. This works, but has some drawbacks. AC3 and DTS both have specifically defined ways of doing downmixing. We thought of having the decoder pass along downmixing coefficients, but that could get really messy. The FFmpeg developers want a solution which would support downmixing and reordering at both the encoder/decoder level and at the user-level. This is certainly possible, but not simple to implement.
Let's look at 2 examples. Please note that when I say "user" I'm not talking about the actual program user, but the library user. The FFmpeg program is the user-level in this case since it uses libavcodec and libavformat.
AC3 5.1 to 6-channel WAVE:
*at initialization:
- AC3 decoder chooses 6 channels in AC3 order based on source stream and/or user request
- WAVE output format chooses 6 channels in WAVE order based on format default and/or user request
*during decode/encode:
- The input format doesn't do anything except split the frames (raw AC3 parser)
- AC3 decoder outputs a raw audio frame with 6 channels in AC3 order
- The user-level knows the source and output layouts and does the necessary reordering.
- The encoder doesn't do anything (raw pcm)
- The output format (WAVE) accepts the packet without warning or error since it has already been converted it to a supported channel layout.
AC3 5.1 to stereo WAVE:
*at initialization:
- AC3 decoder chooses 2 channels based solely on user request
- WAVE output format chooses 2 channels based on format default and user request
*during decode/encode:
- The input format doesn't do anything except split the frames (raw AC3 parser)
- AC3 decoder does the downmixing, and outputs a raw audio frame with 2 channels.
- The user-level knows the source and output layouts and doesn't have to do any reordering (it's just stereo)
- The encoder doesn't do anything (raw pcm)
- The output format (WAVE) accepts the packet without warning or error since it is in a supported channel layout.
Sorry for the really long post... I just want to make sure I'm explaining my thought process well enough.
damngod
13th September 2007, 07:58
Thanks Kurtnoise13 ! Too many file in the same dir with strange names, i was working on the wrong one. Just tried this morning with the correct .evo and it worked perfectly. Great tool. :)
tebasuna51
13th September 2007, 13:04
@Justin
Thanks for your long post and detailed explanations.
The most interesting for me is:
"A form of your proposed solution was actually discussed. We decided that the decoder should not modify the channel order,..."
Well, I'm not agree with you but I can't do nothing with this.
I think is more easy (and clean) each encoder/decoder uses like input/output the same order (maybe WAV or other), bitdepth (seems 32 float is more adequate instead 16 int) and so on.
With a unique format the user-level can do any process (TimeStretch, SampleRateChange, Upmix, Downmix, ...) much more easy.
BTW, I think the downmix process don't be a job for decoders, can suggest coefficients like pressent in BSI-AC3, but is a job for the user-level.
Then if:
"- AC3 decoder outputs a raw audio frame with 6 channels in AC3 order
- The user-level knows the source and output layouts and does the necessary reordering.
..."
we only can wait until ffmpeg developers implement the user-level. I know is not easy.
At least is not so easy than my solution implemented in less than a week by a unexperienced C programmer and without any knowledge of ffmpeg: I have a functional ffmpeg with correct channel mapping for wav, ac3, eac3 input and wav, ac3 output.
Of course others internal multichannels encoders/decoders like ogg and aac must need changed. But actually the aac output is wrong mapped also and multichannel ogg not allowable.
Maybe the official ffmpeg can accept at least the apply_drc command line parameter with the values:
0 Don't apply Dialog Normalization and Dynamic Range Compression (default, preserve the audio quality)
1 Apply only DRC (suggested for ac3 encoded with Aften with DialNorm included)
2 Apply only Dialog Normalization (I don't know for what)
3 Apply both (Dolby compliant equipments in noise ambience)
And the little patch to wav.c for stdout (http://forum.doom9.org/showthread.php?p=1043284#post1043284) to be accepted for NeroAacEnc:
put_tag(pb, "RIFF");
- put_le32(pb, 0); /* file length */ // always false
+ put_le32(pb, 36); // by the moment header length send
put_tag(pb, "WAVE");
Thanks.
damngod
13th September 2007, 13:26
Mmh, i was able to encode one E-AC3 this morning but i didn't have specified the stream number so it encoded the first one by default. Anyway i want to encode the second one and i'm still experiencing problems with -aid option. Wherever i put "-aid 2", it gets me :
ffmpeg : unrecognized option '-aid'
damngod
13th September 2007, 13:27
I tried :
ffmpeg -i rebuilt.evo -vn -acodec libfaac -ac 2 -ab 128k -aid 2 -y audio.fr.aac
ffmpeg -i rebuilt.evo -ac 2 -vn -acodec libfaac -ab 128k -aid 2 -y audio.fr.aac
ffmpeg -i rebuilt.evo -vn -acodec libfaac -ac 2 -ab 128k -ac 2 -aid 2 -y audio.fr.aac
And so on.
yonta
13th September 2007, 14:16
Mmh, i was able to encode one E-AC3 this morning but i didn't have specified the stream number so it encoded the first one by default. Anyway i want to encode the second one and i'm still experiencing problems with -aid option. Wherever i put "-aid 2", it gets me :
ffmpeg : unrecognized option '-aid'
as far as I know '-aid' is a mplayer/mencoder option.
if you just execute something like this;
ffmpeg.exe -i source.evo
output will be something like this;
Stream #0.0[0x1e2]: Video: mpeg2video, 90000.00 fps(r)
Stream #0.1[0xb1]: Audio: 0x0000
Stream #0.2[0xc0]: Audio: E-AC3, 48000 Hz, 5:1, 1536 kb/s
Stream #0.3[0xc3]: Audio: E-AC3, 48000 Hz, 5:1, 768 kb/s
Stream #0.4[0xc2]: Audio: E-AC3, 48000 Hz, 5:1, 640 kb/s
Stream #0.5[0x20]: Subtitle: dvdsub
now, if you want to transcode Stream #0.3(768k) to ac3 448k;
ffmpeg.exe -map 0:3 -i source.evo -vn -acodec ac3 -ab 448k -ac 6 stream03.ac3
Kurtnoise
13th September 2007, 14:17
my fault...sorry.
try this :
ffmpeg -i rebuilt.evo -vn -acodec libfaac -ac 2 -ab 128k -map 0:2 -y audio.fr.aac
the key is -map 0:x where x is the stream # desired...
edit/ yonta beats me. ^^
damngod
13th September 2007, 18:20
Thanks guys :)
I got a "noobie" question : do ffmpeg use an external decoder such as Nero or Sonic to decode the E-AC3 or is it able to encode E-AC3 by itself ? Because I have plenty decoders/splitters installed, I just want to know what is really needed (the minimum) to do E-AC3 to AAC. Thanks in advance, I hope I'm clear enough.
Mc Onyx
13th September 2007, 20:35
Thanks guys :)
I got a "noobie" question : do ffmpeg use an external decoder such as Nero or Sonic to decode the E-AC3 or is it able to encode E-AC3 by itself ? Because I have plenty decoders/splitters installed, I just want to know what is really needed (the minimum) to do E-AC3 to AAC. Thanks in advance, I hope I'm clear enough.
FFMPEG has it's own E-AC3 decoder, does not use Nero or Sonic or anything else...
damngod
13th September 2007, 21:13
Ok, I was expecting this, thanks anyway. Just encoded an E-AC3 from a Blu-Ray .m2ts, works perfectly.
madshi
13th September 2007, 22:52
I think is more easy (and clean) each encoder/decoder uses like input/output the same order (maybe WAV or other)
Agreed.
bitdepth (seems 32 float is more adequate instead 16 int) and so on.
I strongly disagree. Lossless formats like TrueHD, DTS Master Audio and FLAC should be decoded to exactly that bit depth the source is in. If you don't do it this way, reencoding from one lossless format to another would be unnecessarily complicated.
madshi
13th September 2007, 23:12
There is one problem with what you propose. Not every output format uses WAVE channel order. What if someone wants to transcode AC3 to AAC, or from E-AC3 to AC3, or from AC3 to Vorbis? The decoder should not assume that the user wants their audio automatically converted to WAVE channel order...
I don't follow your argumentation here. You'd be right if only the decoder forced WAV channel ordering and the encoder didn't. That would be chaos! But tebasuna51's suggestion was to also change encoders to expect WAV channel ordering. Basically each decoder would remap channels internally to make the output WAV order like. And each encoder would again expect WAV order input and would internally remap the channels to the format's own channel order. As far as I understand it doing it this way would automatically ensure correct channel ordering for any format conversion. What am I missing?
Ok, there might be some formats which allow different channel orders. E.g. in RAW files you could have any channel ordering you like. But I don't see why it would harm to use WAV channel order here by default, too. If the end user wants a different order, ffmpeg could still offer the possibility to the end user to remap channels to his liking. Even in this case it would be better to start of with the WAV order because then the end user knew exactly where he starts from. As far as I understand it, right now the end user must know exactly which format has which internal channel ordering which I find much too complicated.
But these are just my 2 cents and maybe I'm overlooking some potential problems?
tebasuna51
14th September 2007, 03:25
I strongly disagree. Lossless formats like TrueHD, DTS Master Audio and FLAC should be decoded to exactly that bit depth the source is in. If you don't do it this way, reencoding from one lossless format to another would be unnecessarily complicated.
I agree with all your comments and also with this one, the bitdepth must be preserved while is possible. This is the idea I insert in BeHappy-AviSynth.
Really I can't suspect any problem (about channel order) other than the reticence to accept the default MS WAV order. I am a MS user not a MS defender, but I think accept a standard is not lose a battle, is gain users.
damngod
15th September 2007, 10:40
I got a weird bug on a HD DVD. First, the video is recognized as MPEG-2 even if it's H.264. I also got a warning about the framerate. Anyway I only want to encode one DD+ to AAC but encoding starts to become very slow (processes 0.1 second of the movie in a minute) after having processed like 3 minutes of the movie. At this point, the process called "System" starts to charge like 20% of the CPU which is abnormal. I will format my HDD to be sure it's not related to something else, like drivers.
damngod
16th September 2007, 12:10
HDD formatting is scheduled for tonight. This morning, I tried encoding something else, a DTS HD track to AAC. It starts normally but ffmpeg crashes after 2 minutes. The error is reported as :
FFmpeg version SVN-r10475, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-memalign-hack --enable-avisynth --enable-
libfaac --enable-libfaad --enable-libogg --enable-libvorbis --enable-libmp3lame
--enable-libx264 --enable-pp
libavutil version: 49.5.0
libavcodec version: 51.43.0
libavformat version: 51.12.3
built on Sep 11 2007 11:45:37, gcc: 4.2.1-dw2 (mingw32-2)
Input #0, mpeg, from 'L0_mainMovie_MERGED.rebuilt.EVO':
Duration: 01:06:20.2, start: 0.500000, bitrate: 45941 kb/s
Stream #0.0[0xfd55]: Video: vc1, yuv420p, 1920x1080, 29.97 fps(r)
Stream #0.1[0x88]: Audio: dca, 48000 Hz, 5:1, 1536 kb/s
Stream #0.2[0x89]: Audio: dca, 48000 Hz, 5:1, 1536 kb/s
Output #0, adts, to 'audio2.aac':
Stream #0.0: Audio: libfaac, 48000 Hz, stereo, 192 kb/s
Stream mapping:
Stream #0.2 -> #0.0
Press [q] to stop encoding
ERROR: block code look-up failedate= 165.4kbits/s
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
ERROR: block code look-up failed
[dca @ 008C22E0]Didn't get subframe DSYNC
Even if it crashed, the resulting (incomplete) file plays fine in VLC. Any idea ?
Kurtnoise
16th September 2007, 13:49
who said that DTS HD is supported by FFmpeg ?
damngod
16th September 2007, 16:17
Who said it was not ?
Kurtnoise
16th September 2007, 16:45
come on...what's the title of this thread ?
:helpful:
Jjeje007
22nd September 2007, 18:01
Hi,
I experience an really big desync audio-video while transcoding eac3 to aac LC 5.1 and vc1 to x264. (both in "raw" then muxing this mkvmerge)
I try every thing but no way :mad:
The craziest thing is the audio-video sync in the evo file is ok .... :devil:
Other thing, i encode 300 and every thing went well :eek:
I try also with ffmpeg but it's result on same desync
I really like to have an eac3 decoder "working" I upload an BIG sample (~ 392M) from Matrix reloaded (aka matrix 2) :
http://www.db-instable.org/samples/sample-matrix2.evo
So can someone get audio-video sync when encoding this with aac and x264 ??
Here is an new patch which compil fine against the latest svn mplayer :
http://www.db-instable.org/misc/eac3.patch
And here is the update ebuild :
http://www.db-instable.org/misc/mplayer_eac3_ebuild-v2.tar.gz
With this ebuild, you don't have to edit :
/usr/share/mplayer/codecs.conf
It's already done in the ebuild :)
Note : I'm running Gentoo GNU/Linux
Jjeje007
tebasuna51
23rd September 2007, 02:45
I try also with ffmpeg but it's result on same desync
I really like to have an eac3 decoder "working" I upload an BIG sample (~ 392M) from Matrix reloaded (aka matrix 2) : sample-matrix2.evo
So can someone get audio-video sync when encoding this with aac and x264 ??
Using ffmpeg and decoding the -map 0:7 (5.1 french) I get 46 errors like:
Error while decoding stream #0.7
[E-AC3 @ 00716B20]transient pre-noise processing NOT IMPLEMENTED
If original eac3 is 153.952 sec. the decoded wav is 153.216 sec. because there are 46 frames ignored (each frame 16 ms.)
Decoding the -map 0:8 (5.1 english) I get 35 errors then the decoded wav is 153.392 sec.
Jjeje007
23rd September 2007, 10:34
Using ffmpeg and decoding the -map 0:7 (5.1 french) I get 46 errors like:
Error while decoding stream #0.7
[E-AC3 @ 00716B20]transient pre-noise processing NOT IMPLEMENTED
If original eac3 is 153.952 sec. the decoded wav is 153.216 sec. because there are 46 frames ignored (each frame 16 ms.)
Decoding the -map 0:8 (5.1 english) I get 35 errors then the decoded wav is 153.392 sec.
Ok, so that's mean : i will never have audio-video sync until the decoder implement the "transient pre-noise processing" .... :mad:
Shakey_Jake33
23rd September 2007, 17:49
I've not been following the progress of E-AC3 decoding, so apologies if this has been covered, but if ffdshow handles the DD+ decoding, I assume this basically enables playback of HD-DVD's through mpc? (using the existing guides for configuration, but replacing Cinemaster with ffdshow). So you could then use ffdshow to trancode this into AC3 like many of us already do with our 5.1 AAC files?
I ask this because I've recently went over to coaxial on my PC, and it's excellent... except I have to switch back over to 5.1 analogue for 5.1 HD-DVD playback! (which is better between digitally-sent AC3 and analogue 5.1 is another debate, but for convenience, being able to send as AC3 is great).
mrcorbo
23rd September 2007, 18:07
I've not been following the progress of E-AC3 decoding, so apologies if this has been covered, but if ffdshow handles the DD+ decoding, I assume this basically enables playback of HD-DVD's through mpc? (using the existing guides for configuration, but replacing Cinemaster with ffdshow). So you could then use ffdshow to trancode this into AC3 like many of us already do with our 5.1 AAC files?
I ask this because I've recently went over to coaxial on my PC, and it's excellent... except I have to switch back over to 5.1 analogue for 5.1 HD-DVD playback! (which is better between digitally-sent AC3 and analogue 5.1 is another debate, but for convenience, being able to send as AC3 is great).
In Zoomplayer I follow the Cinemaster decoder in the filter chain with the ffdshow audio processor filter to turn the decoded 6 channels of raw PCM into AC3. Works fine.
I agree, though, that fully integrating this functionality into ffdshow would be preferable.
Jjeje007
23rd September 2007, 21:35
I've not been following the progress of E-AC3 decoding, so apologies if this has been covered, but if ffdshow handles the DD+ decoding, I assume this basically enables playback of HD-DVD's through mpc? (using the existing guides for configuration, but replacing Cinemaster with ffdshow). So you could then use ffdshow to trancode this into AC3 like many of us already do with our 5.1 AAC files?
I ask this because I've recently went over to coaxial on my PC, and it's excellent... except I have to switch back over to 5.1 analogue for 5.1 HD-DVD playback! (which is better between digitally-sent AC3 and analogue 5.1 is another debate, but for convenience, being able to send as AC3 is great).
If you were speaking to me :
I'm an linux user, and i haven't got Windows so ....
tebasuna51
24th September 2007, 15:44
If anybody want use this custom ffmpeg_evo (http://www.mytempdir.com/2027279) to decode ac3/evo files, have:
- Correct channel mapping output
- Dialog Normalization attenuation disabled
- Dynamic Range Compression disabled
- Frames with "transient pre-noise processing" accepted (1)
- STDOUT accepted by NeroAacEnc and Flac 1.2.1
- The output is still 16 bit int (TODO 32 float, decoder native precision)
- Standard ac3 decodes are also supported with the precedent features.
(1) The message:
[E-AC3 @ 00716B20]transient pre-noise processing NOT IMPLEMENTED
are still send but the frame is not rejected and decoded normally.
I don't see artifacts decoding these frames normally and the sync is preserved.
Samples of command line to use:
ffmpeg_evo -map 0:7 -i Sample.evo -vn -acodec pcm_s16le -ac 6 -f wav Sample.wav
ffmpeg_evo -map 0:7 -i Sample.evo -vn -acodec pcm_s16le -ac 6 -f wav - | flac - -o Sample.flac --channel-map=none --ignore-chunk-sizes
ffmpeg_evo -map 0:7 -i Sample.evo -vn -acodec pcm_s16le -ac 6 -f wav - | aften -b 448 -readtoeof 1 -pad 0 - Sample.ac3
ffmpeg_evo -map 0:7 -i Sample.evo -vn -acodec pcm_s16le -ac 6 -f wav - | neroaacenc -q 0.5 -ignorelength -if - -of Sample.mp4
ffmpeg_evo -map 0:7 -i Sample.evo -vn -acodec pcm_s16le -ac 6 -f wav - | enc_aacPlus - Sample.aac --cbr 256000
Kurtnoise
24th September 2007, 21:44
Thanks but what's the main goal to transcode a lossy to a lossless stream (E-AC3 to FLAC) ?
Jjeje007
24th September 2007, 23:58
If anybody want use this custom ffmpeg_evo (http://www.mytempdir.com/2026509) to decode ac3/evo files, have:
- Correct channel mapping output
- Dialog Normalization attenuation disabled
- Dynamic Range Compression disabled
- Frames with "transient pre-noise processing" accepted (1)
- STDOUT accepted by NeroAacEnc and Flac 1.2.1
- The output is still 16 bit int (TODO 32 float, decoder native precision)
- Standard ac3 decodes are also supported with the precedent features.
(1) The message:
[E-AC3 @ 00716B20]transient pre-noise processing NOT IMPLEMENTED
are still send but the frame is not rejected and decoded normally.
I don't see artifacts decoding these frames normally and the sync is preserved.
Samples of command line to use:
ffmpeg_evo -map 0:7 -i Sample.evo -vn -acodec pcm_s16le -ac 6 -f wav Sample.wav
ffmpeg_evo -map 0:7 -i Sample.evo -vn -acodec pcm_s16le -ac 6 -f wav - | flac - -o Sample.flac --channel-map=none --ignore-chunk-sizes
ffmpeg_evo -map 0:7 -i Sample.evo -vn -acodec pcm_s16le -ac 6 -f wav - | aften -b 448 -readtoeof 1 -pad 0 - Sample.ac3
ffmpeg_evo -map 0:7 -i Sample.evo -vn -acodec pcm_s16le -ac 6 -f wav - | neroaacenc -q 0.5 -ignorelength -if - -of Sample.mp4
ffmpeg_evo -map 0:7 -i Sample.evo -vn -acodec pcm_s16le -ac 6 -f wav - | enc_aacPlus - Sample.aac --cbr 256000
Can you please, give us (me) the patch you used to build this ?
Should be very usefull for the linux users :rolleyes:
Jjeje007
tebasuna51
25th September 2007, 00:31
Thanks but what's the main goal to transcode a lossy to a lossless stream (E-AC3 to FLAC) ?
Yes, maybe I was thinking also in TrueHD :)
BTW, eac3 can reach 3 Mb/s and for a 6 channel 48 KHz (1.3 bytes per sample) have the same ratio compression than Flac 16 bits (65% is 1.3 bytes per sample, in average).
Of course always we need transcode a stream is because the original format can't be played in a specific environment or we need reduce the stream size losing quality. If only the first reason is present, we can preserve the original quality forever using a lossless format.
tebasuna51
25th September 2007, 02:05
Can you please, give us (me) the patch you used to build this ?
Should be very usefull for the linux users
Sorry, I'm newbie in patching system used with svn, but the:
- Correct channel mapping output
- Dialog Normalization attenuation disabled
- Dynamic Range Compression disabled
are explained in post http://forum.doom9.org/showthread.php?p=1043590#post1043590
- Standard ac3 decodes are also supported with the precedent features.
Is only apply the same changes to ac3dec.c instead eac3.dec
- STDOUT accepted by NeroAacEnc and Flac 1.2.1
Explained in post http://forum.doom9.org/showthread.php?p=1043284#post1043284
- Frames with "transient pre-noise processing" accepted
Is the new change, really simple, in eac3dec.c at line 369 coment 3 lines:
/* Audio frame transient pre-noise processing data */
if(s->transproce){
av_log(s->avctx, AV_LOG_ERROR, "transient pre-noise processing NOT IMPLEMENTED\n");
// return -1;
//#if 0
for(ch = 1; ch <= s->nfchans; ch++){
GET_BITS(s->chintransproc[ch], gbc, 1);
if(s->chintransproc[ch]){
GET_BITS(s->transprocloc[ch], gbc, 10);
GET_BITS(s->transproclen[ch], gbc, 8);
}
}
//#endif
}
madshi
25th September 2007, 09:42
Yes, maybe I was thinking also in TrueHD :)
BTW, eac3 can reach 3 Mb/s and for a 6 channel 48 KHz (1.3 bytes per sample) have the same ratio compression than Flac 16 bits (65% is 1.3 bytes per sample, in average).
Of course always we need transcode a stream is because the original format can't be played in a specific environment or we need reduce the stream size losing quality. If only the first reason is present, we can preserve the original quality forever using a lossless format.
Agreed. The only problem with the concept of reencoding lossy tracks to lossless compression is that lossy tracks usually decode to 24bit. So if you want to keep the full decoded data, the lossless file will become very big. Probably it would make sense to dither those 24bit down to 20bit to keep file sizes acceptable. According to the Industry Insiders Thread (AVSForum) dithering down to 20bit shouldn't really harm the audio quality because the 4 LSBs are usually only noise, anyway.
Funnily 16bit FLAC is comparable in file size to 1,5Mbps E-AC3/DTS. So for 16bit audio tracks I see no sense in using lossy compression. However, as soon as you go above 16bit, lossless compression loses efficiency.
Kurtnoise
25th September 2007, 11:13
@tebasuna: use TortoiseSVN...very easy to create patches with it (just right click on the folder where you have saved your work. Then, [TortoiseSVN -> Create Patch...]
and btw, FFmpeg has his own FLAC encoder...
tebasuna51
25th September 2007, 14:41
A new ffmpeg_evo (http://www.mytempdir.com/2027279), to solve a bug decoding ac3 stereo and add the correct channel mapping to the internal ac3 encoder:
- Internal ac3 encoder support standard ordered wav (or decoded ac3/evo)
Command line samples:
ffmpeg_evo -map 0:7 -i Sample.evo -vn -acodec ac3 -ab 448k -ac 6 Sample.ac3
ffmpeg_evo -i Standard.wav -vn -acodec ac3 -ab 448k -ac 6 Sample.ac3
Source changes inside the txt included.
Jjeje007
26th September 2007, 19:17
Source changes inside the txt included.
Thanks !
Here is the patch for mplayer (apply and compile ok, tested today) :
http://www.db-instable.org/misc/eac3v2.patch
I included all your mod, tebasuna51
Jjeje007
tribble222
5th October 2007, 12:34
Here is the patch for mplayer (apply and compile ok, tested today) :
Thanks for putting it together!
Inventive Software
5th October 2007, 21:05
Remind me.... ffmpeg uses libavcodec for its AC-3 decoding, correct? Is this not based on liba52 within the source? It's been a while since I last checked the source of libavcodec (0.49-pre1 to be exact, yonks in codec development). So in theory, how easy is it to add the eac3 patch to pure liba52 code?
sl1pkn07
6th October 2007, 01:46
SNV 24712
sl1pkn07@SpinFlo:~/aplicaciones/mplayer-svn$ patch -p0 < eac3v2.patch
patching file libavcodec/ac3.c
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file libavcodec/ac3.h
patching file libavcodec/ac3dec.c
Hunk #1 FAILED at 37.
Hunk #2 FAILED at 66.
Hunk #3 FAILED at 110.
Hunk #4 FAILED at 187.
Hunk #5 FAILED at 222.
Hunk #6 FAILED at 230.
Hunk #7 FAILED at 294.
Hunk #8 FAILED at 368.
Hunk #9 FAILED at 419.
Hunk #10 FAILED at 430.
Hunk #11 FAILED at 471.
Hunk #12 FAILED at 501.
Hunk #13 FAILED at 584.
Hunk #14 FAILED at 623.
Hunk #15 FAILED at 645.
Hunk #16 FAILED at 700.
Hunk #17 FAILED at 721.
Hunk #18 FAILED at 775.
Hunk #19 FAILED at 837.
Hunk #20 FAILED at 909.
Hunk #21 FAILED at 918.
Hunk #22 FAILED at 998.
Hunk #23 FAILED at 1019.
Hunk #24 FAILED at 1036.
Hunk #25 FAILED at 1058.
Hunk #26 FAILED at 1099.
26 out of 26 hunks FAILED -- saving rejects to file libavcodec/ac3dec.c.rej
patching file libavcodec/ac3dec.h
patching file libavcodec/ac3tab.c
patching file libavcodec/ac3tab.h
patching file libavcodec/eac3dec.c
patching file libavcodec/eac3.h
patching file libavcodec/aac_ac3_parser.c
Hunk #2 succeeded at 59 with fuzz 1.
patching file libavcodec/aac_ac3_parser.h
patching file libavcodec/aac_parser.c
patching file libavcodec/ac3_parser.c
patching file libavcodec/allcodecs.c
Reversed (or previously applied) patch detected! Assume -R? [n] y
Hunk #1 succeeded at 179 (offset 7 lines).
Hunk #2 succeeded at 274 (offset 8 lines).
patching file libavcodec/avcodec.h
Reversed (or previously applied) patch detected! Assume -R? [n] y
Hunk #1 succeeded at 261 with fuzz 1 (offset 3 lines).
patching file libavcodec/Makefile
Hunk #1 succeeded at 65 (offset 2 lines).
patching file libavcodec/ac3enc.c
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file libavformat/wav.c
Reversed (or previously applied) patch detected! Assume -R? [n] y
sl1pkn07@SpinFlo:~/aplicaciones/mplayer-svn
is normal? (svn update on 06-10-07 01:45)
Jjeje007
6th October 2007, 12:22
is normal? (svn update on 06-10-07 01:45)
No, the patch apply fine :
Actualisé à la révision 24712.
cat eac3v2.patch | patch -p0 --dry-run
patching file libavcodec/ac3.c
patching file libavcodec/ac3.h
patching file libavcodec/ac3dec.c
patching file libavcodec/ac3dec.h
patching file libavcodec/ac3tab.c
patching file libavcodec/ac3tab.h
patching file libavcodec/eac3dec.c
patching file libavcodec/eac3.h
patching file libavcodec/aac_ac3_parser.c
Hunk #2 succeeded at 59 with fuzz 1.
patching file libavcodec/aac_ac3_parser.h
patching file libavcodec/aac_parser.c
patching file libavcodec/ac3_parser.c
patching file libavcodec/allcodecs.c
Hunk #1 succeeded at 179 (offset 7 lines).
Hunk #2 succeeded at 275 (offset 8 lines).
patching file libavcodec/avcodec.h
Hunk #1 succeeded at 261 (offset 3 lines).
patching file libavcodec/Makefile
Hunk #1 succeeded at 65 (offset 2 lines).
patching file libavcodec/ac3enc.c
patching file libavformat/wav.c
Just try with my command :
cat eac3v2.patch | patch -p0 --dry-run
And always, always try first with --dry-run option :p
Jjeje007
sl1pkn07
6th October 2007, 17:29
remove libavcodec folder and run svn update
the patch file works
thanks
Mc Onyx
7th October 2007, 20:58
So if libavcodec can be updated with the E-AC3 patch, why doesn't somebody make a ffdshow build with E-AC3 decoding?
Kurtnoise
8th October 2007, 10:16
please, post your ffdshow request in the right place...
Mc Onyx
8th October 2007, 18:56
please, post your ffdshow request in the right place...
yep, sorry. :o
ThaFresh
12th October 2007, 19:26
I'm a little confused why everyone seems to be playing around with nero directshow filters still when this appears to decode e-ac3 100%, am I missing something?
madshi
13th October 2007, 09:20
I'm a little confused why everyone seems to be playing around with nero directshow filters still when this appears to decode e-ac3 100%, am I missing something?
Three reasons:
(1) This open source code is brand new, while the Nero DirectShow filter has been around for quite a while.
(2) There's no DirectShow filter yet based on this code.
(3) The Nero decoder is using Dolby's reference code. I'm not sure what that means practically. Maybe decoding quality could be ever so slightly higher in quality? Or maybe not. But at least the Dolby reference code should be very stable/reliable.
This open source E-AC3 decoder is greatly welcome, in any case. And I think everybody who "plays around" with Nero's decoder will sooner or later also (or instead) make use of this new open source decoder. It might just take a while.
qubic
14th October 2007, 11:44
Hi
I've patched and installed mplayer and get this problem (on linux):
if I run this:
mplayer -demuxer lavf -fps 30000/1001 -ac ffeac3 FEATURE_1.EVO
I get this:
--snip--
Forced audio codec: ffeac3
Cannot find codec for audio format 0x2000.
--snip--
I then update the codec.conf. format from 0x0 to 0x2000
then I get this:
--snip--
Forced audio codec: ffeac3
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 192000 + 65536 = 257536 bytes for output buffer.
FFmpeg's libavcodec audio codec
Cannot find codec 'E-AC3' in libavcodec...
ADecoder init failed :(
ADecoder init failed :(
Cannot find codec for audio format 0x2000.
--snip--
Does anyone see what I'm doing wrong?
UPDATE::
I get this, after "./configure"
--snip--
Enabled optional drivers:
Input: ftp pvr tv-teletext tv-v4l2 tv-v4l tv libdvdcss(internal) dvdread(internal) vcd dvb network
Codecs: libavcodec real xanim faad2 libmpeg2 liba52 mp3lib tremor(internal) gif
Audio output: alsa esd oss v4l2 sdl mpegpes(dvb)
Video output: v4l2 sdl gif89a pnm jpeg png mpegpes(dvb) fbdev xvidix cvidix opengl dga xv x11 xover md5sum tga
Audio filters:
Disabled optional drivers:
Input: dvdnav vstream radio tv-dshow live555 nemesi cddb cdda smb
Codecs: x264 xvid libdv libamr_wb libamr_nb qtx win32 faac musepack libdca libtheora speex toolame twolame libmad liblzo
Audio output: sun openal jack polyp arts ivtv dxr2 nas
Video output: ivtv dxr3 dxr2 vesa zr zr2 svga caca aa ggi xmga mga winvidix 3dfx xvmc dfbmga directfb bl xvr100 tdfx_vid s3fb tdfxfb
Audio filters: ladspa
--snip--
should eac3 be among them? And if I try to do "--disable-liba52", I get a compile error?!
regards qubic
UPDATE: MPlayer dev-SVN-r24775-4.1.2
Jjeje007
17th October 2007, 18:44
Hi,
"Normaly" you don't have to enable something specific, since this is a part of libavcodec and mplayer will "make all" in libavcodec.
I don't have to disable liba52 to get eac3 decoder to work
I then update the codec.conf. format from 0x0 to 0x2000
This is NOT good, here is the stuff you have to add in 'codec.conf' :
audiocodec ffeac3
info "FFmpeg EAC3"
status buggy
format 0x0
driver ffmpeg
dll "E-AC3"
:: Edit ::
To see if you have ffeac3 "enable", just try this command :
mplayer -ac help | grep ffeac3
And you should see this :
ffeac3 ffmpeg problems FFmpeg EAC3 [E-AC3]
Jjeje007
qubic
17th October 2007, 23:19
thanks Jjeje007.
it is enabled. Got the same output.
regards qub
whurlston
22nd October 2007, 18:41
Thanks !
Here is the patch for mplayer (apply and compile ok, tested today) :
http://www.db-instable.org/misc/eac3v2.patch
I included all your mod, tebasuna51
Jjeje007Has anyone compiled a Windows mplayer with this patch?
Coolpplse
26th October 2007, 02:29
Funnily 16bit FLAC is comparable in file size to 1,5Mbps E-AC3/DTS. So for 16bit audio tracks I see no sense in using lossy compression. However, as soon as you go above 16bit, lossless compression loses efficiency.
This is most likely why many people in the industry call 1536kbps EAC3 and DTS as being perceptually lossless as even lossless audio falls into these rates...
madshi
26th October 2007, 09:41
This is most likely why many people in the industry call 1536kbps EAC3 and DTS as being perceptually lossless as even lossless audio falls into these rates...
Yep. I shouldn't come as a shock to see a lossy codec get near to lossless quality if bitrates are identical... :) That said, 24bit lossless tracks have about 2x higher bitrate.
qubic
12th November 2007, 20:46
Hi
Any new patch for v. 25030?
I get this error:
Hunk #1 FAILED at 269.
1 out of 1 hunk FAILED -- saving rejects to file libavcodec/avcodec.h.rej
regards qub
qubic
12th November 2007, 20:48
Anyone has a link to a movie clip, with EAC3 sound?
regards qub
TomZ
13th November 2007, 16:22
http://www.db-instable.org/samples/sample-matrix2.evo
Jjeje007
14th November 2007, 23:47
Hi,
Hi
Any new patch for v. 25030?
I get this error:
Hunk #1 FAILED at 269.
1 out of 1 hunk FAILED -- saving rejects to file libavcodec/avcodec.h.rej
regards qub
Apply ok with rev 25053 :
cat eac3v2.patch | patch -p0 --dry-run
patching file libavcodec/ac3.c
patching file libavcodec/ac3.h
patching file libavcodec/ac3dec.c
patching file libavcodec/ac3dec.h
patching file libavcodec/ac3tab.c
patching file libavcodec/ac3tab.h
Hunk #2 succeeded at 40 with fuzz 2.
patching file libavcodec/eac3dec.c
patching file libavcodec/eac3.h
patching file libavcodec/aac_ac3_parser.c
Hunk #1 succeeded at 50 with fuzz 2 (offset 2 lines).
Hunk #2 succeeded at 61 with fuzz 1 (offset 2 lines).
patching file libavcodec/aac_ac3_parser.h
patching file libavcodec/aac_parser.c
patching file libavcodec/ac3_parser.c
Hunk #3 succeeded at 159 (offset 3 lines).
patching file libavcodec/allcodecs.c
Hunk #1 succeeded at 178 with fuzz 1 (offset 6 lines).
Hunk #2 succeeded at 285 (offset 18 lines).
patching file libavcodec/avcodec.h
Hunk #1 succeeded at 268 (offset 10 lines).
patching file libavcodec/Makefile
Hunk #1 succeeded at 67 (offset 4 lines).
patching file libavcodec/ac3enc.c
patching file libavformat/wav.c
patch 2.5.9 :rolleyes:
Jjeje007
qubic
17th November 2007, 00:13
thanks. It was the eac3/mlp patch that did not work.
I took the matrix sample, and see what happends:
[root@dhcppc0 mplayer]# mplayer -demuxer lavf -fps 30000/1001 -ac ffeac3 -vid 1 -aid 2 ../Desktop/sample-matrix2.evo
MPlayer dev-SVN-r25059-4.1.2 (C) 2000-2007 MPlayer Team
CPU: AMD Sempron(tm) Processor 3400+ (Family: 15, Model: 44, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2
116 audio & 237 video codecs
Playing ../Desktop/sample-matrix2.evo.
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Video stream found, -vid 1
[lavf] Audio stream found, -aid 2
[lavf] Audio stream found, -aid 3
[lavf] Audio stream found, -aid 4
[lavf] Audio stream found, -aid 5
[lavf] Audio stream found, -aid 6
[lavf] Audio stream found, -aid 7
[lavf] Audio stream found, -aid 8
VIDEO: [WVC1] 720x480 0bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Requested video codec family [wmvvc1dmo] (vfm=dmo) not available.
Enable it at compilation.
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffvc1] vfm: ffmpeg (FFmpeg M$ WVC1)
==========================================================================
==========================================================================
Forced audio codec: ffeac3
Cannot find codec for audio format 0x2000.
Read DOCS/HTML/en/codecs.html!
Audio: no sound
FPS forced to be 29.970 (ftime: 0.033).
Starting playback...
VDec: vo config request - 720 x 480 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.36:1 - prescaling to correct movie aspect.
VO: [xv] 720x480 => 720x528 Planar YV12
No bind found for key 'c'.
V: 11.4 341/341 15% 5% 0.0% 0 0
MPlayer interrupted by signal 2 in module: sleep_timer
[root@dhcppc0 mplayer]# mplayer -demuxer lavf -fps 30000/1001 -ac ffeac3 -vid 1 -aid 6 ../Desktop/sample-matrix2.evo
MPlayer dev-SVN-r25059-4.1.2 (C) 2000-2007 MPlayer Team
CPU: AMD Sempron(tm) Processor 3400+ (Family: 15, Model: 44, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2
116 audio & 237 video codecs
Playing ../Desktop/sample-matrix2.evo.
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Video stream found, -vid 1
[lavf] Audio stream found, -aid 2
[lavf] Audio stream found, -aid 3
[lavf] Audio stream found, -aid 4
[lavf] Audio stream found, -aid 5
[lavf] Audio stream found, -aid 6
[lavf] Audio stream found, -aid 7
[lavf] Audio stream found, -aid 8
VIDEO: [WVC1] 720x480 0bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Requested video codec family [wmvvc1dmo] (vfm=dmo) not available.
Enable it at compilation.
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffvc1] vfm: ffmpeg (FFmpeg M$ WVC1)
==========================================================================
==========================================================================
Forced audio codec: ffeac3
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
Cannot find codec 'E-AC3' in libavcodec...
ADecoder init failed :(
ADecoder init failed :(
Cannot find codec for audio format 0x0.
Read DOCS/HTML/en/codecs.html!
Audio: no sound
FPS forced to be 29.970 (ftime: 0.033).
Starting playback...
VDec: vo config request - 720 x 480 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.36:1 - prescaling to correct movie aspect.
VO: [xv] 720x480 => 720x528 Planar YV12
V: 9.1 277/277 18% 6% 0.0% 0 0
Exiting... (Quit)
[root@dhcppc0 mplayer]#
why 2 different error messages?
regards qub
sl1pkn07
22nd November 2007, 23:39
same audio error
and:
sl1pkn07@SpinFlo:~/Desktop$ mplayer -demuxer lavf -fps 30000/1001 -ac ffeac3 -vid 1 -aid 3 sample-matrix2.evo
........
[E-AC3 @ 0xf04420]transient pre-noise processing NOT IMPLEMENTED 0
.......
same on audio track 4,
i'm supossed this is normal, Really?
Jjeje007
23rd November 2007, 17:23
Hi,
same audio error
and:
sl1pkn07@SpinFlo:~/Desktop$ mplayer -demuxer lavf -fps 30000/1001 -ac ffeac3 -vid 1 -aid 3 sample-matrix2.evo
........
[E-AC3 @ 0xf04420]transient pre-noise processing NOT IMPLEMENTED 0
.......
same on audio track 4,
i'm supossed this is normal, Really?
You can just skip this, the frame is decoded, don't worry
Jjeje007
tebasuna51
23rd November 2007, 18:49
same audio error
and:
sl1pkn07@SpinFlo:~/Desktop$ mplayer -demuxer lavf -fps 30000/1001 -ac ffeac3 -vid 1 -aid 3 sample-matrix2.evo
........
[E-AC3 @ 0xf04420]transient pre-noise processing NOT IMPLEMENTED 0
.......
same on audio track 4,
i'm supossed this is normal, Really?
These frames aren't supported by the free decoder, I make a patch to be decoded like normal ones (http://forum.doom9.org/showthread.php?p=1048138#post1048138) to preserve the sync, but the message is send to remember than this is a unfinished decoder.
Blue_MiSfit
23rd November 2007, 20:54
Is it possible to use elementary streams as a source? For example, a DDP file demuxed from an EVO?
I only ask because it's troublesome to take two EVOs and join them before processing.
It would be very nice if this could be a free replacement for eac3to's reliance on Nero's payware DirectShow filters.
~MiSfit
madshi
23rd November 2007, 22:08
Last time I checked the ffmpeg E-AC3 decoder it gave out slightly distorted sound for me. So IMHO it's too early to replace Nero's E-AC3 decoder right now. However, the next eac3to version will include the ffmpeg TrueHD/MLP decoder which seems to work well.
madshi
23rd November 2007, 22:40
Just released the latest eac3to version with experimental support for libav/ffmpeg TrueHD and E-AC3 decoding. Download link and more details see eac3to thread.
Blue_MiSfit
24th November 2007, 00:09
interesting! I hope this decoder matures a bit. It would be a VERY clean solution to have this all integrated into a single app!
~MiSfit
nightcity
3rd December 2007, 00:10
I added Kurtnoise's eac3 code into ffdshow on my pc, it works, but there is noise in left channel, the other 4 channels are all ok(I tested it on 2 HD-DVD discs), does any one has any idea with the problem?
Jjeje007
3rd December 2007, 19:41
Hi,
Here is the new eac3 patch which compil and hopefully work (hope i don't mess something) fine with the latest mplayer's svn :
http://www.db-instable.org/misc/eac3v3.patch
Jjeje007
sl1pkn07
3rd December 2007, 23:39
thanks!
sl1pkn07@SpinFlo:~/aplicaciones/mplayer-svn$ cat eac3v3.patch | patch -p0 --dry-run
patching file libavcodec/ac3.c
patching file libavcodec/ac3.h
patching file libavcodec/ac3dec.c
patching file libavcodec/ac3dec.h
patching file libavcodec/ac3tab.c
patching file libavcodec/ac3tab.h
Hunk #2 succeeded at 40 with fuzz 2.
patching file libavcodec/eac3dec.c
patching file libavcodec/eac3.h
patching file libavcodec/aac_ac3_parser.c
Hunk #1 succeeded at 50 with fuzz 2 (offset 2 lines).
Hunk #2 succeeded at 61 with fuzz 1 (offset 2 lines).
patching file libavcodec/aac_ac3_parser.h
patching file libavcodec/aac_parser.c
patching file libavcodec/ac3_parser.c
Hunk #3 succeeded at 159 (offset 3 lines).
patching file libavcodec/allcodecs.c
Hunk #1 succeeded at 178 with fuzz 1 (offset 6 lines).
Hunk #2 succeeded at 286 (offset 19 lines).
patching file libavcodec/avcodec.h
Hunk #1 succeeded at 269 (offset 11 lines).
patching file libavcodec/Makefile
Hunk #1 succeeded at 67 (offset 4 lines).
patching file libavcodec/ac3enc.c
patching file libavformat/wav.c
Reversed (or previously applied) patch detected! Assume -R? [n] y
sl1pkn07@SpinFlo:~/aplicaciones/mplayer-svn$
its normal?
Jjeje007
4th December 2007, 17:07
Hi,
I just modify the patch for the ac3dec.c file which was changed.
So, you should remove your "mplayer-svn" folder and do an clean checkout.
Jjeje007
Kurtnoise
5th December 2007, 16:13
I added Kurtnoise's eac3 code into ffdshow on my pc, it works, but there is noise in left channel, the other 4 channels are all ok(I tested it on 2 HD-DVD discs), does any one has any idea with the problem?
it's not my code...:) You should contact the developper who has coded this part. Check the headers of the files, there is a mail I believe.
anyway, I'll be interested by your ffdshow patch...:p
clsid
5th December 2007, 16:47
Yep, that ffdshow patch would be interesting for those who don't use mplayer.
Mc Onyx
5th December 2007, 18:11
Yep, that ffdshow patch would be interesting for those who don't use mplayer.
+1 :)
Jjeje007
11th December 2007, 18:52
Hi,
Here is the updated patch which compil ok against the latest mplayer svn
http://www.db-instable.org/misc/eac3v4.patch
Jjeje007
skygod
12th December 2007, 04:01
Here is the updated patch which compil ok against the latest mplayer svn
http://www.db-instable.org/misc/eac3v4.patch
Jjeje007
Thanks a million :thanks: Both patch apply and mplayer compile was clean. Quick 'n dirty 2channel downmix testing on "sample-matrix2.evo" worked.
Jjeje007
13th December 2007, 02:20
Hi,
Just to let we know, i removed all the hacks regarding channel mapping done by tebasuna51. It look like that the devs started to rearrange channel mapping output in mplayer (i just check the log quickly).
Any way, the others hacks :
- Dialog Normalization attenuation disabled
- Dynamic Range Compression disabled
- Frames with "transient pre-noise processing" accepted and no more error (remove the fprint :D)
Are always done :rolleyes:
Jjeje007
jruggle
14th December 2007, 03:26
Hi,
Any way, the others hacks :
- Dialog Normalization attenuation disabled
- Dynamic Range Compression disabled
- Frames with "transient pre-noise processing" accepted and no more error (remove the fprint :D)
Do you have any E-AC3 samples which use transient pre-noise processing? If so, could you send a small snippet to ftp://upload.mplayerhq.hu/MPlayer/incoming ? It would help in implementing the missing feature.
Thanks,
Justin
madshi
14th December 2007, 09:13
@Justin, is there a central place somewhere where we can always get the latest version of the E-AC3 decoder patches? That would be very helpful, as long as the decoder is not in the ffmpeg source tree yet. Thanks!
tebasuna51
14th December 2007, 09:53
Do you have any E-AC3 samples which use transient pre-noise processing? If so, could you send a small snippet to ftp://upload.mplayerhq.hu/MPlayer/incoming ? It would help in implementing the missing feature.
I use the sample-matrix2.evo from this Jjeje007 post (http://forum.doom9.org/showthread.php?p=1047681#post1047681)
jruggle
14th December 2007, 23:24
@Justin, is there a central place somewhere where we can always get the latest version of the E-AC3 decoder patches? That would be very helpful, as long as the decoder is not in the ffmpeg source tree yet. Thanks!
svn://svn.mplayerhq.hu/soc/eac3
I will routinely update it to current SVN until it is included in FFmpeg. Right now it's updated to work with FFmpeg-SVN r11200.
The checkout.sh script will always show what revision the patch should be applied against.
madshi
15th December 2007, 09:30
svn://svn.mplayerhq.hu/soc/eac3
I will routinely update it to current SVN until it is included in FFmpeg. Right now it's updated to work with FFmpeg-SVN r11200.
The checkout.sh script will always show what revision the patch should be applied against.
Great - thanks!
baudi
16th December 2007, 12:46
Could you implement a new functionality in ffmpeg_evo so that one can transform a DD+ or DTS-HD track inside an .EVO file applying PAL speedup (from 24fps to 25fps) over the target sound file on the fly?
Similar to eac3to.exe -speedup parameter.
Thanks.
jruggle
16th December 2007, 16:42
Any way, the others hacks :
- Dialog Normalization attenuation disabled
- Dynamic Range Compression disabled
I'm working on a fix for this for FFmpeg. Dynamic range compression will not be disabled because the specification requires that it not be ignored. But the user will be given the option to adjust how much to apply, from 0% to 100%.
As far as dialog normalization, it will not be applied in the decoder, but simply transmitted to the user level.
- Frames with "transient pre-noise processing" accepted and no more error (remove the fprint :D)
This one is now fixed in FFmpeg-SoC SVN.
Thanks,
Justin
madshi
18th December 2007, 17:18
Dynamic range compression will not be disabled because the specification requires that it not be ignored. But the user will be given the option to adjust how much to apply, from 0% to 100%.
How can my program (which uses avcodec.dll) switch DRC on/off? Is there an API/function for that?
As far as dialog normalization, it will not be applied in the decoder, but simply transmitted to the user level.
I've just checked the latest SVN of the E-AC3 decoder and the output level is too low compared to the reference decoder (Nero). Is this DRC? Can't really be dialnorm cause the track I was testing had dialnorm set to 0.
Thanks!
jruggle
19th December 2007, 00:04
How can my program (which uses avcodec.dll) switch DRC on/off? Is there an API/function for that?
Not yet. Although I am FFmpeg AC3 maintainer, adding a parameter to the public API adds changes to files which I do not maintain. My patch is currently pending review. It will probably be something like AVCodecContext->drc_scale with values of 0.0 to 1.0 to apply a percentage of DRC during decoding.
I've just checked the latest SVN of the E-AC3 decoder and the output level is too low compared to the reference decoder (Nero). Is this DRC? Can't really be dialnorm cause the track I was testing had dialnorm set to 0.
It's probably the DRC. I hope it's the DRC. :) Are you referring to 5.1 decoding, stereo, or both?
madshi
19th December 2007, 09:09
Not yet. Although I am FFmpeg AC3 maintainer, adding a parameter to the public API adds changes to files which I do not maintain. My patch is currently pending review. It will probably be something like AVCodecContext->drc_scale with values of 0.0 to 1.0 to apply a percentage of DRC during decoding.
Don't know how long "pending review" takes. But if it takes a bit longer, wouldn't it make sense to disable DRC temporarily - as long as there's no way to disable it manually? At least for my purposes (eac3to = audio transcoding) DRC is really bad. For transcoding I need the audio to be totally unprocessed.
Not yet. Although I am FFmpeg AC3 maintainer, adding a parameter to the public API adds changes to files which I do not maintain. My patch is currently pending review. It will probably be something like AVCodecContext->drc_scale with values of 0.0 to 1.0 to apply a percentage of DRC during decoding.
It's probably the DRC. I hope it's the DRC. :) Are you referring to 5.1 decoding, stereo, or both?
5.1 decoding. Didn't check anything else yet. If you want I can send you a WAV comparison sample between ffmpeg and Nero.
jruggle
19th December 2007, 12:24
Don't know how long "pending review" takes. But if it takes a bit longer, wouldn't it make sense to disable DRC temporarily - as long as there's no way to disable it manually? At least for my purposes (eac3to = audio transcoding) DRC is really bad. For transcoding I need the audio to be totally unprocessed.
It won't take long. and committing something temporarily is not an option. but I can throw together a quick patch that can be applied on top of the E-AC3 patch.
5.1 decoding. Didn't check anything else yet. If you want I can send you a WAV comparison sample between ffmpeg and Nero.
That would be helpful, yes.
madshi
19th December 2007, 12:35
It won't take long. and committing something temporarily is not an option. but I can throw together a quick patch that can be applied on top of the E-AC3 patch.
A quick patch would be welcome, but if your real DRC patch won't take long to be accepted then I could also wait. Thanks.
jruggle
20th December 2007, 00:54
A quick patch would be welcome, but if your real DRC patch won't take long to be accepted then I could also wait. Thanks.
Get a temporary patch here (http://forum.doom9.org/attachment.php?attachmentid=7899&stc=1&d=1198108057). This is for soc/eac3 SVN-r1607.
svn co svn://svn.mplayerhq.hu/soc/eac3 -r 1607
cd eac3
./checkout.sh
cd ffmpeg
patch -p0 <ffmpeg_eac3_drc_scale.patch.txt
./configure --enable-gpl
make
Then you can set the libavcodec or ffmpeg option, drc_scale, to 0.0 to disable DRC.
madshi
21st December 2007, 10:50
Thanks much for the DRC patch! :)
-------
Is it intentional that when using ffmpeg SVN plus E-AC3 soc SVN the AC3 decoder stops working?
C:\msys\local\bin>ffmpeg -i channeltest.ac3 test.wav
FFmpeg version SVN-r11260, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-shared --disable-static --enable-memalign-hack
libavutil version: 49.6.0
libavcodec version: 51.49.0
libavformat version: 52.2.0
built on Dec 18 2007 15:52:49, gcc: 4.2.1-sjlj (mingw32-2)
Input #0, ac3, from 'channeltest.ac3':
Duration: 00:01:00.0, bitrate: 448 kb/s
Stream #0.0: Audio: 0x0000, 48000 Hz, 5:1, 448 kb/s
Output #0, wav, to 'test.wav':
Stream #0.0: Audio: pcm_s16le, 48000 Hz, 5:1, 4608 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Unsupported codec (id=86020) for input stream #0.0
Another question: Is there any chance to support the "USE_HIGHPRECISION" or "CONFIG_AUDIO_NONSHORT" flag to support 32bit output? The new TrueHD/MLP decoder does that and it works just fine. I know that ffmpeg officially doesn't support anything other than 16bit audio yet. But offering a special switch like the TrueHD decoder does shouldn't harm, right?
Ok, I know, I'm getting gready... :o Sorry about that. But I thought asking wouldn't harm. You can still simply say "no", of course! ;)
jruggle
21st December 2007, 12:36
Is it intentional that when using ffmpeg SVN plus E-AC3 soc SVN the AC3 decoder stops working?
It works fine for me. Did you use "configure --enable-gpl" ?
Another question: Is there any chance to support the "USE_HIGHPRECISION" or "CONFIG_AUDIO_NONSHORT" flag to support 32bit output? ... You can still simply say "no", of course! ;)
No. :) FFmpeg doesn't support 32-bit because the API is currently setup for only 16-bit audio. The audio API will have to be changed to support other sample formats. This will happen eventually, just don't know when...
madshi
21st December 2007, 12:54
It works fine for me. Did you use "configure --enable-gpl" ?
Nope. Didn't know about that switch. Thank you... :)
No. :)
:D
FFmpeg doesn't support 32-bit because the API is currently setup for only 16-bit audio. The audio API will have to be changed to support other sample formats. This will happen eventually, just don't know when...
I see. So the TrueHD decoder optionally outputting 32bit is probably an extremely ugly hack then? Works just fine for my needs, though... <shrug>
jruggle
22nd December 2007, 00:08
I see. So the TrueHD decoder optionally outputting 32bit is probably an extremely ugly hack then? Works just fine for my needs, though... <shrug>
It's a hack, but it's not extremely ugly...it just won't work within FFmpeg, only in libavcodec. The function for audio decoding is:
int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, uint8_t *buf, int buf_size);
As you can see, the output samples are presumed to be an array of 16-bit signed integers. The MLP decoder just treats the output as a void * and then casts to either int16_t or int32_t depending on the source. This works just fine when using libavcodec alone because the user can look at AVCodecContext.sample_fmt to decide what to cast the array as.
But it's really supposed to be int16_t. And internally, FFmpeg assumes that is the case. The exception is an ugly hack within ffmpeg.c that allows for only raw pcm to be encoded using formats other than 16-bit.
The most likely fix to this will be to change the audio encoders and decoders to use an AVFrame instead of a sample array, which is how the video codecs work.
Anyway, that's probably more than you wanted to know...
madshi
22nd December 2007, 00:33
It's a hack, but it's not extremely ugly...it just won't work within FFmpeg, only in libavcodec. The function for audio decoding is:
int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, uint8_t *buf, int buf_size);
As you can see, the output samples are presumed to be an array of 16-bit signed integers. The MLP decoder just treats the output as a void * and then casts to either int16_t or int32_t depending on the source. This works just fine when using libavcodec alone because the user can look at AVCodecContext.sample_fmt to decide what to cast the array as.
But it's really supposed to be int16_t. And internally, FFmpeg assumes that is the case. The exception is an ugly hack within ffmpeg.c that allows for only raw pcm to be encoded using formats other than 16-bit.
The most likely fix to this will be to change the audio encoders and decoders to use an AVFrame instead of a sample array, which is how the video codecs work.
Anyway, that's probably more than you wanted to know...
No no, that's good to know. Thanks for the information!
Personally, I'm not really using ffmpeg, but only libavcodec. Because of that I just didn't see the problem. But now after reading your explanation I understand. Anyway, I've decided that the best solution for me is to just modify libavcodec for my needs. Wasn't difficult to do. Thankfully the (E-)AC3 decoder code is documented well... :)
jruggle
29th December 2007, 01:09
Update: current svn of both ffmpeg (r11346) and ffmpeg-soc-eac3 (r1677) ignore dialnorm and allow for scaling of drc using the "drc_scale" option.
Also, thanks to madshi, I now have a sample which uses enhanced coupling. So hopefully I will be able to get that feature working soon.
madshi
29th December 2007, 01:43
Sounds good, thanks... :)
LAj
30th December 2007, 12:24
Hi all,
after 5 days maybe it's better for you all I'll continue to not post in this forum being to the "Hall of Fame" of the forums.
I've compiled mplayer on Gentoo and finally I've seen my first HD-DVD.
:thanks:I've to thanks you a lot ...but now I'm ill so only go on with the first request :)
How to passthrough E-AC3 stream ?
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
[lavf] Audio stream found, -aid 2
[lavf] Audio stream found, -aid 3
[lavf] Audio stream found, -aid 4
VIDEO: [WVC1] 1920x1080 0bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Requested video codec family [wmvvc1dmo] (vfm=dmo) not available.
Enable it at compilation.
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffvc1] vfm: ffmpeg (FFmpeg WVC1)
==========================================================================
==========================================================================
Trying to force audio codec driver family hwac3...
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 6 ch, s16le, 640.0 kbit/13.89% (ratio: 80000->576000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
I know:
AC3 through S/PDIF 0x2000/0x74656E64 - -
DTS through S/PDIF 0x2001 - -
as reported here http://www.mplayerhq.hu/DOCS/codecs-status.html#ac
So, How to passthrough Uncompressed PCM?
Why AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
if iec958 is unmuted and selected as output device?
I think it can be passthrough at this level also.
P.S.: please correct my bed English :)
madshi
30th December 2007, 12:55
I now have a sample which uses enhanced coupling. So hopefully I will be able to get that feature working soon.
Just for my interest: Is enhanced coupling the last missing feature in the E-AC3 decoder? In other words: Will the decoder be "complete" when you get enhanced coupling to work? Or are there any other features you still need samples for?
Thnx.
jruggle
30th December 2007, 17:18
Just for my interest: Is enhanced coupling the last missing feature in the E-AC3 decoder? In other words: Will the decoder be "complete" when you get enhanced coupling to work? Or are there any other features you still need samples for?
Well, not quite. Here is the current TODO list:
http://svn.mplayerhq.hu/soc/eac3/TODO?view=co
madshi
30th December 2007, 20:16
Well, not quite. Here is the current TODO list:
http://svn.mplayerhq.hu/soc/eac3/TODO?view=co
Thanks!
jruggle
1st January 2008, 23:26
Just for my interest: Is enhanced coupling the last missing feature in the E-AC3 decoder? In other words: Will the decoder be "complete" when you get enhanced coupling to work? Or are there any other features you still need samples for?
Update: I still need a sample for enhanced coupling. It turns out that the sample I had did not use enhanced coupling...it was just a bug in the decoder.
So basically, I need samples for enhanced coupling, spectral extension, and dependent streams (i.e. 7.1-channel). More samples with AHT would be nice too since I only have 1 right now.
nautilus7
2nd January 2008, 01:02
How we non-programmers can find out if an e-ac3 track is what you need?
jruggle
2nd January 2008, 01:11
How we non-programmers can find out if an e-ac3 track is what you need?
If you try to play it with the latest version of the FFmpeg E-AC3 decoder, it will spit out a long error message about how we need samples.
nautilus7
2nd January 2008, 01:56
Ok, i see. I'll check some of my tracks on weekend.
madshi
2nd January 2008, 09:38
Update: I still need a sample for enhanced coupling. It turns out that the sample I had did not use enhanced coupling...it was just a bug in the decoder.
So basically, I need samples for enhanced coupling, spectral extension, and dependent streams (i.e. 7.1-channel). More samples with AHT would be nice too since I only have 1 right now.
Is the decoder bug fixed in SVN? Probably it would make sense if I updated eac3to with the latest SVN and asked eac3to users to run their eac3 tracks through eac3to to find useful samples?
I don't think there is any way to get a "dependent streams" sample today. Isn't this only used for Blu-Ray E-AC3 tracks? I'm not aware of any Blu-Ray disc with E-AC3. Also I'm not aware of any HD DVD disc with an E-AC3 track with 7.1, unfortunately.
What is "AHT"? Hopefully the decoder outputs a "sample warning" message for AHT, too, so that the eac3to users will know when to send a sample?
jruggle
2nd January 2008, 12:20
Is the decoder bug fixed in SVN? Probably it would make sense if I updated eac3to with the latest SVN and asked eac3to users to run their eac3 tracks through eac3to to find useful samples?
One bug fixed, but still buggy for AHT (see below). One problematic thing is that it is hard to tell whether the error message is due to a bug or if it really has the advanced feature until I dig into it quite thoroughly. So basically I just need samples which give error messages and I'll try to figure it out from there.
What is "AHT"? Hopefully the decoder outputs a "sample warning" message for AHT, too, so that the eac3to users will know when to send a sample?
It is the Adaptive Hybrid Transform. Essentially, this is one of the biggest features in E-AC3. It does a DCT (type 2 I think) on all 6 blocks, then uses completely different quantization for the mantissas (Gain Adaptive Quantization and Vector Quantization). I only have 2 samples currently which use this. One is a mono track which decodes perfectly. The other is a 5.1 track which is buggy.
The decoder does not currently give any kind of indication of whether the E-AC3 stream uses AHT. Later today I'll add some debugging printouts which tell what features are being used.
madshi
2nd January 2008, 12:51
It is the Adaptive Hybrid Transform. Essentially, this is one of the biggest features in E-AC3. It does a DCT (type 2 I think) on all 6 blocks, then uses completely different quantization for the mantissas (Gain Adaptive Quantization and Vector Quantization). I only have 2 samples currently which use this. One is a mono track which decodes perfectly. The other is a 5.1 track which is buggy.
The decoder does not currently give any kind of indication of whether the E-AC3 stream uses AHT. Later today I'll add some debugging printouts which tell what features are being used.
Maybe you could output the usual "please send a sample" text whenever the decoder finds AHT? Of course only temporarily as long as you have enough samples with AHT. Afterwards you could remove that output. That would make it easier for us to collect samples.
madshi
4th January 2008, 12:14
@Justin,
just tried the latest eac3 svn and the sample I uploaded is still reported as "enhanced coupling" and fails to decode. Now I'm wondering: Should I wait for a new svn before asking the "eac3to" users to look for samples? I'm fearing that with the current svn we might get lots of such "enhanced coupling" samples which are not really enhanced coupling, but just cause the decoder to stumble. What do you think?
Btw, I noticed that you already merged some parts of the AC3/E-AC3 decoders. That's nice! :)
jruggle
4th January 2008, 18:24
@Justin,
just tried the latest eac3 svn and the sample I uploaded is still reported as "enhanced coupling" and fails to decode. Now I'm wondering: Should I wait for a new svn before asking the "eac3to" users to look for samples? I'm fearing that with the current svn we might get lots of such "enhanced coupling" samples which are not really enhanced coupling, but just cause the decoder to stumble. What do you think?
Well, there is no way to tell right away whether a sample really uses enhanced coupling. I have to basically isolate the frame and study it using debugging output. I still would love to have any samples which report errors. If it gets to the point where I am getting too many samples, I'll shout. But for now anything that will help improve the decoder is a good thing, whether it be to implement a new feature or fix bugs.
Btw, I noticed that you already merged some parts of the AC3/E-AC3 decoders. That's nice! :)
Thanks. I'm really hoping to finish up this weekend and get the decoder into main FFmpeg SVN.
madshi
4th January 2008, 18:44
Well, there is no way to tell right away whether a sample really uses enhanced coupling. I have to basically isolate the frame and study it using debugging output. I still would love to have any samples which report errors. If it gets to the point where I am getting too many samples, I'll shout. But for now anything that will help improve the decoder is a good thing, whether it be to implement a new feature or fix bugs.
Ok. Prepare to get a bunch of samples then... :)
Thanks. I'm really hoping to finish up this weekend and get the decoder into main FFmpeg SVN.
That would be great!
jruggle
8th January 2008, 06:13
just tried the latest eac3 svn and the sample I uploaded is still reported as "enhanced coupling" and fails to decode.
fixed. :) and unfortunately it really doesn't use enhanced coupling...
uberjay
10th January 2008, 22:50
Hey everyone. I spent quite some time playing around with the EAC3 patches and mplayer. I have been trying to play King Kong (from an HD-DVD, using the XBox 360 HD-DVD drive), but haven't been able to play 5.1 audio over S/PDIF.
As I understand it, S/PDIF is not high enough bitrate to directly pass through the EAC3 audio, so some transcoding is required. (am I off base here?) Should I be able to use something like mplayer's ac3 encoder audio filter to do what I want?
When I play the video files using mplayer+eac3 patches, I get only stereo audio output. Using ffmpeg to extract/transcode the eac3 audio to ac3, and then playing the resulting file works perfectly, but I'm trying to figure out how to do this all in real time.
I tried:
mplayer -channels 6 -af lavcac3enc=1 -demuxer lavf -ac ffeac3 -fps 24000/1001 <filename> -aid <streamid>
and mplayer segfaulted. Perhaps I ought to send a backtrace to the mplayer team, but I thought I'd check first if this is the right strategy to be using.
Thanks in advance for any help!
(EDIT: not sure if it helps any, but I get the exact same behavior with the TrueHD/MLP decode patch--only stereo output, and a segfault when trying to re-encode to 6 channel ac3...)
skygod
12th January 2008, 06:04
As I understand it, S/PDIF is not high enough bitrate to directly pass through the EAC3 audio, so some transcoding is required. (am I off base here?)
Yes and me too. The new audio formats require way more bandwidth than spdif. I'm considering getting an a USB sound card with individual 5.1 output - I have an old receiver without HDMI. 1080 is already asking alot (too much) from my system.
rack04
14th January 2008, 16:14
Where can i download the latest ffmpeg with latest patches?
uberjay
15th January 2008, 21:27
Yes and me too. The new audio formats require way more bandwidth than spdif. I'm considering getting an a USB sound card with individual 5.1 output - I have an old receiver without HDMI. 1080 is already asking alot (too much) from my system.
Yup. I finally broke down and hooked up the analog cables from my HTPC to my receiver's external inputs. It makes me sad to have this fancy receiver, and not use its decoders, but with this setup at least I can enjoy the higher bitrate audio formats. :)
Jjeje007
16th January 2008, 11:30
Hi,
Here is the updated eac3 patch which apply and compil fine against the latest mplayer svn revision :
http://www.db-instable.org/misc/eac3v5.patch
See you,
Jjeje007
qubic
17th January 2008, 07:22
Hi
I patched an updated svn mplayer build, with the new v5 patch. Everything is ok, but I still have problems with no EAC3 sound.
I have come to the conclusion that I also need an updated and patched ffmpeg.
I'm running Fedora 7.
is this correct?
regards qub
Space Hopper
17th January 2008, 18:46
Where can i download the latest ffmpeg with latest patches?
+1
Need a win32 build in order to fix the pre-noice processing issues mentioned before.
uberjay
18th January 2008, 00:13
Hi
I patched an updated svn mplayer build, with the new v5 patch. Everything is ok, but I still have problems with no EAC3 sound.
I have come to the conclusion that I also need an updated and patched ffmpeg.
I'm running Fedora 7.
is this correct?
regards qub
That's not correct. mplayer's svn includes the ffmpeg svn sources. This eac3 patch is an ffmpeg patch, but you can apply it to both straight ffmpeg or the ffmpeg contained within mplayer.
What command are you using to play the video file, and what does the output look like if you add a -v?
qubic
18th January 2008, 06:21
This is 12Monkeys, with english and french DD+ soundtrack, plus a commentary DD track.
What command can tell me which is which and what format?
That's not correct. mplayer's svn includes the ffmpeg svn sources. This eac3 patch is an ffmpeg patch, but you can apply it to both straight ffmpeg or the ffmpeg contained within mplayer.
What command are you using to play the video file, and what does the output look like if you add a -v?
[root@dhcppc0 HVDVD_TS]# mplayer -demuxer -lavf -ac ffeac3 PEVOB_1.EVO -v
MPlayer dev-SVN-r25774-4.1.2 (C) 2000-2008 MPlayer Team
CPU: AMD Sempron(tm) Processor 3400+ (Family: 15, Model: 44, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2
get_path('codecs.conf') -> '/root/.mplayer/codecs.conf'
Reading /root/.mplayer/codecs.conf: 116 audio & 237 video codecs
Configuration: --prefix=/usr
CommandLine: '-demuxer' '-lavf' '-ac' 'ffeac3' 'PEVOB_1.EVO' '-v'
init_freetype
get_path('font/font.desc') -> '/root/.mplayer/font/font.desc'
font: can't open file: /root/.mplayer/font/font.desc
font: can't open file: /usr/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/root/.mplayer/fonts'
Using nanosleep() timing
get_path('input.conf') -> '/root/.mplayer/input.conf'
Can't open input config file /root/.mplayer/input.conf: No such file or directory
Can't open input config file /usr/etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
get_path('PEVOB_1.EVO.conf') -> '/root/.mplayer/PEVOB_1.EVO.conf'
Playing PEVOB_1.EVO.
get_path('sub/') -> '/root/.mplayer/sub/'
[file] File size is 13372688384 bytes
STREAM: [file] PEVOB_1.EVO
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
-demuxer -lavf does not exist.
LAVF_check: MPEG PS format
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for NuppelVideo
Checking for REAL
Checking for SMJPEG
Checking for Nullsoft Streaming Video
Checking for MOV
Checking for VIVO
header block 1 size: 0
Checking for PVA
Checking for MPEG-TS...
TRIED UP TO POSITION 65726, FOUND 47, packet_size= 0, SEEMS A TS? 0
Checking for LMLM4 Stream Format
Invalid packet in LMLM4 stream: ch=0 size=1140851704
LMLM4 Stream Format not found
system stream synced at 0xD (13)!
==> Found video stream: 85
==> Found audio stream: 192
==> Found audio stream: 194
==> Found audio stream: 193
MPEG-PS file format detected.
Searching for VC1 sequence header... found
VIDEO: VC-1 1920x1080, 29.970 fps, header len: 36
[V] filefmt:2 fourcc:0x31435657 size:1920x1080 fps:29.97 ftime:=0.0334
get_path('sub/') -> '/root/.mplayer/sub/'
X11 opening display: :0.0
vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1280x1024 with depth 24 and 32 bpp (":0.0" => local display)
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Current fstype setting honours FULLSCREEN ABOVE BELOW X atoms
[xv common] Drawing no colorkey.
[xv common] Maximum source image dimensions: 2046x2046
==========================================================================
Requested video codec family [wmvvc1dmo] (vfm=dmo) not available.
Enable it at compilation.
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[vc1 @ 0xdf9f40]Header: DBFE3BF2
[vc1 @ 0xdf9f40]Advanced Profile level 3:
frmrtq_postproc=7, bitrtq_postproc=31
LoopFilter=0, ChromaFormat=1, Pulldown=1, Interlace: 1
TFCTRflag=0, FINTERPflag=0
[vc1 @ 0xdf9f40]Display extended info:
[vc1 @ 0xdf9f40]Display dimensions: 1920x1080
[vc1 @ 0xdf9f40]Entry point: 5ADFFCEF
[vc1 @ 0xdf9f40]Entry point info:
BrokenLink=0, ClosedEntry=1, PanscanFlag=0
RefDist=1, Postproc=1, FastUVMC=0, ExtMV=1
DQuant=1, VSTransform=1, Overlap=0, Qmode=3
INFO: libavcodec init OK!
Selected video codec: [ffvc1] vfm: ffmpeg (FFmpeg M$ WVC1)
==========================================================================
==========================================================================
Forced audio codec: ffeac3
Cannot find codec for audio format 0x2000.
Read DOCS/HTML/en/codecs.html!
Audio: no sound
Freeing 0 unused audio chunks.
Starting playback...
[vc1 @ 0xdf9f40]Entry point: 5ADFFCEF
[vc1 @ 0xdf9f40]Entry point info:
BrokenLink=0, ClosedEntry=1, PanscanFlag=0
RefDist=1, Postproc=1, FastUVMC=0, ExtMV=1
DQuant=1, VSTransform=1, Overlap=0, Qmode=3
[vc1 @ 0xdf9f40]ACPRED plane encoding: Imode: 5, Invert: 0
[vc1 @ 0xdf9f40]VOP DQuant info
[ffmpeg] aspect_ratio: 1.7777780 0
VDec: vo config request - 1920 x 1080 (preferred colorspace: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO Config (1920x1080->1920x1080,flags=0,'MPlayer',0x32315659)
VO: [xv] 1920x1080 => 1920x1080 Planar YV12
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel@goldbach.in-berlin.de> and others
[ASPECT] Warning: No suitable new res found!
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x59565955 (UYVY) packed
Xvideo image format: 0x30323449 (I420) planar
using Xvideo port 280 for hw scaling
[ASPECT] Warning: No suitable new res found!
[ASPECT] Warning: No suitable new res found!
[xv] dx: 0 dy: 0 dw: 1920 dh: 1080
*** [vo] Exporting mp_image_t, 1920x1080x12bpp YUV planar, 3110400 bytes
get_path('subfont.ttf') -> '/root/.mplayer/subfont.ttf'
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
[xv] dx: 5 dy: 24 dw: 1270 dh: 964
[vc1 @ 0xdf9f40]MB Direct Type plane encoding: Imode: 5, Invert: 0
[vc1 @ 0xdf9f40]MB Skip plane encoding: Imode: 5, Invert: 1
[vc1 @ 0xdf9f40]VOP DQuant info
[vc1 @ 0xdf9f40]MB Direct Type plane encoding: Imode: 5, Invert: 0
[vc1 @ 0xdf9f40]MB Skip plane encoding: Imode: 5, Invert: 1
[vc1 @ 0xdf9f40]VOP DQuant info
[vc1 @ 0xdf9f40]MB Direct Type plane encoding: Imode: 5, Invert: 0
[vc1 @ 0xdf9f40]MB Skip plane encoding: Imode: 5, Invert: 1
[vc1 @ 0xdf9f40]VOP DQuant info
[vc1 @ 0xdf9f40]MB Direct Type plane encoding: Imode: 5, Invert: 0
[vc1 @ 0xdf9f40]MB Skip plane encoding: Imode: 5, Invert: 1
[vc1 @ 0xdf9f40]VOP DQuant info
[vc1 @ 0xdf9f40]MB Direct Type plane encoding: Imode: 5, Invert: 0
[vc1 @ 0xdf9f40]MB Skip plane encoding: Imode: 5, Invert: 1
[vc1 @ 0xdf9f40]VOP DQuant info
[vc1 @ 0xdf9f40]MB Direct Type plane encoding: Imode: 5, Invert: 0
[vc1 @ 0xdf9f40]MB Skip plane encoding: Imode: 5, Invert: 1
[vc1 @ 0xdf9f40]VOP DQuant info
[vc1 @ 0xdf9f40]MB Direct Type plane encoding: Imode: 5, Invert: 0
[vc1 @ 0xdf9f40]MB Skip plane encoding: Imode: 5, Invert: 1
[vc1 @ 0xdf9f40]VOP DQuant info
[vc1 @ 0xdf9f40]Entry point: 1ADFFCEF
[vc1 @ 0xdf9f40]Entry point info:
BrokenLink=0, ClosedEntry=0, PanscanFlag=0
RefDist=1, Postproc=1, FastUVMC=0, ExtMV=1
DQuant=1, VSTransform=1, Overlap=0, Qmode=3
[vc1 @ 0xdf9f40]ACPRED plane encoding: Imode: 5, Invert: 0
[vc1 @ 0xdf9f40]VOP DQuant info
ctrl-c
/root/.mplayer/codecs.conf is also ok.
skygod
18th January 2008, 13:21
Also having the same trouble too. I'm pretty tired, have I forgotten something?
To answer the question: No quick way of finding out what's what, look at the available tracks and go through them one by one ( -aid x ). Curiously it's different for each feature file.
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
{ Checked out external at revision 11555 }
cd mplayer
wget http://www.db-instable.org/misc/eac3v5.patch
cat eac3v5.patch | patch -p0
{ it was clean }
echo '
audiocodec ffeac3
info "FFmpeg EAC3"
status buggy
format 0x0
driver ffmpeg
dll "E-AC3"
' >> etc/codecs.conf
./configure; make -j 2; make install
{ compiles clean }
mplayer -ac help | grep ffeac3
{ ffeac3 ffmpeg problems FFmpeg EAC3 [E-AC3] }
When I play
mplayer -aid 2 -quiet -demuxer lavf -vc ffvc1 -ac ffeac3 sample-matrix2.evo
MPlayer dev-SVN-r25781-4.1.2 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Core(TM)2 CPU T5600 @ 1.83GHz (Family: 6, Model: 15, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
Playing sample-matrix2.evo.
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Video stream found, -vid 1
[lavf] Audio stream found, -aid 2
[lavf] Audio stream found, -aid 3
[lavf] Audio stream found, -aid 4
[lavf] Audio stream found, -aid 5
[lavf] Audio stream found, -aid 6
[lavf] Audio stream found, -aid 7
[lavf] Audio stream found, -aid 8
VIDEO: [WVC1] 1920x1080 0bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Forced video codec: ffvc1
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffvc1] vfm: ffmpeg (FFmpeg WVC1)
==========================================================================
==========================================================================
Forced audio codec: ffeac3
Cannot find codec for audio format 0x2000.
jruggle
18th January 2008, 22:09
Forced audio codec: ffeac3
Cannot find codec for audio format 0x2000.
It is now just ffac3. The E-AC3 decoder was merged in with the AC3 decoder.
skygod
19th January 2008, 09:11
thanks for that, small things like that are tough to find! Working beatifully.
I documented the process in the Linux forum. http://forum.doom9.org/showthread.php?t=133901
qubic
21st January 2008, 14:33
It is now just ffac3. The E-AC3 decoder was merged in with the AC3 decoder.
Thanks alot. Now it's working fine.
I'm running a Sempron 3400, with 2gb ram.
I needed to start only the X server with "xinit" and do some framedropping. It looks and sounds really good.
regards qub
fenton06
25th January 2008, 02:18
It is now just ffac3. The E-AC3 decoder was merged in with the AC3 decoder.
Does that mean we no longer need to apply any patches? We just install the ffmpeg SVN and should be good to go?
Also, where is the codec.conf file that is supposed to be modified?
EDIT: Found the codec.conf...
EDIT EDIT: Still need to apply patch...
EDIT EDIT EDIT: I am experiencing MASSIVE audio syncing problems...any ideas? It gets worse and worse as the movie progresses...
liels
27th January 2008, 13:13
EDIT EDIT EDIT: I am experiencing MASSIVE audio syncing problems...any ideas? It gets worse and worse as the movie progresses...
Did you tell mplayer how many fps to use? Virtually all of the films want -fps 24000/1001
(I think ... are films shot at true 24fps if so, is the content on the discs 24000/1001?)
fenton06
28th January 2008, 07:57
yes...I did...it is 29.970 fps....but I will try to use that and see what happens...
EDIT: the 24001/1001 worked! Everything is working fantastically :D:D:D:D:D:D:D:D
fenton06
6th February 2008, 19:50
nevermind....
sl1pkn07
7th February 2008, 02:43
-none-
fenton06
21st February 2008, 21:29
ok, now when I am playing back files that previously worked flawlessly, they are now stuttering and I keep getting
pts value <= previous
I am using the latest mplayer svn, using the eac3v5.patch
any ideas?
madsend
26th February 2008, 03:45
Try using the option '-no-correct-pts' and see if that smooths out the video.
Using this option may cause A/V sync problems, but it may also get rid of the jerky pauses on playback.
sl1pkn07
26th February 2008, 16:08
http://svn.mplayerhq.hu/soc/eac3/ has been updated.
update eac3 decoder to work with ffmpeg-svn r12191
jruggle
26th February 2008, 17:56
http://svn.mplayerhq.hu/soc/eac3/ has been updated.
update eac3 decoder to work with ffmpeg-svn r12191
To be honest, I didn't do much to it. The window generation function moved to mdct.c so it needed to be removed from ac3dec.c. Also, I wanted to update it so I could continue doing real work to it and stay up-to-date with ffmpeg.
nautilus7
26th February 2008, 17:59
Any news when 7.1 ch e-ac3 decoding will be ready?
jruggle
26th February 2008, 19:19
Any news when 7.1 ch e-ac3 decoding will be ready?
not too long now. i first wanted to fix a major bug. I have fixed it now, but not applied it quite yet.
nautilus7
26th February 2008, 21:19
OK, thanks.
dustobub
27th February 2008, 04:44
Any idea on how to get an 8channel LPCM stream onto the HDMI audio out on chipsets that actually support true HDMI audio? What about the pure bitstream? Thanks.
Dustin
Update - The only currently available chipset that supports 8channel LPCM is the Intel G35. The upcoming Nvidia MCP7 series and Intel G45 will also support 8channel LPCM, however they say that they won't support Bit Stream passing.
jruggle
27th February 2008, 19:31
Any idea on how to get an 8channel LPCM stream onto the HDMI audio out on chipsets that actually support true HDMI audio? What about the pure bitstream? Thanks.
Dustin
Update - The only currently available chipset that supports 8channel LPCM is the Intel G35. The upcoming Nvidia MCP7 series and Intel G45 will also support 8channel LPCM, however they say that they won't support Bit Stream passing.
I don't see what this has to do with FFmpeg and E-AC3... Maybe you should post this in a different thread?
fenton06
28th February 2008, 03:53
is eac3 ready to be implemented without having to apply a patch yet?
jruggle
28th February 2008, 04:13
is eac3 ready to be implemented without having to apply a patch yet?
Ready? yes. Done? no. It's a matter of me finding the time to prepare all the patches (for FFmpeg inclusion it can't be just one big patch)...then getting them reviewed...then making any corrections. But I will find the time soon. The new Google Summer of Code process for '08 is starting already and I want to get this project from last year off the books, so to speak.
fenton06
28th February 2008, 08:24
aha...fantastic :D
Jjeje007
4th March 2008, 10:51
Hi,
I just update the eac3 patch :
http://www.db-instable.org/misc/eac3v6.patch
Jjeje007
sl1pkn07
5th March 2008, 00:56
thanks
fenton06
6th March 2008, 23:13
thanks:D
Gannjunior
15th March 2008, 19:36
hi,
i used ffmpeg preset in first page to do some encodes from eac3.
i did some different aac and ac3 encodes, 2ch and 6ch...but i noticed that the voice audio channel results very low...instead if i listen the source eac3 stream it is ok...is there any setting i have to use in ffmpeg?
thanks!
ciao
spooforbrains
15th March 2008, 20:25
Is there an update for this patch that will work with current SVN mplayer? Either that, or how do I check out a version of mplayer that is compatible with the latest released version of this patch?
Thanks!
Kurtnoise
16th March 2008, 14:11
I'll put online a fresh patch in a couple of hours...
http://kurtnoise.free.fr/index.php?dir=misc/&file=mplayer_eac3_mlp_r26256.patch
http://kurtnoise.free.fr/index.php?dir=misc/&file=ffmpeg_eac3_mlp_r12464.patch
spooforbrains
19th March 2008, 00:39
Patched, built, works for me. Thanks!
sl1pkn07
19th March 2008, 02:25
this patches, is for e-ac3? (svn.mplayerhq.hu/soc/eac). trueHD/mlp? or both...
your patches include http://www.db-instable.org/misc/eac3v6.patch? or it is another patch...
Kurtnoise
19th March 2008, 11:03
this patches, is for e-ac3? (svn.mplayerhq.hu/soc/eac). trueHD/mlp? or both...
both + a quick fix to enable the pipeline for the NeroAAC encoder.
sl1pkn07
19th March 2008, 14:00
thanks ;)
jruggle
19th March 2008, 17:44
Just to update everyone. Work on E-AC3 is ongoing. Right now the original author of the decoder from last year's Google Summer of Code is picking up most of the tasks required to get it finalized and into FFmpeg. Here are some details:
http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/2008-March/002742.html
fenton06
25th March 2008, 06:27
FYI the 3.6 patch is badly broken....
I will now try to compile w/o the patch and see if HD works w/o the patch...
EDIT: no dice with HD working on the compile w/o patch...
sl1pkn07
25th March 2008, 16:55
aps! i'm use Rev 26268 of mplayer. rev 26256 meke error with/without patches
kurtnoise: new patch for ffmpeg?¿ http://kurtnoise.free.fr/misc/ffmpeg_eac3_mlp_r12507.patch
Csoft
31st March 2008, 23:33
I am using r26256 with eac3 patch in Max OS X Leopard and it works great :) thanks alot...
However i had trouble watching HD Material with DTS-HD Master Audio (7.1)
(i have libdca installed dont know if it makes a difference)
I found a patch adding the id 0x86 to demux_ts.c however after some hours on google i found out that the DTS material uses 0x86 AND 0x85 as id's. Then there was sound :D
So changing ./libmpdemux/demux_ts.c to:
case 0x8A:
case 0x82:
case 0x85:
case 0x86:
pmt->es[idx].type = AUDIO_DTS;
break;
//Csoft
Gannjunior
2nd April 2008, 11:08
hi,
what about the very little "underground buzzer" occurs after a conversion from E-AC3 ?
happened only from E-ac3, converting both to aac and to ac3...
jruggle
2nd April 2008, 18:13
hi,
what about the very little "underground buzzer" occurs after a conversion from E-AC3 ?
happened only from E-ac3, converting both to aac and to ac3...
You're going to have to be much more specific... I don't have any issues with "buzzing" in the samples I have tested. Please give more information, and provide a sample if you can.
pchangover
2nd April 2008, 21:53
I think I know what Gannjunior is talking about. Whenever I try to encode e-ac3 to ac3 with ffmpeg (with e-ac3 support) I get an ac3 file with static in the left channel.
Here's my console output:
http://img187.imageshack.us/img187/5208/ffmpegvb2.jpg
And a sample:
http://www.mediafire.com/?1cyaxgj9mz0
jruggle
2nd April 2008, 22:48
I think I know what Gannjunior is talking about. Whenever I try to encode e-ac3 to ac3 with ffmpeg (with e-ac3 support) I get an ac3 file with static in the left channel.
And a sample:
http://www.mediafire.com/?1cyaxgj9mz0
Ok, well I definitely hear the noise, but I am not able to reproduce the problem. What I really need is the original E-AC3 so that I can diagnose what exactly is causing that output.
Also, that appears to be an older version of the decoder... The newest version does not distinguish between ac3 and e-ac3 in the console output. So please update to latest SVN and try to duplicate the problem. If you still get noise, I definitely would like a clip of the source EVO.
edit: by latest SVN, I mean latest from the mplayerhq/soc repository, then run the checkout script to automatically get the corresponding FFmpeg SVN version and patch it.
pchangover
3rd April 2008, 04:34
Ok. I tried to re-build ffmpeg from the latest SVN, but I think I'm missing something. Heres what I tried:
C:\Documents and Settings\Sean Turley>svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk/ ffmpegEAC3
Then I downloaded: http://kurtnoise.free.fr/misc/ffmpeg_eac3_mlp_r12588.patch
I copied it to the same directory
Applied the patch:
$ patch -p0 < ffmpeg_eac3_mlp_r12588.patch
Ran configure:
$ ./configure --enable-memalign-hack
Ran make:
make
then installed:
make install
When I try to use the newly built ffmpeg is doesn't have eac3 support. I know this is a n00b mistake but it's just easier to ask sometimes than to spend hours figuring it out on my own.
On a separate note, is there a way to trim an eac3 file? If so let me know so I can make you a sample.
:thanks:
jruggle
3rd April 2008, 04:52
Ok. I tried to re-build ffmpeg from the latest SVN, but I think I'm missing something. Heres what I tried:
It should be easier than that if you have msys installed.
svn co svn://svn.mplayerhq.hu/soc/eac3
cd eac3
./checkout.sh
cd ffmpeg
./configure --enable-gpl --enable-memalign-hack
make
Hope that helps.
jruggle
3rd April 2008, 04:59
On a separate note, is there a way to trim an eac3 file? If so let me know so I can make you a sample.
Honestly, I forget how to do that in Windows as-is. But I know you can download dd (http://www.nu2.nu/download.php?sFile=dd.zip) , which is the same program I use on Linux for that purpose. I don't know... msys may even come with dd already...
pchangover
3rd April 2008, 10:04
ATM I feel pretty dumb. I've been working feverishly to get eac-3 decoding to work in windows that I failed to realize that I could just restart and boot into Ubuntu and do it much more easily.
jruggle I initially tried your code in mingw, it didn't work, it just hung. Then the lightbulb turned on and I booted into Ubuntu. I installed svn and tried your code again. Worked like a jif. Now I'm encoding my .evo. If it doesn't work I'll post a sample for you.
Thanks for the help!
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.