Avidemux Forum

Avidemux => Windows => Topic started by: maximillan on March 24, 2016, 04:23:19 PM

Title: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 24, 2016, 04:23:19 PM
Hello I'm new to this site. But I have been using avidemux 2.6 for a month now. I trying to encode a DVD which is 29.97fps originally at 2:03.221 original time. My first encode I just let avidemux do the work at mp4 H264 output, avidemux default fps output was at 59.9fps. Quality and everything was great but the only problem was the movement from action scenes and panning scenes the movement or result was jerky or stuttering. My next reencode try I changed the fps settings through filters I manually set it at 25fps movement was smooth no stutter or jerking but the resulting movie from 2:03.221 got longer to 2:27.411 so the original audio became so out of sync. Third experiment with resampling fps, I tried setting it with same as source to 29.97fps but sadly stuttering came back. I am wondering if I manually try change fps putting source at 29.97fps and setting destination at 29.97fps if I either get a longer movie time than the original or will stuttering happen. I'm just wonering how to set up avidemux to just copy the original source file's fps.
Any suggestions would be highly appreciated thanks. :D
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: Jan Gruuthuse on March 25, 2016, 08:05:22 AM
DVD use MPEG2 video codec, you should not encode dvd in h264? If I understand you correctly? Creating video for dvd inclusion?
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 25, 2016, 10:04:39 AM
I was trying to save old family DVDs to a media player just incase some discs get damaged. I had a few that got damaged over time.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: Jan Gruuthuse on March 25, 2016, 12:03:26 PM
Copy video from dvd (vob) to hard disc. Try processing from hard disc.
If you got still the same issue, install avidemux 2.5.6 alongside 2.6. And use 2.5.6 to process your family videos.
This wont work with region protected dvd's.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 25, 2016, 03:16:41 PM
That's what I did I copied the vob files and muxed them into mkv before encoding. But I will try you suggestion on installing 2.5.6 thank you I hope this works👍
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 25, 2016, 03:18:17 PM
Its not region protected DVD I burned those home movies into a blank verbatim dvd
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: Jan Gruuthuse on March 25, 2016, 04:08:15 PM
try vob directly into avidemux 2.5.6 without in between step mkv muxing.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 25, 2016, 06:54:41 PM
Okay I will try that and see what happens thanks.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: AQUAR on March 26, 2016, 12:26:12 PM
The stuttering might be because the home video is interlaced and needs better de-interlacing.
At the moment I think you are just weaving fields together and ADM is giving an incorrect frame rate.

Purely speculative on my part but try a de-interlacing filter like Yadif and see if it makes a difference.
 
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: Jan Gruuthuse on March 26, 2016, 12:31:47 PM
Or just use [Copy] for both Video Output and Audio Output with Output Format [Mkv Muxer].
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 26, 2016, 03:12:37 PM
AQUAR- I'm not sure if the video is interlaced or not but I will definitely look on it and give it a try I just waiting for the encode experiments I'm trying now to be done and see if it's okay or not based on earlier suggestions. But if it does not work out well I'll into your suggestion thanks.👍
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 26, 2016, 03:16:06 PM
Jan Gruuthuse- muxing would have the file still in vob yes it's easy and tried it no problems with the result, but I was hoping to save it in mp4 form on my hd.☺
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: Jan Gruuthuse on March 26, 2016, 04:52:34 PM
x264:
Could likely be in this case that Quality is to high when Constant Rate Factor (Single Pass) is used, low number (20, ...), increase the number (lower quality).
Mark 1 minute of your video for testing, preferable where you noticed the stuttering. Try 23 to 27 and see if this improves.



Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 26, 2016, 06:49:21 PM
Okay thanks Jan I will try to increase crf to 30 usually it ranges from 20 to 25 from previous encodes. I will also try 23 or 27 but 25 is out of the question I tried it and it dramatically increased the total play time of the video compared to the original one.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: Jan Gruuthuse on March 27, 2016, 07:00:10 AM
|-- x264 Configuration --|
[General]
Rate Control
Encoding Mode [Constant Rate Factor (Single Pass) ]

Should not influence playing time.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: AQUAR on March 27, 2016, 11:14:32 AM
I think Jan is implying that the bit rate might be to high for your media player to handle and hence the stuttering.
Increasing the rate control (not the same as increasing the video frame rate!) lowers the bit rate (and quality) of the recode, so your media player can keep up with the decoding process.

I am assuming its interlaced because its video of the family and its at the NTSC frame rate.
This is not always true though.

If it's a retail movie on dvd, then its usually film material as opposed to video material (subtle difference!).
That kind is subjected to telecining (NTSC only!) and is best de-interlaced by reversing that process. 

Are you playing back on a TV or PC monitor?
Media players (in case of TV playback) are more likely to drop frames if the video frame rate isn't integer divisible with the TV refresh rate (also a cause of stuttering!). Best to stick with 30 fps in this case (or 60 fps) if in NTSC land or 25 fps in PAL land.
Same kind of thing if playing back on a PC monitor (check what refresh is being used!).

On top if that - it really all depends on how good (if any is used!) the frame interpolation process is (creating new frames on the fly!).


Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 27, 2016, 03:30:18 PM
I'm going to watch or play it for TV viewing. I have movies stored on the media player with high bit rates like 10mb but they play smoothly. May be I will try Jan's suggestion on constant rate factor. But what's weird, I tried to 1 min samples at 23.97fps and 29.97 they both played smoothly but when I transcoded the whole 2hr video stuttering was a bit showing on 23 and 29 but when I tried muxing and watching without the audio stream it played smoothly.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 27, 2016, 03:37:52 PM
By the way to add info: why I chose avidemux? Because it's the only transcoder that I had no problems using tried handbrake before but my problem with it some videos tend to have artifacts at the end. Before that was using Total Video Converter the downside to TVC encoded vids(x264) tend to be unstable if you try fast fowarding/reverse the vid during play back vid starts to break up getting green artifacts. So I'm sticking to Avidemux I just have to figure out this stuttering issue with your suggestions. :D
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: Jan Gruuthuse on March 27, 2016, 04:00:42 PM
Quote from: maximillan on March 27, 2016, 03:30:18 PM
>8 >8 but when I tried muxing and watching without the audio stream it played smoothly.
?? audio track is AC3 (dolby) ?? -> convert to stereo (mp2 or AAC) 44100 Hz
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 27, 2016, 06:31:42 PM
Yes AC3. What I do is just load and transcode the vid stream to avidemux I notice transcoding time is much faster without any audio streams by 40%
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: Jan Gruuthuse on March 27, 2016, 06:35:50 PM
You still do have motion stutter, jerky movements with playback? Could be AC3 related, your media player(s) not supporting? AC3 could take cpu power of mediaplayer when no hardware ac3 decoding is present.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 27, 2016, 07:00:27 PM
Most of the other vids loaded on the media player are AC3 and few are AAC but they play fine.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: Jan Gruuthuse on March 28, 2016, 07:44:55 AM
Probably with the re-encoded combination of video and audio, you're reaching the limits of what can be decoded simultaneous by media player.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: AQUAR on March 28, 2016, 08:17:30 AM
The bit rate of the encoded video stream needs to be paired with the complexity of the codec if you want to get to the bottom of the stuttering.
Assuming of course that this is actually the problem (not convinced at all!).

AVC is complex enough but HECV goes even further.
The need to keep many referenced frames (or blocks!) in a buffer for proper on the fly decoding may well be to much for the media player for some intervals. Easing up on the AVC settings might help (not experienced in that area myself!).

Some end users were very much into these AVC settings - maybe they can suggest some changes to the default settings.
2 settings (as a guess) to help in that regard:
> reduce the maximum GOP size
> disable B frames as references
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 28, 2016, 08:40:08 AM
Jan- that could be possible.

AQUAR- stuttering is definitely the problem I would not bother if the stuttering was minimal but people walking across the screen seems like moving and pausing motion it's not that smooth.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: AQUAR on March 28, 2016, 08:51:40 AM
@ maximillan

I meant - not convinced that the reason for the stuttering is caused by bit rate / codec complexity issues associated with the media player.
Only way to find out is to ease up on loading the media player.
Some suggestions have been given for you to try out and see if it helps.

Some other causes have also been suggested for you to look at. 
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 28, 2016, 09:04:42 AM
Yes that's what I'm doing taking each suggestions by you guys trying it out one by one till I get the problem solved.😊 Regarding bit rates so far I have not gone above 4k but I will try lower down to 19..kbps hope quality won't suffer.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: AQUAR on March 28, 2016, 11:42:00 AM
@ maximillan

That's the way.

Do try to configure the x264 settings as I am curious if it will help.
Configure - Frame Tab - B Frames as reference - select disabled.

This will lower the compression ability (increase bit rate!) but makes it easier (faster) to decode.
At least that what I am thinking it will do. 

Also as Jan implied - if the AC3 audio is 5.1 channels - remix as stereo (2 channel) AC3 or AAC.
This too will reduce the decoding overhead on the media player.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on March 28, 2016, 12:08:15 PM
I will try that AQUAR thanks I never touched Frame Tab before but now I will try this thanks hope this is it.😊

For AC3 okay will downmix it to AAC stereo👍
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on April 07, 2016, 02:04:58 PM
Hello I'm back just to update with all of the suggestions and test I made one success result came from a couple of combined suggestions and one which sounded weird to get the perfect result.

Prodecure was: original file had to be first transcoded by TVC(total video converter) pro. Using system default settings for fps and bitrate at 4600kbs out file had a constant fps of 25 file size came out the same 4.1gb(looseless 100%) like the original file.
Load encoded file to Avidemux 2.5.6 not 2.6(2.6 would always output a file with variable fps) use constant crf no other filters etc encode. Result a file with a size of 2.1gb and constant fps of 25. Bitrate of file was at 3150kbs and picture quality was superb the way I like it. Of all the settings I tried that's the only procedure that worked I don't know why the only draw back that I just may accept is transcoding time since I had to transcode twice using to different programs.

So that's my update for everyone and thank you for all your suggestions I could not have fixed this without your inputs. I guess in the end the thing that made the stuttering go away was having a really "constant" fps.👍
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: AQUAR on April 08, 2016, 09:15:30 AM
If you are using mediainfo to see if a media file has constant or variable frame rate, it may well report incorrectly on the ADM 2.6 product.

Mediainfo samples the duration of the first few frames and other segments but will report variable if the first few frames are not constant in duration.
IIRC from some other threads here - ADM 2.6 can adjust the duration of the first few frames if needed (I am sure Mean will correct this if its not true!). 


Still think this should be doable in one transcode using ADM 2.6.
Glad you're work flow gives a good result and that is what matters.
Title: Re: Fps problem(motion stutter, jerky movements)
Post by: maximillan on April 08, 2016, 11:04:40 AM
Hi AQUAR, I really tried everything with 2.6 and 2.5.6 it would always result in a variable fps for 2.5.6 it may have resulted in a constant 25fps but it stretched the playing time by 30%. Agree with you it would have been much better with one transcode pass on ADM but it wasn't. Yes it may pros and cons, pro yes stuttering gone perfect quality and compression. Con transcoding time though. But at least it got fixed.😊