HB encode of 720p HD recording motion judders

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
starfury_de
Posts: 2
Joined: Fri Jan 25, 2013 8:46 am

HB encode of 720p HD recording motion judders

Post by starfury_de »

Using a MacBook 13" 2GHz Intel Core 2 Dou I am trying to recode the recordings from my SAT-reciever in a less size consuming format with Handbrake 0.98

After the encoding with any preset of Handbrake I obtain a video which judders at fast motions and camera pans. I tried playback of the video with VLC (2 different versions), mplayer and my Samsung LCD TV with the same behaviour.

The source material is a transport stream containing a x264 video stream and 3 audio stream from which I discard 2 while the encoding process, this is a part of the Mediainfo output:

Code: Select all

Video
ID                                       : 256 (0x100)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.0
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 6 frames
Format settings, GOP                     : M=4, N=33
Codec ID                                 : 27
Duration                                 : 1mn 0s
Bit rate                                 : 13.5 Mbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 50.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.294
Here is a shortened activity log of a encoding:

Code: Select all

HandBrake Activity Log for /Users/agross/Movies/Movies/REC_HB_AppleTV2.mp4: 2013-01-25 11:13:14 +0100
Handbrake Version: 0.9.8 x86_64 (2012071800)

[11:13:14] macgui: Rip: Pending queue count is 1
[11:13:14] macgui: getNextPendingQueueIndex next pending encode index is:0
[11:13:14] macgui: scanning specifically for title: 1
[11:13:14] hb_scan: path=/Users/agross/Movies/Movies/REC_V-COPY_A-ALL-COPY.ts, title_index=1
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening /Users/agross/Movies/Movies/REC_V-COPY_A-ALL-COPY.ts/BDMV/index.bdmv
libbluray/bluray.c:1471: nav_get_title_list(/Users/agross/Movies/Movies/REC_V-COPY_A-ALL-COPY.ts) failed (0x1038bba00)
[11:13:14] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[11:13:14] dvd: not a dvd - trying as a stream/file instead
[11:13:14] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[11:13:14] Found the following PIDS
[11:13:14]     Video PIDS : 
[11:13:14]       0x100 type H.264 (0x1b) (PCR)
[11:13:14]     Audio PIDS : 
[11:13:14]       0x101 type MPEG1 (0x3)
[11:13:14]       0x102 type MPEG1 (0x3)
[11:13:14]       0x103 type AC3 (0x81)
[11:13:14]     Other PIDS : 
[11:13:14] stream id 0x101 (type 0x3 substream 0x0) audio 0x101
[11:13:14] stream id 0x102 (type 0x3 substream 0x0) audio 0x102
[11:13:14] stream id 0x103 (type 0x81 substream 0x0) audio 0x103
[11:13:14] scan: decoding previews for title 1
[11:13:14] scan: audio 0x101: mp2, rate=48000Hz, bitrate=200000 Unknown (MPEG1) (2.0 ch)
[11:13:14] scan: audio 0x102: mp2, rate=48000Hz, bitrate=200000 Unknown (MPEG1) (2.0 ch)
[11:13:14] scan: audio 0x103: AC-3, rate=48000Hz, bitrate=448000 Unknown (AC3) (2.0 ch)
[11:13:15] scan: 10 previews, 1280x720, 50.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[11:13:15] scan: title (0) job->width:1280, job->height:720
[11:13:15] stream: 2 good frames, 0 errors (0%)
[11:13:15] libhb: scan thread found 1 valid title(s)
[11:13:15] macgui: ScanDone state received from fQueueEncodeLibhb
[11:13:15] macgui: Preset: Custom
[11:13:15] macgui: processNewQueueEncode number of passes expected is: 1
[11:13:15] macgui: Start / Stop set to chapters
[11:13:15] macgui: prepareJob exiting
[11:13:15] 1 job(s) to process
[11:13:15] starting job
[11:13:15] sync: expecting 3000 video frames
[11:13:15] job configuration:
[11:13:15]  * source
[11:13:15]    + /Users/agross/Movies/Movies/REC_V-COPY_A-ALL-COPY.ts
[11:13:15]    + title 1, chapter(s) 1 to 1
[11:13:15]  * destination
[11:13:15]    + /Users/agross/Movies/Movies/REC_HB_AppleTV2.mp4
[11:13:15]    + container: MPEG-4 (.mp4 and .m4v)
[11:13:15]  * video track
[11:13:15]    + decoder: h264
[11:13:15]      + bitrate 200 kbps
[11:13:15]    + frame rate: 50.000 fps -> constant 25.000 fps
[11:13:15]    + loose anamorphic
[11:13:15]      + storage dimensions: 1280 * 720 -> 1280 * 720, crop 0/0/0/0, mod 16
[11:13:15]      + pixel aspect ratio: 1 / 1
[11:13:15]      + display dimensions: 1280 * 720
[11:13:15]    + encoder: H.264 (x264)
[11:13:15]      + options: chroma_me=1:trellis=0:b-pyramid=strict:b_adapt=1:profile=High:level=31:8x8dct=0:analyse=0x3,0x10
[11:13:15]      + quality: 20.00 (RF)
[11:13:15]  * audio track 1
[11:13:15]    + decoder: Unknown (MPEG1) (2.0 ch) (track 1, id 0x101)
[11:13:15]    + mixdown: Stereo
[11:13:15]    + encoder: AAC (ffmpeg)
[11:13:15]      + bitrate: 128 kbps, samplerate: 48000 Hz
[11:13:15] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[11:13:15] reader: first SCR 180 id 0x100 DTS 360
[11:13:15] x264 options: Unknown suboption profile
[11:13:15] encx264: encoding with stored aspect 1/1
[11:13:15] encx264: Encoding at constant RF 20.000000
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile Main, level 3.1
[11:13:15] h264: "" (1) at frame 0 time 3600
[11:13:15] sync: first pts is 3600
[11:13:16] sync: video time didn't advance - dropped 2 frames (delta 60 ms, current 8483, next 12083, dur 3600)
[11:13:16] sync: video time didn't advance - dropped 2 frames (delta 60 ms, current 15683, next 19283, dur 3600)
[11:13:16] sync: video time didn't advance - dropped 2 frames (delta 60 ms, current 22883, next 26483, dur 3600)
[11:13:16] sync: video time didn't advance - dropped 2 frames (delta 60 ms, current 30083, next 33683, dur 3600)
[11:13:16] sync: video time didn't advance - dropped 2 frames (delta 60 ms, current 37283, next 40883, dur 3600)
[11:13:16] sync: video time didn't advance - dropped 2 frames (delta 60 ms, current 44483, next 48083, dur 3600)
[11:13:16] sync: video time didn't advance - dropped 2 frames (delta 60 ms, current 51683, next 55283, dur 3600)
...
11:15:46] sync: video time didn't advance - dropped 2 frames (delta 60 ms, current 5395883, next 5399483, dur 3600)
[11:15:46] sync: video time didn't advance - dropped 2 frames (delta 60 ms, current 5403083, next 5406683, dur 3600)
[11:15:46] sync: video time didn't advance - dropped 2 frames (delta 60 ms, current 5410283, next 5413883, dur 3600)
[11:15:52] work: average encoding speed for job is 9.762753 fps
[11:15:53] sync: got 1477 frames, 3000 expected
[11:15:53] h264-decoder done: 3009 frames, 0 decoder errors, 0 drops
[11:15:53] render: 1505 frames output, 2 dropped and 30 duped for CFR/PFR
[11:15:53] render: lost time: 0 (0 frames)
[11:15:53] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:24    Avg QP:17.73  size:111600  PSNR Mean Y:47.50 U:50.51 V:50.96 Avg:48.32 Global:47.83
x264 [info]: frame P:845   Avg QP:21.65  size: 27529  PSNR Mean Y:43.45 U:45.66 V:46.66 Avg:44.16 Global:43.85
x264 [info]: frame B:636   Avg QP:24.79  size:  6219  PSNR Mean Y:42.81 U:45.14 V:46.04 Avg:43.53 Global:43.24
x264 [info]: consecutive B-frames: 31.0% 31.2% 19.9% 17.8%
x264 [info]: mb I  I16..4: 12.8%  0.0% 87.2%
x264 [info]: mb P  I16..4: 10.2%  0.0%  0.0%  P16..4: 69.0%  0.0%  0.0%  0.0%  0.0%    skip:20.8%
x264 [info]: mb B  I16..4:  0.6%  0.0%  0.0%  B16..8: 44.0%  0.0%  0.0%  direct: 3.6%  skip:51.8%  L0:35.1% L1:53.2% BI:11.7%
x264 [info]: coded y,uvDC,uvAC intra: 61.9% 87.0% 59.6% inter: 20.2% 31.4% 7.6%
x264 [info]: i16 v,h,dc,p: 37% 24% 13% 26%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 21%  7%  6%  8%  8%  8%  8%  7%
x264 [info]: i8c dc,h,v,p: 36% 21% 30% 12%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 63.0% 21.7% 11.6%  3.7%
x264 [info]: ref B L0: 93.0%  7.0%
x264 [info]: ref B L1: 96.5%  3.5%
x264 [info]: SSIM Mean Y:0.9848654 (18.200db)
x264 [info]: PSNR Mean Y:43.242 U:45.518 V:46.463 Avg:43.962 Global:43.623 kb/s:3972.90
[11:15:53] mp2-decoder done: 0 frames, 0 decoder errors, 0 drops
[11:15:53] mux: track 0, 1505 frames, 29895236 bytes, 3972.79 kbps, fifo 1024
[11:15:53] mux: track 1, 2820 frames, 961621 bytes, 127.79 kbps, fifo 2048
[11:15:53] stream: 3011 good frames, 0 errors (0%)
[11:15:53] libhb: work result = 0
BTW: Could anybody tell me what "sync: video time didn't advance - dropped X frames ..." mean?

I tried some other video streams of the same source (SAT-reciever) with the same juddering result, wether I try any setting of the framerate (Same as source, 50fps variable or constant, 25fps constant) and with detelecine and deinterlace on and off, nothing matters. I also tried encoding with constant bit rate up to 10.000kbps without any change.

For test purpose I encoded the video with FFMPEG and got a reasonable result without any juddering and soft motions (although a little bit bigger in file size).

I read through the forum and many other interesting source in the web but can't find a solution.

Can anybody point me to the right direction to get a adequate result for my videos with handbrake.

Thanks in advance
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: HB encode of 720p HD recording motion judders

Post by Smithcraft »

I would guess, just by seeing what your source device is, that you need something to reindex your ts files. I don't know of any for OS X.

SC
HandyMan
Bright Spark User
Posts: 169
Joined: Tue Aug 07, 2012 10:52 pm

Re: HB encode of 720p HD recording motion judders

Post by HandyMan »

Depends on what you used discard the audio tracks.
I am getting similar audio gap when I cut some ts file with Avidemux.
mduell
Veteran User
Posts: 8205
Joined: Sat Apr 21, 2007 8:54 pm

Re: HB encode of 720p HD recording motion judders

Post by mduell »

Cramming down the framerate to a constant 25fps will almost certainly be a problem. Leave it as same as source/variable.
starfury_de
Posts: 2
Joined: Fri Jan 25, 2013 8:46 am

Re: HB encode of 720p HD recording motion judders

Post by starfury_de »

A few additional words to the source. As most of the SAT-recievers recording to disk the files are splittet into 2GB parts. I am joining the transport streams with "cat". After this I am cutting the resulting file with avidemux3 (2.6.0) and saving the result with streamcopy in a mpeg.ts to disk. (If I'm not completely wrong, avidemux is re-indexing the files.)

The audio track are discarded only in Handbrake, where I only select the stream I need.

Regarding the framerate I also tried to leave the framerate "Same as source", with the same juddering result, but as mentioned ffmpeg seems to handle the files without any problem in the output.
Post Reply