LinHES Forums http://forums.linhes.org/ |
|
Choppy Video after transcode http://forums.linhes.org/viewtopic.php?f=17&t=10372 |
Page 1 of 1 |
Author: | roschke [ Mon Jun 05, 2006 10:31 pm ] |
Post subject: | Choppy Video after transcode |
Has anyone else noticed that transode generates somewhat choppy video files? This is particuarly noticable in panning motions and shows up as a brief pause about 2-4 times a second. This does not happen for perfect transcodes of DVDs (obviously since they stay in the original VOB format). Tried this accros a number of different computers for playback so I'm pretty sure its tied to the output file. I haven't seen this behaviour in other transcoding software, so I'm wondering if its a question of playing with the settings / bitrate. I noticed this jitter as far back as R4 (just did a clean r5c7 install) and wasn't able to resolve it back then dispite playing with setting for a few days. If anyone else has seen this and found a fix, feedback would be greatly appreciated. |
Author: | turpie [ Mon Jun 05, 2006 11:11 pm ] |
Post subject: | |
What are you transcoding to? What kind of hardware are you using? |
Author: | roschke [ Tue Jun 06, 2006 8:10 pm ] |
Post subject: | |
turpie wrote: What are you transcoding to?
What kind of hardware are you using? I'm just using the default settings (so target is Xvid). Tried both Good and Excellent quality settings, with pretty much the same result. It looks like that occasionally frames are dropped. I don't see that on the Perfect Rip. I'm running an Athlon 2.5GHz, 512MB RAM, K7NCR-18G Pro Motherboard. Thanks for your help. |
Author: | roschke [ Wed Jun 07, 2006 8:21 pm ] |
Post subject: | |
OK - so I found out a bit more. I checked the MTD log and found that MythTV uses the following TRANSCODE command: Code: transcode -i /myth/tmp/Test-excellent-setting/vob/ -g 720x480 -f 0,1 -M 2 -V -X 2,0 -y xvid -o /myth/video/Test-excellent-setting.avi --print_status 20 --color 0 -R 2,twopass.log Then I tried just doing a plain commandline transcode via: Code: transcode -i /myth/tmp/Test-excellent-setting/vob/ -y xvid -o /myth/video/Test-excellent-setting.avi ... and got a very nice smooth running avi file. Then I strated adding in parameters one by one. The culprit is "-f 0,1". As soon as I put it in transcode finishes with almost 20% dropped frames being reported (vs. 0) and I get choppy video again. I can add in the other paramters without issue. Here is the description of the -f parameter: Code: -f rate[,frc] [25.000,0]
input video frame rate in fps. If frc (frame rate code, values [0..15]) is specified, transcode will calculate the precise frames per second internally. Not quite sure how to read that or why MythTV would set it at 0,1. Can anyone shed some light on this, or even just know how to edit the transcode parameters for DVD Rips? Peter. |
Author: | roschke [ Sun Jun 25, 2006 8:40 pm ] |
Post subject: | Solution |
Well - I worked on this on and off for a 2 weeks and finally got a fix. First off, what I think "-f" tries to do is give transcode a hint about what type of source material it is converting. Movies are shot at different frame rates than TV programs, and there are different strategies that DVDs use to bridge the gap. If you are clever you can back that change out and compress a little more efficiently. Get it wrong, however, and you can (apparently) accidentally drop the wrong frames. The mythDVD module actually uses a reference table to take a best guess at what it should be doing for all manners of different source formats. It looks like this is not always spot on. My strategy is to just not try and mess with this stuff and leave the original frame rate in tact (ie. drop the -f parameter when MythDVD decides to put it in). Not wanting to rework the parameter tables or change source code, I wrote a short script to wrap the transcode call. Below is the code for /usr/local/bin/transcode2.sh Code: #!/bin/bash cleaned=`echo "$@" | sed 's/ -f [^ ]*//g'` transcode $cleaned *Note: make sure you watch the quotes when typing this in, there are three different kinds and they need to match. After you set this up, make sure you chmod 777 /usr/local/bin/transcode2.sh and change the based transcode command in Utilities/Setup|Setup|Media Settings|DVD Settings|Rip Settings to “transcode2.sh”. For those of you that would prefer that imports on the “good” setting aren't automatically converted to 640x480, you can run this version of transcode2.sh which also removes all video scaling parameters: Code: #!/bin/bash
cleaned=`echo "$@" | sed 's/ -[fgBXj] [^ ]*//g'` transcode $cleaned |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |