|
SageTV Beta Test Software Discussion related to BETA Releases of the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. regarding SageTV Beta Releases should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Xvid transcoding and -aspect ratio.
I'm using a custom XviD profile to crop and transcode, but -aspect doesn't seem to have any effect when using the XviD 41 encoder.
It works perfectly with the default mpeg4 avi profiles, but not at all with XviD. Does the -aspect setting just not work with XviDs or am I missing something? I'm currently having to resize the video to 640*480 then crop. It would be much better if I could just crop and set the aspect ratio. |
#2
|
|||
|
|||
It would help if you post the exact command line from your sage.properties file.
|
#3
|
|||
|
|||
Here is what I've been using. I'm a complete newb at transcoding. It looks decent enough for what I'm using it for, but I'm sure it isn't great. The first one gives me a 624x352 video with a QF of around 0.226. Quality seems to be reasonably close to the original considering.
Code:
transcoder/formats/Xvid\ 16x9\ Cropped\ &\ Deinterlaced\ AVI=f\=avi;MCompressionDetails\=-croptop 64 -cropbottom 64 -cropleft 8 -cropright 8 -deinterlace;[bf\=vid;f\=xvid;br\=1500000;w\=640;h\=480;arn\=4;ard\=3;][bf\=aud;f\=mp3;sr\=48000;ch\=2;br\=96000;] The next one gives me a resolution of 624x464 and QF of 0.219. About the same quality as the 16x9 profile. Code:
transcoder/formats/Xvid\ 4x3\ Cropped\ &\ Deinterlaced\ AVI=f\=avi;MCompressionDetails\=-croptop 8 -cropbottom 8 -cropleft 8 -cropright 8 -deinterlace;[bf\=vid;f\=xvid;br\=1900000;w\=640;h\=480;arn\=4;ard\=3;][bf\=aud;f\=mp3;sr\=48000;ch\=2;br\=96000;] This one works fine for cropping and changing the aspect ratio without resizing: Code:
transcoder/formats/MPEG4\ Cropped\ &\ Deinterlaced\ AVI=f\=avi;MCompressionDetails\=-vtag xvid -croptop 64 -cropbottom 64 -cropleft 8 -cropright 8 -deinterlace -aspect 16\:9;[bf\=vid;f\=mpeg4;br\=2000000;][bf\=aud;] If I add -aspect 16\:9 to the XviD profiles it doesn't seem to have any effect. I've tried removing the resizing and -arn -ard so that the two profiles are as close to the same as possible, but it still doesn't work. For example the following seems to totally ignore -aspect: Code:
transcoder/formats/Xvid\ 16x9\ Cropped\ &\ Deinterlaced\ AVI=f\=avi;MCompressionDetails\=-croptop 64 -cropbottom 64 -cropleft 8 -cropright 8 -deinterlace -aspect 16\:9;[bf\=vid;f\=xvid;br\=1500000;][bf\=aud;f\=mp3;sr\=48000;ch\=2;br\=96000;] BTW it uses XviD build 41 to encode, if that matters. Last edited by blade; 11-16-2006 at 09:14 AM. |
#4
|
||||
|
||||
Thanks for posting these. I'm dealing with mainly normal recordings, which are 4:3 ratios. I noticed you are converting 16:9 sources, what would I need to change to make use of these profiles for 4:3 sources? Is there a manual or list of commands options and explanation of what each does? I would experiment with it myself if I know the correct usage format and options for SageTranscoder/FFMpeg.exe.
__________________
Mayamaniac - SageTV 7.1.9 Server. Win7 32bit in VMWare Fusion. HDHR (FiOS Coax). HDHR Prime 3 Tuners (FiOS Cable Card). Gemstone theme. - SageTV HD300 - HDMI 1080p Samsung 75" LED. |
#5
|
|||
|
|||
Actually they are for use on 4:3 recordings I just named it 16x9 because that is what the finished avi will be. One crops letterboxed 4:3 so that it fits a 16:9 screen and the other is for standard 4:3 recordings and keeps the 4:3 ratio. The first two are the only ones I'm using the other two were just to show an example of using and trying to use -aspect to change the aspect flag.
I'm resizing the 720x480 (actual capture resolution of regular analog cable made with a PVR500) to 640x480 (what it should play back at). If -aspect worked for XviD I could simply crop without resizing and the video would playback at the proper ratio instead of the ratio of the resolution. It would speed up the transcoding, but would also require a higher bitrate to maintain the same quality so for my purposes I think resizing might be the best option anyway. The first one I posted is for letterboxed 4:3 content. It will resize the 720x480 capture to 640x480 and crop the small black bars from the sides and the large bars off the top and bottom leaving you with a 624x352 16:9 video that should fit a 16:9 screen when played back in Sage. The second one resizes the 720x480 capture to 640x480 and crops all 4 edges by 8 pixels each to remove the small black bars, closed captioning data, and other artifacts that tend to show up around the edges of the video. It will leave you with a 624x464 video (4:3 video). I use these on shows that I don't intend to watch for quite some time and even then only when I start to run low on space. I converted 112 gigs of CSI Miami down to 32 gigs without losing too much quality. I know with other tools and better codecs they could have gone much lower, but being able to just select it in Sage and press a button makes it worth it to me. Last edited by blade; 11-16-2006 at 06:39 PM. |
#6
|
|||
|
|||
As for the correct format and options I'm just shooting in the dark. I looked at the other default profiles and sort of guessed as to what I should use. I'm not sure if this is what you were wondering or not, but here is what little I know.
The following profile will transcode either 4:3 or 16:9 to XviD without any resizing or cropping. It will maintain the original resolution of the video. Code:
transcoder/formats/Xvid=f\=avi;MCompressionDetails\=-deinterlace;[bf\=vid;f\=xvid;br\=1500000;arn\=4;ard\=3;][bf\=aud;f\=mp3;sr\=48000;ch\=2;br\=96000;] If you want to crop the small black bars around the edges just add back the -croptop -cropbottom ect... the numbers are the number of pixels you intend to crop. For best compression you want to keep the final horizontal and vertical resolution at multiples of 16. If you want to resize the video so that it plays back at the correct aspect ratio when using source and be able to lower the bitrate some just add back w\=640;h\=480; set it to whatever you want the avi's resolution to be. Just remember though if you plan to use source as the aspect ratio you'll need the resolution to be the proper aspect ratio. The target bitrate is pretty obvious br\=1500000 Last edited by blade; 11-16-2006 at 07:24 PM. |
#7
|
|||
|
|||
Quote:
You are probably confusing yourself by some kind of measure about how well the transcoding preserves the resized video, not the original video. If so then think about the extreme: resize your original down to 6x4 pixels. Won't the result have the perfect quality by your definition? Your, Patilan |
#8
|
|||
|
|||
Quote:
All I have to go by is my own experience. If I transcode the exact same video with the same bitrate with one resized and the other not the higher resolution video results in more blocking. Of course if the bitrate is high enough, this won't be the case. Quote:
Last edited by blade; 11-19-2006 at 06:07 PM. |
#9
|
|||
|
|||
Quote:
Quote:
Quote:
I was not suggesting you go for ridiculously low resolution. I gave an extreme example to illustrate my point. Seriously, if you think that resizing down to 624*352 improves quality, then why stop there? By the way, when I played with xvid some time ago, I too was not very happy with the amount of blocking that I got in my videos. I am not sure if I was doing something wrong, or it's just what xvid is. Probably the former. So I abandoned xvid for h264 and never looked back. Blade, I just saw what evilpenguin wrote here. That may be the "Holy Grail"! I am yet to test it but I am really excited. Patilan |
#10
|
|||
|
|||
Quote:
Also please quote and highlight where I said resizing improved quality. I said resizing allows me to get better results at lower bitrates than if I kept the original resolution. As for people saying you should never resize no matter what, I've ready plenty of threads on doom9 that state when reducing bitrate beyond a certain point you get less blocking and ringing by resizing to a lower resolution. As a matter of fact it appears quite common to suggest lowering the resolution in order to get better results at lower bitrates than what is possible with the full resolution. Quote:
I'll ask again if blocking is so easy to get around and resolution has no impact on how low of a bitrate you can get away with why don't people compress full resolution 1920x1080i video down to 350-700mb XviD files? The ones I've seen have always been resized to lower resolutions. Quote:
Once again I never said it improved quality. I said I could lower the bitrate and get better quality than if I tried to lower the bitrate while maintaining the full resolution. Of course when you lower resolution or bitrate you're going to lose quality. My point is a lower resolution at certain bitrates can maintain better quality than higher resolutions at the same bitrate. I'm sure you'll disagree, but there are plenty of people who think otherwise. Last edited by blade; 11-19-2006 at 10:29 PM. |
#11
|
|||
|
|||
Quote:
Quote:
Now back to your original question... I hope that I'll have some time this weekend to play with xvid and see why it's ignoring the -aspect switch. Patilan |
#12
|
|||
|
|||
On a related note, I have been looking at the transcoding options for mencoder and ffmpeg, but I don't see where the switches used in the sage.properties file are actually coming from. Maybe these are documented elsewhere, and I am looking in the wrong place?
My goal is to transcode my recordings to Xvid format using 2-pass encoding. I want the final file size to be approximately 1GB an hour. Is this even possible with the current SageTV transcoder? What would be the line that I need to add to the sage.properties file? Thanks for any help. Carl Molnar |
#13
|
|||
|
|||
Quote:
If you're dealing with regular 4x3 content try the second profile in post #3. If you have 4x3 letterboxed try the first one in post #3. If you'd rather not resize and would like to set the aspect ratio during playback instead of using source just delete w\=640;h\=480; from the profiles and it will maintain the original resolution. I don't know much about this stuff, but since not many others seem interested I'll help what little I can. Maybe someone else can come along and tell us the profiles are crap and offer some better ones. |
#14
|
|||
|
|||
I didn't think those profiles were 2-pass? If they are, what specifies it in the command line?
Thanks |
#15
|
|||
|
|||
Quote:
transcoder/enable_multipass_encoding=true My understanding is that you can't specify single or multipass with the profiles. Either all of them use it or none of them do. Of course there isn't any real documentation or guides so that's just from what I've read here and there. Last edited by blade; 11-22-2006 at 11:44 AM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|