Encoding To MKV: Not exact size, and only 1 audio track?

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
kwanbis
Posts: 17
Joined: Wed Mar 11, 2009 9:13 pm

Encoding To MKV: Not exact size, and only 1 audio track?

Post by kwanbis » Thu Mar 12, 2009 12:52 am

Lets try to post this again.

I'm trying to encode encode my Robotech collection to MKV+h264+AAC.

Only problem is that i have defined 250 MB as the target, and i get 220 (when i defined 300 i got 275).

And i only get spanish, not english.

Here are the logs.

Code: Select all

### Windows GUI 0.9.3 2008112300 
### Running: Microsoft Windows NT 5.1.2600 Service Pack 2 
###
### CPU: Intel(R) Core(TM) Duo CPU      T2400  @ 1.83GHz 
### Ram: 2038 MB 
### Screen: 1400x1050 
### Temp Dir: C:\Documents and Settings\Administrador\Configuración local\Temp\ 
### Install Dir: C:\Program Files\HandBrake 
### Data Dir: C:\Documents and Settings\Administrador\Application Data\HandBrake\HandBrake\0.9.3.0 
#########################################

### CLI Query:  -i "D:\VIDEO_TS" -t 3 -c 1-6 -o "C:\$USER\$Robotech\Capitulo 2.mkv" -f mkv --decomb  -p  --detelecine -e x264 -S 250 -2  -T  -a 2,1 -E faac,faac -B 160,160 -R 0,0 -6 stereo,stereo -D 1,1 -U  --markers="C:\Documents and Settings\Administrador\Configuración local\Temp\VIDEO_TS-3-chapters.csv" -x ref=5:mixed-refs=1:bframes=6:weightb=1:direct=auto:b-pyramid=1:me=umh:analyse=all:8x8dct=1:trellis=1:nr=150:no-fast-pskip=1:deblock=2,2:psy-rd=1,1:subq=9 -v 
#########################################
[20:54:28] hb_init: checking cpu count
[20:54:28] hb_init: starting libhb thread
HandBrake 0.9.3 (2008112300) - http://handbrake.fr/
2 CPUs detected
Opening D:\VIDEO_TS...
[20:54:28] hb_scan: path=D:\VIDEO_TS, title_index=3
[20:54:28] scan: trying to open with libdvdread
[20:54:28] scan: DVD has 9 title(s)
[20:54:28] scan: scanning title 3
[20:54:28] scan: opening IFO for VTS 3
[20:54:28] pgc_id: 1, pgn: 1: pgc: 0x1586060
[20:54:28] scan: vts=3, ttn=1, cells=0->5, blocks=0->345923, 345924 blocks
[20:54:28] scan: duration is 00:24:09 (1449233 ms)
[20:54:28] scan: checking audio 1
[20:54:28] scan: id=80bd, lang=English (AC3), 3cc=eng ext=0
[20:54:28] scan: checking audio 2
[20:54:28] scan: id=81bd, lang=Espanol (AC3), 3cc=spa ext=0
[20:54:28] scan: title 3 has 6 chapters
[20:54:28] scan: chap 1 c=0->0, b=0->22641 (22642), 90193 ms
[20:54:28] scan: chap 2 c=1->1, b=22642->182002 (159361), 681230 ms
[20:54:28] scan: chap 3 c=2->2, b=182003->325838 (143836), 598120 ms
[20:54:28] scan: chap 4 c=3->3, b=325839->332944 (7106), 29298 ms
[20:54:28] scan: chap 5 c=4->4, b=332945->345862 (12918), 50078 ms
[20:54:28] scan: chap 6 c=5->5, b=345863->345923 (61), 310 ms
[20:54:28] scan: aspect = 0
[20:54:28] scan: decoding previews for title 3
[20:54:28] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[20:54:28] scan: audio 0x81bd: AC-3, rate=48000Hz, bitrate=448000 Espanol (AC3) (5.1 ch)
Scanning title 3...
[20:54:28] scan: 10 previews, 720x480, 29.970 fps, autocrop = 0/0/6/4, aspect 4:3, PAR 8:9
[20:54:28] scan: title (0) job->width:624, job->height:480
[20:54:28] libhb: scan thread found 1 valid title(s)
+ title 3:
  + vts 3, ttn 1, cells 0->5 (345924 blocks)
  + duration: 00:24:09
  + size: 720x480, aspect: 1.33, 29.970 fps
  + autocrop: 0/0/6/4
  + chapters:
    + 1: cells 0->0, 22642 blocks, duration 00:01:30
    + 2: cells 1->1, 159361 blocks, duration 00:11:21
    + 3: cells 2->2, 143836 blocks, duration 00:09:58
    + 4: cells 3->3, 7106 blocks, duration 00:00:29
    + 5: cells 4->4, 12918 blocks, duration 00:00:50
    + 6: cells 5->5, 61 blocks, duration 00:00:00
  + audio tracks:
    + 1, English (AC3) (5.1 ch), 48000Hz, 448000bps
    + 2, Espanol (AC3) (5.1 ch), 48000Hz, 448000bps
  + subtitle tracks:
Reading chapter markers from file C:\Documents and Settings\Administrador\Configuraci?n local\Temp\VIDEO_TS-3-chapters.csv
Invalid sample rate 0, using input rate 48000
Invalid sample rate 0, using input rate 48000
Calculated bitrate: 1120 kbps
Subtitle Scan Enabled - enabling subtitles if found for foreign language segments
Modified x264 options for pass 1 to append turbo options: ref=5:mixed-refs=1:bframes=6:weightb=1:direct=auto:b-pyramid=1:me=umh:analyse=all:8x8dct=1:trellis=1:nr=150:no-fast-pskip=1:deblock=2,2:psy-rd=1,1:subq=9:ref=1:subme=1:me=dia:analyse=none:trellis=0:no-fast-pskip=0:8x8dct=0:weightb=0
[20:54:28] 3 job(s) to process
[20:54:28] starting job
[20:54:28] job configuration:
[20:54:28]  * source
[20:54:28]    + D:\VIDEO_TS
[20:54:28]    + title 3, chapter(s) 1 to 6
[20:54:28]  * destination
[20:54:28]    + C:\$USER\$Robotech\Capitulo 2.mkv
[20:54:28]    + container: Matroska (.mkv)
[20:54:28]      + chapter markers
[20:54:28]  * video track
[20:54:28]    + decoder: mpeg2
[20:54:28]      + bitrate 8800 kbps
[20:54:28]    + frame rate: 29.970 fps -> variable fps
[20:54:28]    + strict anamorphic
[20:54:28]      + storage dimensions: 720 * 480 -> 710 * 480, crop 0/0/6/4
[20:54:28]      + pixel aspect ratio: 8 / 9
[20:54:28]      + display dimensions: 631 * 480
[20:54:28]    + filters
[20:54:28]      + Detelecine (pullup) (default settings)
[20:54:28]      + Deinterlaces selectively with yadif/mcdeint and lowpass5 blending (default settings)
[20:54:28] yadif thread started for segment 0
[20:54:28] yadif thread started for segment 1
[20:54:28] decomb thread started for segment 0
[20:54:28] decomb thread started for segment 1
[20:54:28] sync: expecting 43463 video frames
[20:54:29] reader: first SCR 146
[20:56:32] dvd: end of cell 5 at block 345863
[20:56:32] reader: done. 0 scr changes
[20:56:32] sync: got 0 frames, 43463 expected
[20:56:32] work: average encoding speed for job is 0.000000 fps
[20:56:32] mpeg2 done: 0 frames
[20:56:32] render: lost time: 0 (0 frames)
[20:56:32] render: gained time: 0 (0 frames) (0 not accounted for)
[20:56:32] decomb: yadif deinterlaced 0 | blend deinterlaced 0 | unfiltered 0 | total 0
[20:56:32] starting job
[20:56:32] job configuration:
[20:56:32]  * source
[20:56:32]    + D:\VIDEO_TS
[20:56:32]    + title 3, chapter(s) 1 to 6
[20:56:32]  * destination
[20:56:32]    + C:\$USER\$Robotech\Capitulo 2.mkv
[20:56:32]    + container: Matroska (.mkv)
[20:56:32]      + chapter markers
[20:56:32]  * video track
[20:56:32]    + decoder: mpeg2
[20:56:32]      + bitrate 8800 kbps
[20:56:32]    + frame rate: 29.970 fps -> variable fps
[20:56:32]    + strict anamorphic
[20:56:32]      + storage dimensions: 720 * 480 -> 710 * 480, crop 0/0/6/4
[20:56:32]      + pixel aspect ratio: 8 / 9
[20:56:32]      + display dimensions: 631 * 480
[20:56:32]    + filters
[20:56:32]      + Detelecine (pullup) (default settings)
[20:56:32]      + Deinterlaces selectively with yadif/mcdeint and lowpass5 blending (default settings)
[20:56:32]    + encoder: x264
[20:56:32]      + options: ref=5:mixed-refs=1:bframes=6:weightb=1:direct=auto:b-pyramid=1:me=umh:analyse=all:8x8dct=1:trellis=1:nr=150:no-fast-pskip=1:deblock=2,2:psy-rd=1,1:subq=9:ref=1:subme=1:me=dia:analyse=none:trellis=0:no-fast-pskip=0:8x8dct=0:weightb=0
[20:56:32]      + bitrate: 1120 kbps, pass: 1
[20:56:32]  * audio track 0
[20:56:32]    + decoder: Espanol (AC3) (5.1 ch) (track 2, id 81bd)
[20:56:32]      + bitrate: 448 kbps, samplerate: 48000 Hz
[20:56:32]    + mixdown: Stereo
[20:56:32]    + encoder: faac
[20:56:32]      + bitrate: 160 kbps, samplerate: 48000 Hz
[20:56:32]  * audio track 1
[20:56:32]    + decoder: English (AC3) (5.1 ch) (track 1, id 80bd)
[20:56:32]      + bitrate: 448 kbps, samplerate: 48000 Hz
[20:56:32]    + mixdown: Stereo
[20:56:32]    + encoder: faac
[20:56:32]      + bitrate: 160 kbps, samplerate: 48000 Hz
[20:56:32] yadif thread started for segment 0
[20:56:32] yadif thread started for segment 1
[20:56:32] decomb thread started for segment 0
[20:56:32] decomb thread started for segment 1
[20:56:32] encx264: keyint-min: 30, keyint-max: 300
[20:56:32] encx264: encoding with stored aspect 8/9
x264 [warning]: width or height not divisible by 16 (710x480), compression will suffer.
x264 [info]: using SAR=8/9
x264 [info]: using cpu capabilities: MMX2 Cache64
x264 [info]: profile Main, level 3.0
No accelerated IMDCT transform found
[20:56:33] reader: first SCR 146
[20:56:33] mpeg2: "Chapter 1" (1) at frame 0 time 9009
No accelerated IMDCT transform found
[20:56:33] sync: expecting 43463 video frames
[20:56:33] sync: first pts is 9009
[20:58:02] mpeg2: "Chapter 2" (2) at frame 2721 time 8180172
[21:07:01] mpeg2: "Chapter 3" (3) at frame 23126 time 69456387
[21:14:59] mpeg2: "Chapter 4" (4) at frame 41061 time 123315192
[21:15:30] mpeg2: "Chapter 5" (5) at frame 41958 time 126008883
[21:16:11] dvd: end of cell 5 at block 345863
[21:16:12] reader: done. 0 scr changes
[21:16:12] mpeg2: "Chapter 6" (6) at frame 43458 time 130513383
[21:16:13] sync: got 43474 frames, 43463 expected
[21:16:13] work: average encoding speed for job is 36.827553 fps
[21:16:14] mpeg2 done: 43475 frames
[21:16:14] render: lost time: 20042022 (6674 frames)
[21:16:14] render: gained time: 20042022 (25957 frames) (0 not accounted for)
[21:16:14] render: average dropped frame duration: 3003
x264 [info]: slice I:441   Avg QP:23.26  size: 28081  PSNR Mean Y:41.22 U:44.40 V:44.45 Avg:41.98 Global:40.23
x264 [info]: slice P:15579 Avg QP:25.94  size:  8121  PSNR Mean Y:37.25 U:41.98 V:42.11 Avg:38.27 Global:37.03
x264 [info]: slice B:20776 Avg QP:26.94  size:  1664  PSNR Mean Y:37.68 U:42.29 V:42.32 Avg:38.68 Global:37.60
x264 [info]: consecutive B-frames: 18.4% 20.7% 12.6% 15.2% 19.6% 12.0%  1.6%
x264 [info]: mb I  I16..4: 34.8%  0.0% 65.2%
x264 [info]: mb P  I16..4: 20.0%  0.0%  0.0%  P16..4: 59.7%  0.0%  0.0%  0.0%  0.0%    skip:20.3%
x264 [info]: mb B  I16..4:  1.0%  0.0%  0.0%  B16..8: 20.5%  0.0%  0.0%  direct:11.3%  skip:67.3%  L0:32.4% L1:58.4% BI: 9.3%
x264 [info]: final ratefactor: 25.46
x264 [info]: direct mvs  spatial:99.9%  temporal:0.1%
x264 [info]: SSIM Mean Y:0.9635962
x264 [info]: PSNR Mean Y:37.541 U:42.182 V:42.257 Avg:38.548 Global:37.369 kb/s:1130.34
[21:16:14] decomb: yadif deinterlaced 100 | blend deinterlaced 286 | unfiltered 36413 | total 36799
[21:16:14] starting job
[21:16:14] job configuration:
[21:16:14]  * source
[21:16:14]    + D:\VIDEO_TS
[21:16:14]    + title 3, chapter(s) 1 to 6
[21:16:14]  * destination
[21:16:14]    + C:\$USER\$Robotech\Capitulo 2.mkv
[21:16:14]    + container: Matroska (.mkv)
[21:16:14]      + chapter markers
[21:16:14]  * video track
[21:16:14]    + decoder: mpeg2
[21:16:14]      + bitrate 8800 kbps
[21:16:14]    + frame rate: 29.970 fps -> variable fps
[21:16:14]    + strict anamorphic
[21:16:14]      + storage dimensions: 720 * 480 -> 710 * 480, crop 0/0/6/4
[21:16:14]      + pixel aspect ratio: 8 / 9
[21:16:14]      + display dimensions: 631 * 480
[21:16:14]    + filters
[21:16:14]      + Detelecine (pullup) (default settings)
[21:16:14]      + Deinterlaces selectively with yadif/mcdeint and lowpass5 blending (default settings)
[21:16:14]    + encoder: x264
[21:16:14]      + options: ref=5:mixed-refs=1:bframes=6:weightb=1:direct=auto:b-pyramid=1:me=umh:analyse=all:8x8dct=1:trellis=1:nr=150:no-fast-pskip=1:deblock=2,2:psy-rd=1,1:subq=9
[21:16:14]      + bitrate: 1120 kbps, pass: 2
[21:16:14]  * audio track 0
[21:16:14]    + decoder: Espanol (AC3) (5.1 ch) (track 2, id 81bd)
[21:16:14]      + bitrate: 448 kbps, samplerate: 48000 Hz
[21:16:14]    + mixdown: Stereo
[21:16:14]    + encoder: faac
[21:16:14]      + bitrate: 160 kbps, samplerate: 48000 Hz
[21:16:14]  * audio track 1
[21:16:14]    + decoder: English (AC3) (5.1 ch) (track 1, id 80bd)
[21:16:14]      + bitrate: 448 kbps, samplerate: 48000 Hz
[21:16:14]    + mixdown: Stereo
[21:16:14]    + encoder: faac
[21:16:14]      + bitrate: 160 kbps, samplerate: 48000 Hz
[21:16:14] yadif thread started for segment 0
[21:16:14] yadif thread started for segment 1
[21:16:14] decomb thread started for segment 0
[21:16:14] decomb thread started for segment 1
[21:16:14] encx264: keyint-min: 30, keyint-max: 300
[21:16:14] encx264: encoding with stored aspect 8/9
x264 [warning]: width or height not divisible by 16 (710x480), compression will suffer.
x264 [info]: using SAR=8/9
x264 [info]: using cpu capabilities: MMX2 Cache64
[21:16:16] reader: first SCR 146
[21:16:16] mpeg2: "Chapter 1" (1) at frame 0 time 9009
x264 [info]: profile High, level 3.0
No accelerated IMDCT transform found
No accelerated IMDCT transform found
[21:16:18] sync: expecting 43463 video frames
[21:16:18] sync: first pts is 9009
[21:22:44] mpeg2: "Chapter 2" (2) at frame 2721 time 8180172
[22:03:15] mpeg2: "Chapter 3" (3) at frame 23126 time 69456387
[22:43:47] mpeg2: "Chapter 4" (4) at frame 41061 time 123315192
[22:45:37] mpeg2: "Chapter 5" (5) at frame 41958 time 126008883
[22:48:30] dvd: end of cell 5 at block 345863
[22:48:35] reader: done. 0 scr changes
[22:48:36] mpeg2: "Chapter 6" (6) at frame 43458 time 130513383
[22:48:40] sync: got 43474 frames, 43463 expected
[22:48:40] work: average encoding speed for job is 7.844205 fps
[22:48:41] mpeg2 done: 43475 frames
[22:48:41] render: lost time: 20042022 (6674 frames)
[22:48:41] render: gained time: 20042022 (25957 frames) (0 not accounted for)
[22:48:41] render: average dropped frame duration: 3003
x264 [info]: slice I:441   Avg QP:24.20  size: 26762  PSNR Mean Y:40.71 U:45.95 V:46.01 Avg:41.81 Global:40.28
x264 [info]: slice P:15584 Avg QP:26.92  size:  8154  PSNR Mean Y:37.82 U:43.44 V:43.64 Avg:38.97 Global:37.95
x264 [info]: slice B:20771 Avg QP:27.93  size:  1589  PSNR Mean Y:38.33 U:43.80 V:43.88 Avg:39.47 Global:38.54
x264 [info]: consecutive B-frames: 18.4% 20.7% 12.6% 15.2% 19.6% 12.0%  1.5%
x264 [info]: mb I  I16..4: 17.8% 64.3% 17.9%
x264 [info]: mb P  I16..4:  3.5%  6.8%  1.1%  P16..4: 53.3% 10.4%  9.3%  0.2%  0.2%    skip:15.3%
x264 [info]: mb B  I16..4:  0.1%  0.1%  0.0%  B16..8: 37.0%  0.4%  1.0%  direct: 1.5%  skip:59.9%  L0:40.3% L1:53.8% BI: 5.9%
x264 [info]: 8x8 transform  intra:60.5%  inter:79.8%
x264 [info]: direct mvs  spatial:96.0%  temporal:4.0%
x264 [info]: ref P L0  65.1% 16.3%  9.3%  4.4%  4.8%
x264 [info]: ref B L0  80.3% 13.5%  4.6%  1.7%
x264 [info]: ref B L1  91.8%  8.2%
x264 [info]: SSIM Mean Y:0.9687088
x264 [info]: PSNR Mean Y:38.142 U:43.675 V:43.803 Avg:39.287 Global:38.297 kb/s:1119.87
[22:48:41] decomb: yadif deinterlaced 100 | blend deinterlaced 286 | unfiltered 36413 | total 36799
[22:48:41] libhb: work result = 0
Rip done!

 ############ End of Log ############## 

jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: Encoding To MKV: Not exact size, and only 1 audio track?

Post by jbrjake » Thu Mar 12, 2009 4:15 pm

The log shows you are indeed getting two audio tracks. You've chosen not to say what method you used to arrive at the conclusion it only had one, so it's impossible to comment further on that.

As far as the bitrate thing....you're using same as source fps and detelecine. When fps varies you of course can't accurately predict the framerate before you start, so the FPS handed off to x264 is an estimate. There is a patch in the dev forum to pass through this info on second passes to correct the bitrate for the actual fps, but I haven't gotten around to testing it and prepping it for checking into the SVN since, really, HB is transitioning more and more to single-pass quality encodes instead of choosing arbitrary bitrates.

kwanbis
Posts: 17
Joined: Wed Mar 11, 2009 9:13 pm

Re: Encoding To MKV: Not exact size, and only 1 audio track?

Post by kwanbis » Thu Mar 12, 2009 6:18 pm

About the sound, i right click on Media Player Classic, and i only see one sound track.

But since you asked, i checked with medianfo, and ops! is there! So, why would MPC not show me the 2nd track? I would try on my WD TV when back at home.

Code: Select all

General
Complete name                    : Capitulo 2.mkv
Format                           : Matroska
File size                        : 221 MiB
Duration                         : 24mn 10s
Overall bit rate                 : 1 278 Kbps
Writing application              : HandBrake 0.9.3

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L3.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 5 frames
Muxing mode                      : Container profile=Unknown@3.0
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 24mn 9s
Nominal bit rate                 : 1 120 Kbps
Width                            : 710 pixels
Height                           : 480 pixels
Display aspect ratio             : 4/3
Frame rate                       : 29.970 fps
Resolution                       : 24 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.110
Writing library                  : x264 core 65
Encoding settings                : cabac=1 / ref=5 / deblock=1:2:2 / analyse=0x3:0x133 / me=umh / subme=9 / psy_rd=1.0:1.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-4 / threads=3 / nr=150 / decimate=1 / mbaff=0 / bframes=6 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / keyint=300 / keyint_min=30 / scenecut=40(pre) / rc=2pass / bitrate=1120 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00

Audio #1
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format version                   : Version 4
Format profile                   : LC
Format settings, SBR             : No
Codec ID                         : A_AAC
Duration                         : 24mn 10s
Channel(s)                       : 2 channels
Channel positions                : L R
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Language                         : Spanish

Audio #2
ID                               : 3
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format version                   : Version 4
Format profile                   : LC
Format settings, SBR             : No
Codec ID                         : A_AAC
Duration                         : 24mn 10s
Channel(s)                       : 2 channels
Channel positions                : L R
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Language                         : English

Chapters
1                                : 00:00:00.000 - Chapter 1
2                                : 00:01:30.890 - Chapter 2
3                                : 00:12:51.737 - Chapter 3
4                                : 00:22:50.168 - Chapter 4
5                                : 00:23:20.098 - Chapter 5
6                                : 00:24:10.148 - Chapter 6
Regarding the size, what you mean is that since it is VBR, it can not be predicted 100%, but then, why does HB does 3 passes?

TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Encoding To MKV: Not exact size, and only 1 audio track?

Post by TedJ » Thu Mar 12, 2009 10:21 pm

As jbrjake mentioned in his post above, the issue isn't VBR it's VFR. Since you're using "same as source" and detelecine, the x264 encoder may end up receiving less frames than it was expecting to hit your bitrate/filesize target causing the resulting encode to be smaller than expected.

Handbrake has 3 passes in this case because you're doing an initial subtitle scan, followed by the 2 passes for your ABR encode.

kwanbis
Posts: 17
Joined: Wed Mar 11, 2009 9:13 pm

Re: Encoding To MKV: Not exact size, and only 1 audio track?

Post by kwanbis » Fri Mar 13, 2009 12:01 am

I really don't know, i just pressed ANIME i think, and only changed the sound/subtitles.

Any better recommendation?

Cause i notice that on some scenes, things that are really still, "vibrate", like an encoding defect.

And why would MPC don't see second track? any idea?

kwanbis
Posts: 17
Joined: Wed Mar 11, 2009 9:13 pm

Re: Encoding To MKV: Not exact size, and only 1 audio track?

Post by kwanbis » Fri Mar 13, 2009 2:26 pm

OK, i had to change the track from ffmmpg codec, my bad.

Thanks for all responses.

ExDeus
Posts: 43
Joined: Mon Mar 02, 2009 7:13 am

Re: Encoding To MKV: Not exact size, and only 1 audio track?

Post by ExDeus » Fri Mar 13, 2009 10:50 pm

jbrjake wrote:As far as the bitrate thing....you're using same as source fps and detelecine. When fps varies you of course can't accurately predict the framerate before you start, so the FPS handed off to x264 is an estimate.
In this same scenario, if I know my content will be IVTC'ed to 23.97fps, does selecting that as the framerate rather than using 'same as source' solve this issue? Target bitrate will then be accurate?
jbrjake wrote:There is a patch in the dev forum to pass through this info on second passes to correct the bitrate for the actual fps, but I haven't gotten around to testing it and prepping it for checking into the SVN since, really, HB is transitioning more and more to single-pass quality encodes instead of choosing arbitrary bitrates.
Arbitrary bitrates will still often be necessary as long as storage media have specific constraints. I don't want to keep everything on a spinning disk, so I burn to DVD (spin on demand). I will always be targeting 1/4-DVD (1.07-1.09GB) per episode when backing up 1hr TV shows. That's a common sweet spot to balance quality and size. A look at the encodes out in the wild --- torrents, newsgroups, etc. --- shows that 1/2- or 1-CD encodes are common for standard def encodes, and 1/4- or 1/2-DVD encodes are common for high def.

You're the expert on where HB itself is heading, I'm just saying community demand is still very much alive for target bitrates. Anything you can do to support them will always be appreciated.

jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: Encoding To MKV: Not exact size, and only 1 audio track?

Post by jbrjake » Sat Mar 14, 2009 3:40 pm

ExDeus wrote:In this same scenario, if I know my content will be IVTC'ed to 23.97fps, does selecting that as the framerate rather than using 'same as source' solve this issue? Target bitrate will then be accurate?
No. Like I've explained on these forums many, many, many times in the past, pullup is a stateless filter. It does not drop 1 frame from every 5. It detelecines the proper way, which is to actually analyze a small temporal window of frames of input to best match fields together. There is no way you can seriously tell me you *know* your source actually is going to come out at 23.976 short of encoding it. And they almost never do. Furthermore, how, exactly, do you know that your *source* isn't variable framerate? Any MPEG-2 stream, be it ATSC or DVD or whatever, includes a presentation time stamp for every frame. Why does it do this? Because the time between frame presentations can *vary.*

I'm not going to take your bait for a derail on the value of encoding to arbitrary bitrates and quality levels. I don't see how that helps the original poster at all.

ExDeus
Posts: 43
Joined: Mon Mar 02, 2009 7:13 am

Re: Encoding To MKV: Not exact size, and only 1 audio track?

Post by ExDeus » Sun Mar 15, 2009 12:15 am

jbrjake wrote:There is no way you can seriously tell me you *know* your source actually is going to come out at 23.976 short of encoding it.
Allowing VFR is a valid point - on a set of encodes, I know the average framerate will turn out to be ~23.976fps, but that wouldn't allow for VFR.
jbrjake wrote:I'm not going to take your bait for a derail on the value of encoding to arbitrary bitrates and quality levels. I don't see how that helps the original poster at all.
Haha, fair point. My goal was not to goad you into a debate on the topic, I was simply responding to your mention of an available patch.

jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: Encoding To MKV: Not exact size, and only 1 audio track?

Post by jbrjake » Sun Mar 15, 2009 4:39 pm

ExDeus wrote:
jbrjake wrote:There is no way you can seriously tell me you *know* your source actually is going to come out at 23.976 short of encoding it.
Allowing VFR is a valid point - on a set of encodes, I know the average framerate will turn out to be ~23.976fps, but that wouldn't allow for VFR.
You do not know that.

Again, pullup is a stateless filter. It does not drop frames in a regular pattern. It uses a temporal window of 3 frames and tries to find ways of reweaving them so they match better and it can drop duplicate frames.

So what we actually know is that, just about every time, the average frame rate will turn out *not* to be 23.976, but rather something higher.

Post Reply