PDA

View Full Version : TECHNICAL: HQ video for iPod w/sample vid




snowmoon
Oct 21, 2005, 11:41 AM
I don't have a iPod yet, so I have been relying on the eye and judgement of others, all of whom have been happy with the results. I am not a programmer or someone interested in spearheading changes to applications already out there, if you have a favorite app, forward this thread to the author and see what happens.

I WILL NOT ANSWER NON-TECHNICAL QUESTIONS ABOUT THESE APPS OR WHAT I HAVE DONE. So don't ask me to help you unless you know what you are doing already!

My goal was to create high quality video that looked GOOOOOOOOD when hooked to a TV, somewhere between broadcast and DVD quality while keeping the bitrate to a reasonable ammount. Secondary is the quality when viewed on the iPod screen. It looks like that "reasonable" ammount is falling into the range of 9-13mb/minute ( VCD bitrates ). You can go lower, but you will loose quality in some scenes, but not all.

I was working under windows, but the main tool used was ffmpeg and that should be availible for about every OS known to man at this point. Specifically I was using the ffmpeg from pspvideo9. For pre-conversion scaling and cleaning I used AviSynth. Because of some weird reason ffmpeg won't do 23.976 ( rounds up to 23.98 and that leads to audio sync issues ). So my Avisynth did an AssumeFPS and rescaled the audio to match. I also allplies light spatial and temporal smoothing to reduce the very high levels of grain in this particular movie. I then did a very simple 2-pass encode in ffmpeg. I have tried and tried to play with more advanced settings with ffmpeg, but nothing really resulted in higher quality. Tron is, IIRC, 2.05:1 so i trimmed it down to 2:1 and scaled it to 640x320 for my testing. One technical note was I converted to RGB before scaling as this lead to fewer problems with color artifacts from scaling raw 4:2:0 color data.

First pass - standard

ffmpeg -i input.avs -vcodec xvid -vtag mp4v -vprofile SP -4mv -qscale 2 -pass 1 -passlogfile log -acodec aac -ab 96 -f mov out.mov

Second Pass - optimized for iPod

ffmpeg -i input.avs -vcodec xvid -vtag mp4v -vprofile SP -4mv -qmax 8 -bufsize 4096 -maxrate 2350 -b 1100 -pass 2 -passlogfile log -acodec aac -ab 96 -f mov out.mov

-b is the bitrate and I have had good luck setting it to ~ 1/2 the final average bitrate in the first pass. bufzise/maxrate is a precaution against VBR runaway.

And... drumroll please... here is the compression sample from Tron.

http://u2.rit.albany.edu/~ew2193/tron81.mov ( 20MB mov file )

More From "The Fifth Element"

http://u2.rit.albany.edu/~ew2193/tfe-pass2-1100.mov ( 23.3MB .mov 9.32MB/min ) - excellent

http://u2.rit.albany.edu/~ew2193/tfe-pass2-900.mov ( 19.6MB .mov 7.84MB/min ) - ok


ADMINS: This is a compression sample that cuts a dozen or so 300 frame chunks from the movie. I firmly believe this falls under "fair use" but I will pull the link if you feel otherwise.



APPLE: If you see this... please fix the Display Aspect Ratio (DAR) playbeck bug. If you do I can finally create broadcast quality video consistantly and within your specs! Thanks!

EDIT: Oct 25th 1:34pm EST Added -vtag mp4v to make sure that output will have a "conforming" FourCC code.



Lacero
Oct 21, 2005, 11:48 AM
Hmmm.. does ffmpeg encode H.264?

I think scaling to 320x240 and then compressing will give the best results, as opposed encoding at a different size and allowing the iPod to scale dynamically. This results in lower sharpness and increased CPU usage.

I think Apple has the best settings, something like H.264 encoded at 600Kb/s or so. AAC 128Kbps stereo.

The iPod outputs TV at QVGA quality so the extra resolution is wasted, I believe.

snowmoon
Oct 21, 2005, 11:51 AM
Hmmm.. does ffmpeg encode H.264?

I think scaling to 320x240 and then compressing will give the best results, as opposed encoding at a different size and allowing the iPod to scale dynamically. This results in lower sharpness and increased CPU usage.

I think Apple has the best settings, something like H.264 encoded at 600Kb/s or so. AAC 128Kbps stereo.

The iPod outputs TV at QVGA quality so the extra resolution is wasted, I believe.

1) Only for iPod only viewing, yet it's a waste. If you read my introduction the intent was focused on video that looked good on the TV out rather than on the screen.

2) Only for iPod only viewing

3) NO, it's already been shown to output higher quality.

cbiffle
Oct 21, 2005, 12:18 PM
Just out of curiosity, everyone has read Apple's info on the accepted formats?

http://www.apple.com/quicktime/tutorials/creatingvideo.html

Down at the bottom it's pretty specific about what will and will not work.

If you're on the Mac and have a lot of spare time (QT export to H.264 is sloooow) try my app Enpod (http://www.cliff.biffle.org/software/enpod/).

It's really, really preliminary, but it works for me.

snowmoon
Oct 21, 2005, 12:25 PM
Just out of curiosity, everyone has read Apple's info on the accepted formats?

Of course, but there are so many problems with that list... the fact of the matter it doesn't even play .mp4 files created from the reference tools, nor does it properly obey DAR and PAR issues in the files either ( ie works in QT, not on iPod dispite being a dirt simple change ). Those specs are inacurate and a joke. It will take time for the users to figure out what the device will really do, and what I have done is a first step.

This was targeted far high quality video out for the weekend warrior who wants to carry around a few DVD's far watching whereever he happens to be. Or for that great family video that you have authored, but don't want to cripple it by encoding it to 320x240 ( crap ).

madmaxmedia
Oct 21, 2005, 12:30 PM
Just out of curiosity, everyone has read Apple's info on the accepted formats?

http://www.apple.com/quicktime/tutorials/creatingvideo.html

Down at the bottom it's pretty specific about what will and will not work.

If you're on the Mac and have a lot of spare time (QT export to H.264 is sloooow) try my app Enpod (http://www.cliff.biffle.org/software/enpod/).

It's really, really preliminary, but it works for me.

Awesome, thanks!!!

madmaxmedia
Oct 21, 2005, 12:40 PM
My goal was to create high quality video that looked GOOOOOOOOD when hooked to a TV, somewhere between broadcast and DVD quality while keeping the bitrate to a reasonable ammount. Secondary is the quality when viewed on the iPod screen. It looks like that "reasonable" ammount is falling into the range of 9-13mb/minute ( VCD bitrates ). You can go lower, but you will loose quality in some scenes, but not all.

I was working under windows, but the main tool used was ffmpeg and that should be availible for about every OS known to man at this point. Specifically I was using the ffmpeg from pspvideo9. For pre-conversion scaling and cleaning I used AviSynth. Because of some weird reason ffmpeg won't do 23.976 ( rounds up to 23.98 and that leads to audio sync issues ). So my Avisynth did an AssumeFPS and rescaled the audio to match. I also allplies light spatial and temporal smoothing to reduce the very high levels of grain in this particular movie. I then did a very simple 2-pass encode in ffmpeg. I have tried and tried to play with more advanced settings with ffmpeg, but nothing really resulted in higher quality. Tron is, IIRC, 2.05:1 so i trimmed it down to 2:1 and scaled it to 640x320 for my testing. One technical note was I converted to RGB before scaling as this lead to fewer problems with color artifacts from scaling raw 4:2:0 color data.

You did an awesome job, great test!!

I just played back on my iPod, it works great with no scaling artifacts and no skipping, etc. either.

I won't be able to play on a TV until tonite, but will compare this video with the episode of Lost I bought. This will confirm once and for all what will be possible. But it looks like H264 will be great for portable content, and MPEG4 will be great for TV output.

The video you made has excellent quality, with very few compression artifacts. I didn't look over it with a magnifying glass, but watched it fullscreen on my 15" PowerBook and it looks great. 10 Megabytes per minute, I think that will be the standard for creating iPod content for TV out... It's nice and easy to remember too.

It's only a matter of time before freeware programs are created on Mac and Win to rip DVD's to MPEG4 with settings similar to yours.

snowmoon
Oct 21, 2005, 12:54 PM
It's only a matter of time before freeware programs are created on Mac and Win to rip DVD's to MPEG4 with settings similar to yours.

That's half the reason for this thread. To give developers a starting point that is known to work well.

freeny
Oct 21, 2005, 01:02 PM
the setting i found best for tv viewing are as followed;

using handbrake,
mp4
1100 kbps (ive set higher but not enough difference to justify file size increase)
2-pass encoding (makes a great difference and well worth the time!)
48000Hz
160 Bitrate.
480 widest pixel ratio (as long as hight or width dont exceed 480 pixels)

equals broadcast quality but just short of dvd.
8-9mb per minute

hope this helps.

snowmoon
Oct 21, 2005, 01:05 PM
equals broadcast quality but just short of dvd.
8-9mb per minute

hope this helps.

Making it 640xY means that you are only scaling it once in each direction vs 480xY you are scaling twice in each direction. Although most scenes will probably look ok, you are distroying fine detail. As soon as apple obeys the DAR flags you will be able to have MUCH more flexability in scaling, but until that time 640xY is the way to go.

Those are close to the setting I recommend except you don't have buffer overrun protection. If handbrake has an option to add options "-bufsize 4096 -maxrate 2200" will help make sure that this video does not skip on complex video.

madmaxmedia
Oct 21, 2005, 01:05 PM
the setting i found best for tv viewing are as followed;

using handbrake,
mp4
1100 kbps (ive set higher but not enough difference to justify file size increase)
2-pass encoding (makes a great difference and well worth the time!)
48000Hz
160 Bitrate.
480 widest pixel ratio (as long as hight or width dont exceed 480 pixels)

equals broadcast quality but just short of dvd.
8-9mb per minute

hope this helps.

That's another option, using 480 wide to save on storage. But I think VGA at 10MB per minute will be optimal. It just needs good encoding, as OP did.

freeny
Oct 21, 2005, 01:55 PM
Making it 640xY means that you are only scaling it once in each direction vs 480xY you are scaling twice in each direction. Although most scenes will probably look ok, you are distroying fine detail. As soon as apple obeys the DAR flags you will be able to have MUCH more flexability in scaling, but until that time 640xY is the way to go.

Those are close to the setting I recommend except you don't have buffer overrun protection. If handbrake has an option to add options "-bufsize 4096 -maxrate 2200" will help make sure that this video does not skip on complex video.
I was not aware that you could go up to 640pixels. can you really do this on mp4? havent tried it.

madmaxmedia
Oct 21, 2005, 01:56 PM
I was not aware that you could go up to 640pixels. can you really do this on mp4? havent tried it.

Uh, how many times do I have to say it works great on my iPod? ;)

freeny
Oct 21, 2005, 02:14 PM
Uh, how many times do I have to say it works great on my iPod? ;)
DUDE! you just gave me a boner.

cube
Oct 21, 2005, 02:29 PM
The iPod cannot play at 25 fps???

snowmoon
Oct 21, 2005, 02:30 PM
CUBE: I have no reason to believe it won't, but have not tried.

Scarpad
Oct 21, 2005, 02:33 PM
the setting i found best for tv viewing are as followed;

using handbrake,
mp4
1100 kbps (ive set higher but not enough difference to justify file size increase)
2-pass encoding (makes a great difference and well worth the time!)
48000Hz
160 Bitrate.
480 widest pixel ratio (as long as hight or width dont exceed 480 pixels)

equals broadcast quality but just short of dvd.
8-9mb per minute

hope this helps.

to my knowledge two pass is only beneficial when you are using varable bit rate encoding. When specifying a bitrate it does that bitrate thruout, CBR Constant bitrate

madmaxmedia
Oct 21, 2005, 02:36 PM
DUDE! you just gave me a boner.

Wait til you download and watch the Tron clip. Play it fullscreen your computer...

Hey snowmoon, can you do a short rip from a more demanding movie? Althoug h the Tron clip has some regular shots, the CGI shots are probably less demanding.

Maybe something like 30 seconds from an action sequence in the Matrix, that's always a popular choice. I mean I can sorta do it, but I'm not that great at tweaking settings, etc. and I have been having problems getting ffmpegx to work right on my Mac.

snowmoon
Oct 21, 2005, 02:40 PM
Wait til you download and watch the Tron clip. Play it fullscreen your computer...

Hey snowmoon, can you do a short rip from a more demanding movie? Althoug h the Tron clip has some regular shots, the CGI shots are probably less demanding.

Maybe something like 30 seconds from an action sequence in the Matrix, that's always a popular choice. I mean I can sorta do it, but I'm not that great at tweaking settings, etc. and I have been having problems getting ffmpegx to work right on my Mac.

I;ll try and find something... CGI is demanding in its own way. I will also upload a 25fps shot and a 4:3 encode... give me a few hours though since Im at work right now.

madmaxmedia
Oct 21, 2005, 03:00 PM
I;ll try and find something... CGI is demanding in its own way. I will also upload a 25fps shot and a 4:3 encode... give me a few hours though since Im at work right now.

Okay, cool! Hopefully I will be able to check out TV output with your Tron sample tonite, and will post impressions. From other posts I am almost positive that the higher-res will result in a great TV picture, but I want to confirm with my own eyes with your test material.

If you want to be extra sure of test results, you can do a 320 x 240 encode of the Tron sample for comparison. I will actually just be comparing to my downloaded episode of 'Lost'. On my PowerBook screen the difference during fullscreen playback is quite obvious, I am expecting similar results on a TV. Maybe not quite as obvious, but still noticeable difference.

freeny
Oct 21, 2005, 03:01 PM
to my knowledge two pass is only beneficial when you are using varable bit rate encoding. When specifying a bitrate it does that bitrate thruout, CBR Constant bitrate
in handbrake it only says "average bitrate" weather its sticks to that i can only assume. all i know is that i did one version with 2 pass and one without. the one with 2 pass is very noticably better.

Scarpad
Oct 21, 2005, 03:02 PM
I;ll try and find something... CGI is demanding in its own way. I will also upload a 25fps shot and a 4:3 encode... give me a few hours though since Im at work right now.


I'd be interested in the resolution you will be using for your 4:3 encode.

freeny
Oct 21, 2005, 03:45 PM
just ripped a video using handbrake,
mp4
1100 kbps
2-pass encoding
160 Bitrate.
at 640x480

ipod refused it

what did i do wrong?

madmaxmedia
Oct 21, 2005, 03:51 PM
just ripped a video using handbrake,
mp4
1100 kbps
2-pass encoding
160 Bitrate.
at 640x480

ipod refused it

what did i do wrong?

The only thing I can think of is that 640 x 480 may be too many pixels. It can for sure play back 640 x 320, which is the same number of pixels as 480 x 480.

Also, I assume you're using MPEG-4 Video codec, right?

freeny
Oct 21, 2005, 03:54 PM
The only thing I can think of is that 640 x 480 may be too many pixels. It can for sure play back 640 x 320, which is the same number of pixels as 480 x 480.

Also, I assume you're using MPEG-4 Video codec, right?
correct.
so it may be a pixel ratio issue?
is this something that will only apply to widescreen ratios? ie 640x272?
only 230,400 pixels allowed?

Lacero
Oct 21, 2005, 03:55 PM
what did i do wrong?Bitrate was too high?

snowmoon
Oct 21, 2005, 03:58 PM
Bitrate was too high?

No it was not... mpeg-4 up to 2.5mbps

freeny
Oct 21, 2005, 04:29 PM
assuming it is a pixel amount issue, I am ripping a video that is 720x304. that will give me 218,880 pixels. the max would be 480x480=230,400 pixels. my vid would be 11,520 pixels less than the max. lets see what happens......

madmaxmedia
Oct 21, 2005, 04:55 PM
I would also try 4:3 at say 540 x XXX. It's a weird resolution, but I think the iPod would handle it just as well as 480 x XXX.

If it's exactly 4:3, then it would be about 540 x 405, which is just under the number of pixels of 480 x 480.

freeny
Oct 21, 2005, 05:22 PM
EUREKA!!! its definately a pixel amount. my 720x304 video is uploading as we speak. that is full DVD resolution!!! (for at least the dvd im using. wont say which one but i can say it rhymes with schlyncredibles) I think im going to cry. will play it on the tv when i get home to see the tv results. I can say it looks georgeous on my computer screen. :) :) :)

madmaxmedia
Oct 21, 2005, 05:54 PM
EUREKA!!! its definately a pixel amount. my 720x304 video is uploading as we speak. that is full DVD resolution!!! (for at least the dvd im using. wont say which one but i can say it rhymes with schlyncredibles) I think im going to cry. will play it on the tv when i get home to see the tv results. I can say it looks georgeous on my computer screen. :) :) :)

Pretty sweet, huh! :)

I don't know too much about aspect ratios, other than that TV is more square than motion pictures.

I guess DVD's come in a couple of different aspect ratios...we can figure out the optimal setting based on aspect ratio. The bitrate won't change since we're basically adjusting the resolution so it doesn't go over 480x480 pixels.

Let us know how the 720 x 304 works on the iPod too. 640 x XXX is probably easy to scale down since its exactly 2x (or 4x) 320 x XXX. So curious if other resolutions downscale just as well.

dejo
Oct 21, 2005, 06:12 PM
480 x 480 = 1:1 ratio = 230400 pixels

640 x 360 = 1.78:1 (16:9 HD) ratio = 230400 pixels

653 x 352 = 1.85:1 (average Hollywood movie) = 229856 pixels

736 x 313 = 2.35:1 ("extra widescreen" movies) = 230368 pixels

freeny
Oct 21, 2005, 06:52 PM
the 720x304 plays pretty good on the ipod screen. occasional line here and there but nothing too distracting. on the tv, WOW!! the sound, A+. the wideo, an A. the only reason I didnt give an A+ is that there seems to be a tiny degrade in the contrast but this may be my settings.

freeny
Oct 21, 2005, 07:19 PM
aside from the ratio thats now been solved, what bitrate is working best? im setting at 1100kbps. aside from my stated contrast issue Im happy with it. would a higher bitrate solve this or would i need to use a filter? i use handbrake on the computer at work. its a new g5 and can rip a full video in about an hour or so. im at home now and only have an old titanium that takes 12 hours to do the same so im gonna have to hand this over to someone with more power until monday....

madmaxmedia
Oct 21, 2005, 07:29 PM
aside from the ratio thats now been solved, what bitrate is working best? im setting at 1100kbps. aside from my stated contrast issue Im happy with it. would a higher bitrate solve this or would i need to use a filter? i use handbrake on the computer at work. its a new g5 and can rip a full video in about an hour or so. im at home now and only have an old titanium that takes 12 hours to do the same so im gonna have to hand this over to someone with more power until monday....

You are doing 2-pass, right? I don't know enough about compression codecs to give any other tips. I bet if contrast is inherently low in the TV out signal, that could be corrected.

You can go up to 2.5 Mbpps (I think you are using 1100 kbps, not kBps.) Is your video as good as the OP's?

freeny
Oct 21, 2005, 07:40 PM
You are doing 2-pass, right? I don't know enough about compression codecs to give any other tips. I bet if contrast is inherently low in the TV out signal, that could be corrected.

You can go up to 2.5 Mbpps (I think you are using 1100 kbps, not kBps.) Is your video as good as the OP's?
actually the video was only one pass since i was crunched for time and only was interested in the image ratio. I will have to wait until monday to do a two pass. it does look fantastic on the computer moniter so perhaps it is just my tv. so an A+ it is!! very very happy :D

snowmoon
Oct 21, 2005, 08:12 PM
Ok, here we go again. I chose "The Fifth Element" since I actually don't own a copy of the matrix ( I know, shocking ).


# AviSynth script
LoadPlugin("c:\Documents and Settings\Eric\My Documents\My Videos\DGDecode.dll")
video = MPEG2Source("C:\DVD_VIDEO\VIDEO_TS\tfe.d2v")
audio = WavSource("C:\DVD_VIDEO\VIDEO_TS\tfe T01 3_2ch 448Kbps 48KHz.wav")
AudioDub(video, audio)
AssumeFPS(24,1, true)
SSRC(44100)
Crop(0,60,0,-62)
ConvertToYUY2()
SpatialSoften(1,1,4)
TemporalSoften(1,4,4,10,2)
ConvertToRGB()
BilinearResize(640,272)
SelectRangeEvery(15000,300,1500)
#

Pass 1
C:\Program Files\pspvideo9\apps>ffmpeg -i "C:\Documents and Settings\Eric\My Documents\My Videos\tfe.avs" -r 24 -vcodec xvid -bitexact -4mv -vprofile SP -qscale 2 -acodec aac -ab 96 -g 300 -pass 1 -passlogfile tfe-sample -f mov tfe-pass1.mov

The result here is 35mb... 14.1MB/minute... this is actually iPod compliant and almost identical to the original.

Pass 2 - 1100 kbits
C:\Program Files\pspvideo9\apps>ffmpeg -i "C:\Documents and Settings\Eric\My Documents\My Videos\tfe.avs" -r 24 -vcodec xvid -bitexact -4mv -vprofile SP -b 1100 -qmax 5 -bufsize 4096 -maxrate 2350 -acodec aac -ab 96 -g 300 -pass 2 -passlogfile tfe-sample -f mov tfe-pass2-1100.mov

http://u2.rit.albany.edu/~ew2193/tfe-pass2-1100.mov ( 23.3MB .mov 9.32MB/min ) - excellent

Pass 3 - 900 kbits
C:\Program Files\pspvideo9\apps>ffmpeg -i "C:\Documents and Settings\Eric\My Documents\My Videos\tfe.avs" -r 24 -vcodec xvid -bitexact -4mv -vprofile SP -b 900 -qmax 5 -bufsize 4096 -maxrate 2350 -acodec aac -ab 96 -g 300 -pass 2 -passlogfile tfe-sample -f mov tfe-pass2-900.mov

http://u2.rit.albany.edu/~ew2193/tfe-pass2-900.mov ( 19.6MB .mov 7.84MB/min ) - ok

Sky Blue
Oct 22, 2005, 06:25 PM
Some DVDs don't seem to work in Handbrake. I get 'No valid title'...is there another option for ripping these?
I've tried using Mac the Ripper, then used ffmepgx to convert to vob file into mp4 mpeg. When I went to play it, Quicktime pops up saying, "Couldn't open the file because an invalid sample description was found in the movie"
Any ideas?

freeny
Oct 22, 2005, 07:45 PM
Some DVDs don't seem to work in Handbrake. I get 'No valid title'...is there another option for ripping these?
I've tried using Mac the Ripper, then used ffmepgx to convert to vob file into mp4 mpeg. When I went to play it, Quicktime pops up saying, "Couldn't open the file because an invalid sample description was found in the movie"
Any ideas?
It might be your computer. I get the same thing on my old 600mhz titanium, but ill take it to work and pop it in the new g5 and it works fine. what computer you using?

madmaxmedia
Oct 23, 2005, 02:40 AM
Okay, I haven't looked at identical material encoded at different resolutions, but I am pretty positive that higher resolution MPEG4 video is output to the TV at higher resolution. The samples by snowman (as well as some of my own encodes) look sharper than the episode of Lost I bought.

Others have also echoed these findings, I don't know anyone who has stated that the TV out was locked to 320 x 240 based on actual viewing.

So it looks like for ripping DVD's, higher resolution MPEG4 will be the way to go. The encodes by snowman look excellent, I would say compression artifacts are more noticeable than any lack of resolution. For a 60GB iPod, it might be worth encoding at even higher bitrate, say 1.5 to 1.8 Mbps for really nice results.

That would result in 11 to 13MB per minute, or up to 1.6GB for a 2-hour movie. I would use this for certain favorites that you want on your iPod. Otherwise for regular stuff I think about 1.2 Mbps (or 10MB per minute) is more than adequate.

thornrag
Oct 23, 2005, 01:02 PM
My goal was to create high quality video that looked GOOOOOOOOD when hooked to a TV, somewhere between broadcast and DVD quality while keeping the bitrate to a reasonable ammount.

For pre-conversion scaling and cleaning I used AviSynth. Avisynth did an AssumeFPS and rescaled the audio to match. I also allplies light spatial and temporal smoothing to reduce the very high levels of grain in this particular movie. I then did a very simple 2-pass encode in ffmpeg. I have tried and tried to play with more advanced settings with ffmpeg, but nothing really resulted in higher quality. Tron is, IIRC, 2.05:1 so i trimmed it down to 2:1 and scaled it to 640x320 for my testing. One technical note was I converted to RGB before scaling as this lead to fewer problems with color artifacts from scaling raw 4:2:0 color data. First pass - standard... Second Pass - optimized for iPod...


Scale, smooth, scale, encode, scale, encode... woops, also converted to RGB first... then encode and encode!

Because, when your goal is high quality video, the more you do to it, the better it looks. It's a fact.

wififun
Oct 24, 2005, 12:49 PM
I have been following this thread, and have been trying to get your ffmpeg line to work. Granted this is on linux, but I compiled the latest CVS of ffmpeg, and XVID, yet it returns:
/usr/local/bin/ffmpeg -i test.mpg -r 24 -vcodec xvid -bitexact -4mv -vprofile SP -qscale 2 -acodec aac -ab 96 -g 300 -pass 1 -passlogfile tfe-sample -f mov tfe-pass1.mov
ffmpeg version CVS, build 3277056, Copyright (c) 2000-2004 Fabrice Bellard
configuration:
built on Oct 24 2005 10:18:09, gcc: 3.3.5 (Debian 1:3.3.5-12)
Input #0, mpeg, from 'test.mpg':
Duration: 00:00:27.1, start: 0.333789, bitrate: 7803 kb/s
Stream #0.0[0x1e0], 29.97 fps: Video: mpeg2video, yuv420p, 720x480, 9600 kb/s
Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 384 kb/s
Unknown codec 'xvid'
According to the ffmpeg man pages:
Both XviD and DivX (version 4+) are implementations of the ISO MPEG-4
standard (note that there are many other coding formats that use this
same standard). Thus, use '-vcodec mpeg4' to encode these formats. The
default fourcc stored in an MPEG-4-coded file will be 'FMP4'. If you want
a different fourcc, use the '-vtag' option. E.g., '-vtag xvid' will
force the fourcc 'xvid' to be stored as the video fourcc rather than the
default.
If I make the changes sugested in the faq, then other XVID options cause it to fail. Any hints on getting this line to work elsewhere?

snowmoon
Oct 24, 2005, 01:11 PM
Scale, smooth, scale, encode, scale, encode... woops, also converted to RGB first... then encode and encode!

Because, when your goal is high quality video, the more you do to it, the better it looks. It's a fact.

I would like to state for the record that your post is biligerent and completly without merit. If your post was meant as a satire of the kids in the hall bravo, otherwise you are being a jerk and if you continue with this type of posting you won't last long here.

Step up and show your stuff... if you think you can do better, please do. The conversion to RGB serves a SPECIFIC PURPOSE to reduce chroma aliasing in the low resolution pR and pB channels. The video is scaled only ONCE through the entire chain ( output may cause a scale, but as far as I can tell it does not ). I CROP, to improve viewability on the iPod, then scale once to a final output video. The filters are to improve compressability but do not compromise the basic video quality at the target bitrate.

freeny
Oct 24, 2005, 01:25 PM
I would like to state for the record that your post is biligerent and completly without merit. If your post was meant as a satire of the kids in the hall bravo, otherwise you are being a jerk and if you continue with this type of posting you won't last long here.

Step up and show your stuff... if you think you can do better, please do. The conversion to RGB serves a SPECIFIC PURPOSE to reduce chroma aliasing in the low resolution pR and pB channels. The video is scaled only ONCE through the entire chain ( output may cause a scale, but as far as I can tell it does not ). I CROP, to improve viewability on the iPod, then scale once to a final output video. The filters are to improve compressability but do not compromise the basic video quality at the target bitrate.
A round of applause for snowmoon. I have officially added you to my buddies list.
thornrag is a newbe as you can expect.

madmaxmedia
Oct 24, 2005, 01:37 PM
APPLE: If you see this... please fix the Display Aspect Ratio (DAR) playbeck bug. If you do I can finally create broadcast quality video consistantly and within your specs! Thanks!

Yeah, that post was confusing (about scaling and whatever)...

Do you think this bug can be fixed in firmware update? I would assume so.

Can you explain a little more about it, such as how the bug manifests itself?

Thanks, Steve

snowmoon
Oct 24, 2005, 01:48 PM
Yeah, that post was confusing (about scaling and whatever)...

Do you think this bug can be fixed in firmware update? I would assume so.

Can you explain a little more about it, such as how the bug manifests itself?

Thanks, Steve


The bug is that if you have a quicktime video that states it's output resolution is different than it's native ( ie 480x480 video that wants to be played back at 640x480/4:3 or 852x480/16:9 ). I can get ffmpeg to create .mov files that ate 480x480 and properly play back in quicktime, but play back as SQUARE ( black border left and right ) on the iPod.

In thory this can be fixed with a firmware update... it's also possible that this is an encoding bug, but I generally doubt it becuase it works under quicktime player and VLC just not on the iPod. I have gotten reports that QTPro CAN do "the right thing" and encode 480x480 non square resoltions that playback on the iPod so I know it's possible.

So if you have a video that looks correct on the computer, but plays back squished in one or more directions... you have encountered the bug.

snowmoon
Oct 24, 2005, 01:59 PM
I have been following this thread, and have been trying to get your ffmpeg line to work. Granted this is on linux, but I compiled the latest CVS of ffmpeg, and XVID, yet it returns:

According to the ffmpeg man pages:

If I make the changes sugested in the faq, then other XVID options cause it to fail. Any hints on getting this line to work elsewhere?


Hmmm... stumped on your main question, but I would like to point out some other areas that might cause you problems. My input video has been specifically re-jigged to 24fps and by forcing it you will probably end up with audio sync issues.

I don't think you will need the -vtage option since you are not outputting an .avi file. This may be why it's complaining.. try without the -vtag and see what happens.

wififun
Oct 24, 2005, 02:55 PM
well I went back and forth with this, and discovered that by default ffmpeg is not compiled with xvid and faac enabled. The addition of "--enable-xvid --enable-faac --enable-gpl" seems to have fixed these first parts. I do not know where -vprofile comes from to make that switch work, but so far this seems to be working.

balamw
Jan 19, 2006, 10:10 AM
More From "The Fifth Element"

http://u2.rit.albany.edu/~ew2193/tfe-pass2-1100.mov ( 23.3MB .mov 9.32MB/min ) - excellent

Weird. iTunes doesn't want to sync this file any more after months of keeping it on my iPod it says that it's not supported. I haven't updated the iPod's firmware, but did move to iTunes 6.0.2 recently.

B