Hello,
just done a small try to convert an Euro1080 FTA preview to mpeg4, with a bitrate of 2500 with mencoder : quality was very bad...
Anyone already converted (and keeping the resolution) HDTV with a perfect quality to mpeg4 ?
I would be interested in the parameters...
Am Montag, 28. März 2005 14:25 schrieb Grégoire Favre:
Hello,
just done a small try to convert an Euro1080 FTA preview to mpeg4, with a bitrate of 2500 with mencoder : quality was very bad...
Anyone already converted (and keeping the resolution) HDTV with a perfect quality to mpeg4 ?
I would be interested in the parameters...
Hello Grrégoire,
yes, I recorded Panic Room on Pro7 and tried to reencode it, because 14GB are far too large for DVD ;-) I used projectX to demux and correct the .vdr-Files, then video and audio are multiplexed again to a mpg-file. Afterwards I used ffmpeg to encode the film (in two passes): ffmpeg -i Inputfile.mpg -vcodec mpeg4 -pass 1 -passlogfile logfile -ac 2 -acodec mp3 -ab 128 -sameq -hq outfile.avi
All that was done with a small shellscript, which i originally made for converting short movies to divx. The resulting file is 6,5 GB in size, picture quality is perfect ("-sameq") but I experienced problems with audio (no sound after 1:05:00), with other tests I got unsynced audio with xine, synced audio with gmplayer ... That has to be tested further .. But back to your original question - with the above mentioned parameters for ffmpeg it should be fine. ffmpeg also could copy the audio: -acodec copy, that would reduce some of the problems I have ;-)
I hope this is helpful for you,
Regards,
Ulf
Hi Grégoire,
just done a small try to convert an Euro1080 FTA preview to mpeg4, with a bitrate of 2500 with mencoder : quality was very bad...
Anyone already converted (and keeping the resolution) HDTV with a perfect quality to mpeg4 ?
ROFL (sorry!). MPEG4 compression already sucks on normal TV. Doing that to a HDTV resolution should be outlawed ;o)))
Please don't misunderstand, but re-compressing (mpeg4) something that is already compressed (mpeg2) is ALWAYS going to give you miserable results. Doing the same to a high resolution picture is only going to make things worse.
A bitrate of 2500 isn't enough for standard quality TV. You'll need at least 3-5x that rate if you want to see the advantages of HDTV.
At the current stage of development, I never understood why mpeg4 is still around. CDs and DVDs are so cheap nowadays, there is no reason to give up quality for size.
Regards, Reinhard
Hello Ulf (and others),
I hope this is helpful for you,
Yes, thank you very much, I always used mencoder, but I have to try ffmpeg (specially with the -sameq option) !!!
On Monday 28 March 2005 14:06, Reinhard Walter Buchner wrote:
At the current stage of development, I never understood why mpeg4 is still around. CDs and DVDs are so cheap nowadays, there is no reason to give up quality for size.
You ask the financial department of the broadcasters :) If they can get away with paying for half the transponder capacity by broadcasting in MPEG4 instead of MPEG2 I think they will have a strong case =)
Cheers, Gavin.
On Mon, Mar 28, 2005 at 02:12:39PM +0100, Gavin Hamill wrote:
On Monday 28 March 2005 14:06, Reinhard Walter Buchner wrote:
At the current stage of development, I never understood why mpeg4 is still around. CDs and DVDs are so cheap nowadays, there is no reason to give up quality for size.
You ask the financial department of the broadcasters :) If they can get away with paying for half the transponder capacity by broadcasting in MPEG4 instead of MPEG2 I think they will have a strong case =)
EURO1080 is already going this direction: http://www.euro1080.tv/mpeg4.htm
Michael
Ulf Elsner schrieb:
I used projectX to demux and correct the .vdr-Files, then video and audio are multiplexed again to a mpg-file. Afterwards I used ffmpeg to encode the film (in two passes): ffmpeg -i Inputfile.mpg -vcodec mpeg4 -pass 1 -passlogfile logfile -ac 2 -acodec mp3 -ab 128 -sameq -hq outfile.avi
What kind of CPU do you have and how high is CPU usage. I was just playing around with xvid (I have no experience with it) an mencoder, but 1080i is not playable for me anymore. I have an Athlon XP@2.2GHz. The mpeg2 file is no problem though. I will try your setting, though.
Reinhard Walter Buchner wrote: ...
Anyone already converted (and keeping the resolution) HDTV with a perfect quality to mpeg4 ?
ROFL (sorry!). MPEG4 compression already sucks on normal TV. Doing that to a HDTV resolution should be outlawed ;o)))
Please don't misunderstand, but re-compressing (mpeg4) something that is already compressed (mpeg2) is ALWAYS going to give you miserable results. Doing the same to a high resolution picture is only going to make things worse.
I disagree, Reinhard. IMHO, Grégoire's question above is perfectly valid. Assuming that the thing must fit on one DVD, it has to be reduced in size and AFAIK, MPEG4 would be the way that loses the least amount of quality when doing that.
Carsten.
Hi guys,
On Monday 28 March 2005 14:06, Reinhard Walter Buchner wrote:
At the current stage of development, I never understood why mpeg4 is still around. CDs and DVDs are so cheap nowadays, there is no reason to give up quality for size.
You ask the financial department of the broadcasters :) If they can get away with paying for half the transponder capacity by broadcasting in MPEG4 instead of MPEG2 I think they will have a strong case =)
EURO1080 is already going this direction: http://www.euro1080.tv/mpeg4.htm
Uh, great. So HDTV is basically dead before it gets a head start in Europe. That's just fantastic. Well, at least now I know that I'm not going to buy one of their subscription packages. They probably expect their viwers to be watching their shows on 36 cm TVs ;o((. Sorry about the rant.
Regards, Reinhard
Hi Carsten,
going to give you miserable results. Doing the same to a high resolution picture is only going to make things worse.
I disagree, Reinhard. IMHO, Grégoire's question above is perfectly valid.
Oh, I wasn't questioning the validility of Grégoire's question.
It's just that >I< wouldn't give up quality for size. But then I watch my movies on a 315 cm diagonal ;o)) and MPEG2 artifacts are already bugging me.
Assuming that the thing must fit on one DVD, it has to be reduced in size
Sure, I understand that, but then I would span it across two DVDs. At the moment, we aren't talking about hundereds of movies in HDTV quality. Europe still has a LOOOONG way to go before that becomes reality (if it ever does).
and AFAIK, MPEG4 would be the way that loses the least amount of quality when doing that.
Sure, MPEG4 is the least lossy compression, but a compression is still a compression and it simply has to compromize quality. The problem is that video, unlike a text file, cannot be compressed to any reasonable size w/o losing one way or the other.
Regards, Reinhard
Am Montag, 28. März 2005 15:24 schrieb Prakash Punnoor:
What kind of CPU do you have and how high is CPU usage. I was just playing around with xvid (I have no experience with it) an mencoder, but 1080i is not playable for me anymore. I have an Athlon XP@2.2GHz. The mpeg2 file is no problem though. I will try your setting, though.
Hi Prakash,
well I've got an AMD Athlon64 3000+, CPU load during encoding is 100% ;-), while replaying I got different values with gmplayer (about 50 to 60%) and xine (100%, dropping frames, sometimes missing audio). With the original mpeg2-file (*.vdr), xine is able to play audio too, but CPU-load is similar. So far I don't know why xine is 'slower'. It's the first attempt to record and play HDTV-material.
Cheers,
Ulf
Ulf Elsner schrieb:
Am Montag, 28. März 2005 15:24 schrieb Prakash Punnoor:
What kind of CPU do you have and how high is CPU usage. I was just playing around with xvid (I have no experience with it) an mencoder, but 1080i is not playable for me anymore. I have an Athlon XP@2.2GHz. The mpeg2 file is no problem though. I will try your setting, though.
well I've got an AMD Athlon64 3000+, CPU load during encoding is 100% ;-), while replaying I got different values with gmplayer (about 50 to 60%) and xine (100%, dropping frames, sometimes missing audio). With the original mpeg2-file (*.vdr), xine is able to play audio too, but CPU-load is similar. So far I don't know why xine is 'slower'. It's the first attempt to record and play HDTV-material.
My observations are the same: xine needs a lot more CPU to play hd content. Nevertheless I fried your ffmpeg paramters and beside the need to patch fourcc for me, it is not better. Even worse: I suggest using xvid, as picture quality is worse with ffmpeg's codec for me.
Interesting that your athlon64 has so much more horses than my miserable xp - even though my XP should have a higher clock rate than your cpu. :-( Or are you hw accelerating your output? Ie I only have a geforce4 ti4200 which cannot do idct and even gets slower when doing mc.
Are using a 32 bit or 64 bit os?
Cheers
On Monday 28 March 2005 15:25, Grégoire Favre wrote:
just done a small try to convert an Euro1080 FTA preview to mpeg4, with a bitrate of 2500 with mencoder : quality was very bad...
2500 is barely enough for an svcd. You can't seriously expect that to be enough for 10 times the pixels, can you?
Anyone already converted (and keeping the resolution) HDTV with a perfect quality to mpeg4 ?
Perfect quality? mencoder -oac copy -ovc lavc -lavcopts \ vcodec=mpeg4:vqscale=2:keyint=1:autoaspect (:ilme:ildct ) input -o output
That'll make a big file though, probably bigger than the original, but it'll be pretty much as good as it can get. Of course it'll be worse than the original, lossy compression and everything. You probably wont notice. ilme:ildct is probably a good idea if the source is interlaced.
I'm not at all certain if mbd=2 and qns make any difference when encoding with constant quantizer. Qns takes way too much time anyway at that resolution so just forget about it.
Obviously this isn't very useful. It'd be a much better idea to specify an average bitrate and do a two or three pass encode. That way you can control how big the output file gets. Mplayer docs describe the process very well.
Prakash Punnoor schrieb:
Ulf Elsner schrieb:
Am Montag, 28. März 2005 15:24 schrieb Prakash Punnoor:
What kind of CPU do you have and how high is CPU usage. I was just playing around with xvid (I have no experience with it) an mencoder, but 1080i is not playable for me anymore. I have an Athlon XP@2.2GHz. The mpeg2 file is no problem though. I will try your setting, though.
well I've got an AMD Athlon64 3000+, CPU load during encoding is 100% ;-), while replaying I got different values with gmplayer (about 50 to 60%) and xine (100%, dropping frames, sometimes missing audio).
Interesting that your athlon64 has so much more horses than my miserable xp - even though my XP should have a higher clock rate than your cpu. :-( Or are you hw accelerating your output? Ie I only have a geforce4 ti4200 which cannot do idct and even gets slower when doing mc.
Ok, I am an idiot (or rather mplayer is not very smart). I enabled lavcdeint in config, but I assumed it would be turned off for progressive input - not the case. Now mplayer need 80-90%, same with vlc I just tested, so yesssss, my cpu is able to crunch it. :-)
On Mon, Mar 28, 2005 at 05:02:18PM +0200, Jukka Tastula wrote:
2500 is barely enough for an svcd. You can't seriously expect that to be enough for 10 times the pixels, can you?
I can't agree with you about this point, I use Q=1000 for pal resolution of VDR reccordings (3 pass mencoder) with thoses options :
-vf crop=$2 -sws 2 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=$Q:trell:mv0:mbd=2:v4mv:qprd:cmp=10:subcmp=10:mbcmp=10:predia=2:dia=2:vpass=1:turbo
Doing the same with Q=2500 was not that bad on my source, but really not perfect...
Perfect quality? mencoder -oac copy -ovc lavc -lavcopts \ vcodec=mpeg4:vqscale=2:keyint=1:autoaspect (:ilme:ildct ) input -o output
That'll make a big file though, probably bigger than the original, but it'll be pretty much as good as it can get. Of course it'll be worse than the original, lossy compression and everything. You probably wont notice. ilme:ildct is probably a good idea if the source is interlaced.
I'm not at all certain if mbd=2 and qns make any difference when encoding with constant quantizer. Qns takes way too much time anyway at that resolution so just forget about it.
Obviously this isn't very useful. It'd be a much better idea to specify an average bitrate and do a two or three pass encode. That way you can control how big the output file gets. Mplayer docs describe the process very well.
I never thought of anything else than 3 passes :-)
Grégoire Favre wrote:
just done a small try to convert an Euro1080 FTA preview to mpeg4, with a bitrate of 2500 with mencoder : quality was very bad...
For PAL video (720x576, 25fps progressive / 50fps interlaced), quality gets awful below 900kbit/s, good quality requires at least 1500kbit/s. (using a good encoder and 2-pass of course.)
For HDTV (1920x1080, 50i I assume) you get 5 times the pixels, so you should use 5 times the bitrate too, giving 4500-7500kbit/s. Thats 135min (4500) resp. 82min (7500) of mpeg4 video on a single layer 4.7G disc.
Cheers,
Udo
Reinhard Walter Buchner wrote:
Hi Grégoire,
just done a small try to convert an Euro1080 FTA preview to mpeg4, with a bitrate of 2500 with mencoder : quality was very bad...
Anyone already converted (and keeping the resolution) HDTV with a perfect quality to mpeg4 ?
ROFL (sorry!). MPEG4 compression already sucks on normal TV. Doing that to a HDTV resolution should be outlawed ;o)))
Please don't misunderstand, but re-compressing (mpeg4) something that is already compressed (mpeg2) is ALWAYS going to give you miserable results. Doing the same to a high resolution picture is only going to make things worse.
A bitrate of 2500 isn't enough for standard quality TV. You'll need at least 3-5x that rate if you want to see the advantages of HDTV.
Hi,
I think you all wrote about MPEG4 ASP. When talking about HDTV, we are talking about DVB-S2 (not receiveable with current cards) and MPEG4 AVC alias H.264 which is far better than MPEG4 ASP. I made some tests by deinterlacing and downscaling an Euro1080 sequence to 1280x720 (720p) as this is a resolution a PC running at 3 GHz is able to play without interruptions. At 4 MBit/s encoded with Nero Digital AVC, the image is amazing and far better than with DivX 5.x, WMV 9 and even better than DivX 6. IMHO, this time you can really say that you only need half the bitrate of MPEG-2. Read some more information on MPEG4 AVC (and a codec comparision) on Doom9.org (esp. the MPEG4 FAQ in the message board).
Joerg
On Wed, Mar 30, 2005 at 01:59:23AM +0200, Joerg Knitter wrote:
Hello :-)
I think you all wrote about MPEG4 ASP. When talking about HDTV, we are talking about DVB-S2 (not receiveable with current cards) and MPEG4 AVC alias H.264 which is far better than MPEG4 ASP. I made some tests by deinterlacing and downscaling an Euro1080 sequence to 1280x720 (720p) as this is a resolution a PC running at 3 GHz is able to play without interruptions. At 4 MBit/s encoded with Nero Digital AVC, the image is amazing and far better than with DivX 5.x, WMV 9 and even better than DivX 6. IMHO, this time you can really say that you only need half the bitrate of MPEG-2. Read some more information on MPEG4 AVC (and a codec comparision) on Doom9.org (esp. the MPEG4 FAQ in the message board).
I haven't read anything right now : it is possible to encode with mpeg-4 AVC/H.264 High on a linux amd64 (without emuling 32 bits) right now ?
Thank you very much for the tips !!!
Grégoire Favre a écrit :
On Wed, Mar 30, 2005 at 01:59:23AM +0200, Joerg Knitter wrote:
Hello :-)
I haven't read anything right now : it is possible to encode with mpeg-4 AVC/H.264 High on a linux amd64 (without emuling 32 bits) right now ?
Thank you very much for the tips !!!
http://forum.doom9.org/showthread.php?s=decd09702fb9bd9616ecfb9af9a13b38&...
<quote> available AVC/H.264 Codecs
AVC/H.264 implementations are available atm already from x264 (binary), Nero, mpegable, MainConcept, Sorenson, Moonlight, CyberLink, VSS, Envivio, Hdot264 (binary), DSPR, JM (reference software) (binary), ffmpeg, Philips (announced codecs: Skal, Apple, Sony)
Encoders
- x264: opensource (GPL) encoder (Source), available as VFW codec: sex264 or ffdshow, as commandline: mencoder (GUI) and inside the Handbrake tool (available for Linux, MacOS and BeOS) x264 supports 2pass, CABAC, Loop, multiple B-Frames, multiple Reference Frames, 4x4 P-Frame Blocksizes, 8x8 B-Frame Blocksizes - NeroDigital AVC: useable in Nero Recode2, outputs .mp4 ND AVC supports 2pass, CABAC, (adaptive) Loop, multiple B-Frames, mulitple Reference Frames, weighted prediction, 8x8 P-Frame Blocksizes, 16x16 B-Frame Blocksizes, Adaptive Quant. (Psy High) - mpegable: available as free VFW Encoder (not based on the reference), doesnt handle YV12 mpegable supports 1pass (fixed quants) uses P-Frames only, 8x8 P-Frame Blocksizes, CAVLC only, Loop - MainConcept: available in a free unlimited preview encoder app. (adds a watermark), outputs .mpg (TS output is buggy) MainConcept supports 1pass (CBR/VBR), P-Frame Reordering, CABAC, Loop, 1 B-Frame, Multiple Ref, 4x4 P-Frame Sizes and RDO - Sorenson: useable in Sorenson Squeeze 4, outputs .mp4, Sorenson supports 2pass and B-Frames (seems to use the MainConcept AVC implementation (decoder?)) - Moonlight: useable in Moonlight's OneClick Compressor and CyberLink's PowerEncoder, outputs .mpg Moonlight supports 1pass (VBR/CBR/Fixed Quants), CABAC, Loop, 2 B-Frames, 8x8 P-Frame Sizes, Adapt. Quant, PAR, Interlacing - JM: The AVC Reference Software offers in Version 9.3 already Main and High Profile: B/SP-Frames, CABAC, Loop Filter, 4x4 Blocksizes, multiple Reference Frames, Adaptive Quant, Error Resilience, RDO, Lossless Coding, Custom Quants, Rate Control aso... - Hdot264: opensource (GPL) VFW version of the reference software by doom9 member charact3r, still based on a very old version of the reference (JM 4.0c) - VSS: free preview VFW Encoder (limited to 5 days), based on the reference encoder - Envivio: useable in 4Coder, outputs .mp4 </quote>
You should find something suitable in there...
On Wed, Mar 30, 2005 at 03:08:14PM +0200, Nicolas Huillard wrote:
available AVC/H.264 Codecs
Yes, for sure, I wanted to try x264, with : svn co svn://svn.videolan.org/x264/trunk x264
But it's not available now :
svn: Berkeley DB error while opening 'nodes' table for filesystem /var/lib/svn/x264/db: Cannot allocate memory svn: bdb: Logging region out of memory; you may need to increase its size
There server is curently broken... But it will be up very soon (at least it what's I can read on #x264
BUT there is no x86-64 assembler so it's not a real choice...
I don't know of any 64 bits optimised ones, as was my first question...
Maybe snow (?) but as it's always changing, maybe not the best choice ?
Grégoire Favre wrote:
I haven't read anything right now : it is possible to encode with mpeg-4 AVC/H.264 High on a linux amd64 (without emuling 32 bits) right now ?
Do you really expect any speed advantages on 64 bit for video encoding? I dont think that video encoding needs more than 2G Ram or real 64 bit integer math. And with SSE2 enabled the 32-bit code shouldnt be slower, or?
Cheers,
Udo
On Wed, Mar 30, 2005 at 04:08:04PM +0200, Udo Richter wrote:
Do you really expect any speed advantages on 64 bit for video encoding? I dont think that video encoding needs more than 2G Ram or real 64 bit integer math. And with SSE2 enabled the 32-bit code shouldnt be slower, or?
When libavcodec wasn't x86_64 asm optimized, I was getting about 20 fps in 64 bits mode and 22 fps in 32 bits emulation, and now that's it's asm optimised, I get about 60 fps, so yes I think it make an hudge difference :-)
Grégoire Favre wrote:
When libavcodec wasn't x86_64 asm optimized, I was getting about 20 fps in 64 bits mode and 22 fps in 32 bits emulation, and now that's it's asm optimised, I get about 60 fps, so yes I think it make an hudge difference :-)
Impressive! And thats not just because x86-64 implies SSE2 and other nifty optimizations? eg. is the x86-32 build already SSE2 optimized?
Video processing usually doesn't use integer numbers beyond 4 billion, and 64-bit data processing was introduced by Pentium-MMX in 1997 too...
Cheers,
Udo
Grégoire Favre wrote:
I haven't read anything right now : it is possible to encode with mpeg-4 AVC/H.264 High on a linux amd64 (without emuling 32 bits) right now ?
Thank you very much for the tips !!!
Hi,
just to mention: I have tested Nero Digital AVC and Cyberlink AVC/Moonlight AVC encoder, and there is a huge difference. While Cyberlink AVC just reaches DivX 6 quality, Nero Digital AVC/Ateme AVC is way beyond. So before judging quality of AVC, try different codecs!
And furthermore: Nero Digital AVC could not be played back on linux/win due to some missing features in ffmpeg - the only player is/was Nero ShowTime on Windows. Don´t know if the missing features already have been implemented in the last weeks, but players like vlc still can´t cope with encodings where all of the Nero Digital features have been enabled.
With kind regards
Joerg