Problem: Decoder not seeing all frames of video to encode

HandBrake for Windows 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
Ivarsson
Posts: 2
Joined: Thu Jul 21, 2011 1:06 pm

Problem: Decoder not seeing all frames of video to encode

Post by Ivarsson »

Hi,
Thank you for a great app, I've encoded all of my DVDs using it and I've never had a problem.

I have though got a problem with encoding a Pokémon film I've transferred to the PC using a DC10+ card. The mjpeg file produced by the hardware on the DC10+ plays fine on the PC. When I encode it seems like Handbrake's decoder skips frames and the video is jerky and very fast. In fact the video ends at approximately 24 minutes and the sound is 96 minutes long. It seems like the decoder only sees every fourth frame.
I encoded the movie using AutoGordianKnot 2.55 and the result was OK with fluent video at the right rate and the audio in sync. I however want to encode the video using Handbrake, is there some way to force Handbrake to see all frames in the video?

I have the log here:

Code: Select all

# Windows GUI 0.9.5 2011010300
# Running: Microsoft Windows NT 5.1.2600 Service Pack 3
# CPU: Intel(R) Core(TM)2 CPU          4400  @ 2.00GHz
# Ram: 1791 MB
# Screen: 1360x768
# Temp Dir: C:\Documents and Settings\Default_user\Lokala inställningar\Temp\
# Install Dir: C:\Program\Handbrake
# Data Dir: C:\Documents and Settings\Default_user\Application Data\HandBrake\HandBrake\0.9.5.3728

# CLI Query:  -i "F:\videocap\Pokemon.avi" -t 1 -c 1 -o "F:\Pokemon.m4v"  -f mp4 --deinterlace="slower" -w 768 --crop 76:76:0:0 --loose-anamorphic  -e x264 -q 20 -a 1 -E faac -6 dpl2 -R 44.1 -B 160 -D 0 -x ref=2:bframes=2:subq=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0 --verbose=1 --no-dvdnav
# User Query: False
-------------------------------------------

[12:07:34] hb_init: checking cpu count
[12:07:34] hb_init: starting libhb thread
HandBrake 0.9.5 (2011010300) - MinGW i386 - http://handbrake.fr
2 CPUs detected
Opening F:\videocap\Pokemon.avi...
[12:07:34] hb_scan: path=F:\videocap\Pokemon.avi, title_index=1
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening F:\videocap\Pokemon.avi/BDMV/index.bdmv
libbluray/bluray.c:960: nav_get_title_list(F:\videocap\Pokemon.avi) failed (0x18eb4e8)
[12:07:34] bd: not a bd - trying as a stream/file instead
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.
ERROR: dvd: ifoOpen failed
Input #0, avi, from 'F:\videocap\Pokemon.avi':
  Duration: 01:36:00.16, start: 0.000000, bitrate: 49451 kb/s
    Stream #0.0: Video: mjpeg, yuvj422p, 768x576, 25 tbr, 25 tbn, 25 tbc
    Stream #0.1: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
[12:07:35] scan: decoding previews for title 1
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
[12:07:36] scan: 10 previews, 768x576, 25.000 fps, autocrop = 0/0/0/0, aspect 4:3, PAR 1:1
[12:07:36] Title is likely interlaced or telecined (10 out of 10 previews). You should do something about that.
[12:07:36] scan: title (0) job->width:768, job->height:576
[12:07:36] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: F:\videocap\Pokemon.avi
  + duration: 01:36:00
  + size: 768x576, pixel aspect: 1/1, display aspect: 1.33, 25.000 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 01:36:00
  + audio tracks:
    + 1, Unknown (PCM_S16) (2.0 ch) (iso639-2: und)
  + subtitle tracks:
  + combing detected, may be interlaced or telecined
[12:07:37] 1 job(s) to process
[12:07:37] starting job
[12:07:37] work: sanitizing track 0 mixdown Dolby Pro Logic II to Stereo
[12:07:37] sync: expecting 144029 video frames
[12:07:37] job configuration:
[12:07:37]  * source
[12:07:37]    + F:\videocap\Pokemon.avi
[12:07:37]    + title 1, chapter(s) 1 to 1
[12:07:37]    + container: avi
[12:07:37]    + data rate: 49451 kbps
[12:07:37]  * destination
[12:07:37]    + F:\Pokemon.m4v
[12:07:37]    + container: MPEG-4 (.mp4 and .m4v)
[12:07:37]  * video track
[12:07:37]    + decoder: mjpeg
[12:07:37]    + frame rate: same as source (around 25.000 fps)
[12:07:37]    + loose anamorphic
[12:07:37]      + storage dimensions: 768 * 576 -> 768 * 416, crop 76/76/0/0, mod 0
[12:07:37]      + pixel aspect ratio: 52 / 53
[12:07:37]      + display dimensions: 753 * 416
[12:07:37]    + filter
[12:07:37]      + Deinterlace (ffmpeg or yadif/mcdeint) (0)
[12:07:37]    + encoder: x264
[12:07:37]      + options: ref=2:bframes=2:subq=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0
[12:07:37]      + quality: 20.00 (RF)
[12:07:37]  * audio track 0
[12:07:37]    + decoder: Unknown (PCM_S16) (2.0 ch) (track 1, id 1)
[12:07:37]    + mixdown: Stereo
[12:07:37]    + encoder: faac
[12:07:37]      + bitrate: 160 kbps, samplerate: 44100 Hz
[12:07:37] Yadif Deinterlace thread started for segment 0
[12:07:37] Yadif Deinterlace thread started for segment 1
[12:07:37] encx264: encoding with stored aspect 52/53
[12:07:37] encx264: Encoding at constant RF 20.000000
x264 [info]: using SAR=52/53
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile Main, level 3.0
[12:07:38] reader: first SCR 0 id 0 DTS 0
[14:21:04] reader: done. 1 scr changes
[14:21:09] work: average encoding speed for job is 4.499768 fps
[14:21:09] sync: got 36033 frames, 144029 expected
[14:21:09] mjpeg-decoder done: 36033 frames, 0 decoder errors, 0 drops
[14:21:10] render: lost time: 0 (0 frames)
[14:21:10] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:1900  Avg QP:19.28  size: 21587  PSNR Mean Y:45.49 U:50.01 V:50.63 Avg:46.59 Global:46.49
x264 [info]: frame P:23249 Avg QP:22.03  size:  7415  PSNR Mean Y:43.03 U:47.80 V:48.89 Avg:44.18 Global:44.03
x264 [info]: frame B:10883 Avg QP:23.38  size:  3182  PSNR Mean Y:41.86 U:47.05 V:48.28 Avg:43.07 Global:42.94
x264 [info]: consecutive B-frames: 44.2% 31.8% 24.0%
x264 [info]: mb I  I16..4: 22.0%  0.0% 78.0%
x264 [info]: mb P  I16..4:  3.7%  0.0% 10.3%  P16..4: 63.3% 11.2%  6.6%  0.0%  0.0%    skip: 4.9%
x264 [info]: mb B  I16..4:  8.1%  0.0%  0.9%  B16..8: 35.4%  9.2%  0.5%  direct:22.0%  skip:24.0%  L0:42.6% L1:49.4% BI: 8.0%
x264 [info]: coded y,uvDC,uvAC intra: 63.8% 83.6% 35.3% inter: 17.1% 57.9% 0.4%
x264 [info]: i16 v,h,dc,p: 20% 34% 19% 27%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 25% 19%  6%  7%  6%  7%  5%  5%
x264 [info]: i8c dc,h,v,p: 43% 31% 14% 12%
x264 [info]: Weighted P-Frames: Y:14.1% UV:6.2%
x264 [info]: ref P L0: 58.8% 12.2% 27.0%  2.1%
x264 [info]: ref B L0: 57.3% 42.7%
x264 [info]: ref B L1: 90.1%  9.9%
x264 [info]: SSIM Mean Y:0.9746547 (15.961db)
x264 [info]: PSNR Mean Y:42.807 U:47.691 V:48.799 Avg:43.974 Global:43.764 kb/s:1376.71
[14:21:11] pcm_s16le-decoder done: 0 frames, 0 decoder errors, 0 drops
[14:21:13] mux: track 0, 36032 frames, 247989735 bytes, 344.41 kbps, fifo 128
[14:21:13] mux: track 1, 248076 frames, 115200558 bytes, 159.99 kbps, fifo 65536
[14:21:13] libhb: work result = 0
Rip done!
HandBrake has exited.
Any help is really appreciated as I intend to transfer all of the old VHS tapes I have.
Deleted User 13735

Re: Problem: Decoder not seeing all frames of video to encod

Post by Deleted User 13735 »

DC10+ uses a hardware codec on the Phillips Zoran chip. I haven't tried it, but I suspect the hardware decoder is not interfacing well with Handbrake.
Install a software MJPEG codec, temporarily disable DC10+, and try again. The Mainconcept demo is fabulous for decoding and doesn't expire.
http://downloads.mainconcept.com/mdl/md ... v3.2.4.exe

That being said, plain old A->D DV passthrough, such as with a Canon camcorder or Canopus AVDC is far superior to the old DC10/DC30, although it was the best we had in the day.
User avatar
Rodeo
HandBrake Team
Posts: 12872
Joined: Tue Mar 03, 2009 8:55 pm

Re: Problem: Decoder not seeing all frames of video to encod

Post by Rodeo »

Try the nightly build (see the announcement at the top of every subforum) - it features a newer build of FFmpeg which might handle your source better.
User avatar
Rodeo
HandBrake Team
Posts: 12872
Joined: Tue Mar 03, 2009 8:55 pm

Re: Problem: Decoder not seeing all frames of video to encod

Post by Rodeo »

musicvid wrote:DC10+ uses a hardware codec on the Phillips Zoran chip. I haven't tried it, but I suspect the hardware decoder is not interfacing well with Handbrake.
Install a software MJPEG codec, temporarily disable DC10+, and try again. The Mainconcept demo is fabulous for decoding and doesn't expire.
http://downloads.mainconcept.com/mdl/md ... v3.2.4.exe

That being said, plain old A->D DV passthrough, such as with a Canon camcorder or Canopus AVDC is far superior to the old DC10/DC30, although it was the best we had in the day.
HandBrake is self-contained. Nothing "interfaces" with it. You can disable/enable stuff and install all codecs you want, it won't make any difference.
Deleted User 13735

Re: Problem: Decoder not seeing all frames of video to encod

Post by Deleted User 13735 »

Thanks for clarifying, and I hope the newer build takes care of his problem.
Older ffmpeg wouldn't even touch DC10/30 files when I tested some time back.
Deleted User 13735

Re: Problem: Decoder not seeing all frames of video to encod

Post by Deleted User 13735 »

I downloaded svn4125, and the results are the same as the OP described.
Many jumped frames, decomb not working, wrong colorspace.
Third party conversion tools or another capture route would be your best alternative.
User avatar
Rodeo
HandBrake Team
Posts: 12872
Joined: Tue Mar 03, 2009 8:55 pm

Re: Problem: Decoder not seeing all frames of video to encod

Post by Rodeo »

Can you provide a short sample (30 seconds or less)?
Deleted User 13735

Re: Problem: Decoder not seeing all frames of video to encod

Post by Deleted User 13735 »

Here's one, only 10 seconds, from the DC10+ (ca. 20th century)
As I guessed, VLC doesn't like it either.
Link good for a few days.
http://dl.dropbox.com/u/20519276/cartrack.avi
User avatar
Rodeo
HandBrake Team
Posts: 12872
Joined: Tue Mar 03, 2009 8:55 pm

Re: Problem: Decoder not seeing all frames of video to encod

Post by Rodeo »

I'll see about submitting a bug report to Libav.

FWIW, QuickTime fails to display any video at all.
Ivarsson
Posts: 2
Joined: Thu Jul 21, 2011 1:06 pm

Re: Problem: Decoder not seeing all frames of video to encod

Post by Ivarsson »

Thanks for hte replies and help. (Musicvid beat me to posting a clip.)
Post Reply