Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding only a selected segment (by time/seconds) doesn't work anymore #225

Closed
fiechr opened this issue Jun 14, 2016 · 5 comments
Closed
Assignees
Labels

Comments

@fiechr
Copy link

fiechr commented Jun 14, 2016

I want to encode only a part of the source file (starting from one time index to another). This worked fine before (about two weeks ago). Now there are two differences:

  • The searching for start time process takes significantly longer (maybe about 50 times longer)
  • The part encoded doesn't fit the selection at all

It doesn't matter which file I choose as source.

Below is an encode log for an example file with only about 15 minutes in total. The screenshot shows the short part I selected.

screenshot

After the process finishes, the target file contains only 53 seconds from/to the very end.

[14:27:58] gtkgui: HandBrake 20160611220333-44a359d-master (2016061201) - Linux x86_64 - https://handbrake.fr
[14:27:58] hb_init: starting libhb thread
[14:27:58] hb_init: starting libhb thread
[14:27:58] hb_init: starting libhb thread
[14:28:14] CPU: 
[14:28:14]  - logical processor count: 8
[14:28:14] OpenCL: library not available
[14:28:14] hb_scan: path=/home/test/Downloads/Sintel (2010).mkv, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:274: failed opening UDF image /home/test/Downloads/Sintel (2010).mkv
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[14:28:14] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[14:28:14] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/home/test/Downloads/Sintel (2010).mkv':
  Duration: 00:14:48.03, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0,000000, end 103,125000
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 103,125000, end 148,667000
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 148,667000, end 349,792000
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 349,792000, end 437,208000
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 437,208000, end 472,075000
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 472,075000, end 678,833000
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 678,833000, end 744,083000
    Metadata:
      title           : Chapter 07
    Chapter #0.7: start 744,083000, end 888,032000
    Metadata:
      title           : Chapter 08
    Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x818, PAR 1:1 DAR 960:409, 24 fps, 1k tbn, 48 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, fltp, 640 kb/s
    Metadata:
      title           : AC3 5.1 @ 640 Kbps
    Stream #0.2(ger): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.3(eng): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.4(spa): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.5(fre): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.6(ita): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.7(dut): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.8(pol): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.9(por): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.10(rus): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.11(vie): Subtitle: [0][0][0][0] / 0x0000
[14:28:14] scan: decoding previews for title 1
[14:28:14] scan: audio 0x1: ac3, rate=48000Hz, bitrate=640000 English (AC3) (5.1 ch)
[14:28:15] scan: 10 previews, 1920x818, 24,000 fps, autocrop = 0/0/0/0, aspect 2,35:1, PAR 1:1
[14:28:15] libhb: scan thread found 1 valid title(s)
[14:30:31] gtkgui: Custom Preset: /Test
[14:30:31] 1 job(s) to process
[14:30:31] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 640,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "copy:ac3",
                "Gain": 0.0,
                "Mixdown": "none",
                "NormalizeMixLevel": false,
                "PresetEncoder": "ac3",
                "Quality": -3,
                "QualityEnable": false,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:mp3",
            "copy:aac",
            "copy:ac3",
            "copy:eac3"
        ],
        "FallbackEncoder": "ac3"
    },
    "Destination": {
        "ChapterList": [
            {
                "Name": "Chapter 1"
            },
            {
                "Name": "Chapter 2"
            },
            {
                "Name": "Chapter 3"
            },
            {
                "Name": "Chapter 4"
            },
            {
                "Name": "Chapter 5"
            },
            {
                "Name": "Chapter 6"
            },
            {
                "Name": "Chapter 7"
            },
            {
                "Name": "Chapter 8"
            }
        ],
        "ChapterMarkers": false,
        "File": "/home/test/Videos/Sintel (2010).mkv",
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "mkv"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 0
                }
            },
            {
                "ID": 11,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 546,
                    "width": 1280
                }
            }
        ]
    },
    "Metadata": {
        "Name": "Sintel (2010)"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/home/test/Downloads/Sintel (2010).mkv",
        "Range": {
            "End": 8100000,
            "Start": 37800000,
            "Type": "time"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": [
            {
                "Burn": false,
                "Default": true,
                "Forced": false,
                "Track": 1
            }
        ]
    },
    "Video": {
        "ColorMatrixCode": 0,
        "Encoder": "x264",
        "Level": "auto",
        "OpenCL": false,
        "Options": "deblock=-2,-1:ref=8:bframes=8:merange=24",
        "Preset": "veryslow",
        "Profile": "high",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 19.0,
        "Tune": "film",
        "Turbo": false,
        "TwoPass": false
    }
}
[14:30:31] CPU: 
[14:30:31]  - logical processor count: 8
[14:30:31] OpenCL: library not available
[14:30:31] hb_scan: path=/home/test/Downloads/Sintel (2010).mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:274: failed opening UDF image /home/test/Downloads/Sintel (2010).mkv
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[14:30:31] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[14:30:31] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/home/test/Downloads/Sintel (2010).mkv':
  Duration: 00:14:48.03, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0,000000, end 103,125000
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 103,125000, end 148,667000
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 148,667000, end 349,792000
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 349,792000, end 437,208000
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 437,208000, end 472,075000
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 472,075000, end 678,833000
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 678,833000, end 744,083000
    Metadata:
      title           : Chapter 07
    Chapter #0.7: start 744,083000, end 888,032000
    Metadata:
      title           : Chapter 08
    Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x818, PAR 1:1 DAR 960:409, 24 fps, 1k tbn, 48 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, fltp, 640 kb/s
    Metadata:
      title           : AC3 5.1 @ 640 Kbps
    Stream #0.2(ger): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.3(eng): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.4(spa): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.5(fre): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.6(ita): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.7(dut): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.8(pol): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.9(por): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.10(rus): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.11(vie): Subtitle: [0][0][0][0] / 0x0000
[14:30:31] scan: decoding previews for title 1
[14:30:31] scan: audio 0x1: ac3, rate=48000Hz, bitrate=640000 English (AC3) (5.1 ch)
[14:30:32] scan: 10 previews, 1920x818, 24,000 fps, autocrop = 0/0/0/0, aspect 2,35:1, PAR 1:1
[14:30:32] libhb: scan thread found 1 valid title(s)
[14:30:32] starting job
[14:30:32] job configuration:
[14:30:32]  * source
[14:30:32]    + /home/test/Downloads/Sintel (2010).mkv
[14:30:32]    + title 1, start 00:07:0,00 stop 00:08:30,00
[14:30:32]    + container: matroska,webm
[14:30:32]  * destination
[14:30:32]    + /home/test/Videos/Sintel (2010).mkv
[14:30:32]    + container: Matroska (libavformat)
[14:30:32]  * video track
[14:30:32]    + decoder: h264
[14:30:32]    + filters
[14:30:32]      + Framerate Shaper (mode=0)
[14:30:32]        + frame rate: same as source (around 24,000 fps)
[14:30:32]      + Crop and Scale (width=1280:height=546:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[14:30:32]        + source: 1920 * 818, crop (0/0/0/0): 1920 * 818, scale: 1280 * 546
[14:30:32]    + Output geometry
[14:30:32]      + storage dimensions: 1280 x 546
[14:30:32]      + pixel aspect ratio: 1 : 1
[14:30:32]      + display dimensions: 1280 x 546
[14:30:32]    + encoder: H.264 (libx264)
[14:30:32]      + preset:  veryslow
[14:30:32]      + tune:    film
[14:30:32]      + options: deblock=-2,-1:ref=8:bframes=8:merange=24
[14:30:32]      + profile: high
[14:30:32]      + level:   auto
[14:30:32]      + quality: 19,00 (RF)
[14:30:32]  * subtitle track 1, English (track 1, id 0x3) Text [UTF-8] -> Passthrough, Default
[14:30:32]  * audio track 1
[14:30:32]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)
[14:30:32]      + bitrate: 640 kbps, samplerate: 48000 Hz
[14:30:32]    + AC3 Passthru
[14:30:32] sync: expecting 2184 video frames
[14:30:32] encx264: min-keyint: 24, keyint: 240
[14:30:32] encx264: encoding at constant RF 19,000000
[14:30:32] encx264: unparsed options: subme=10:analyse=all:deblock=-2,-1:bframes=8:b-adapt=2:ref=8:psy-rd=1,0,15:me=umh:merange=24:direct=auto:trellis=2:rc-lookahead=60
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA4 FMA3 LZCNT BMI1
x264 [info]: profile High, level 4.0
[14:31:03] sync: first pts video is 0
[14:31:03] sync: first pts audio 0x1 is 1710
[14:32:09] reader: done. 1 scr changes
[14:32:13] work: average encoding speed for job is 18,435232 fps
[14:32:13] render: lost time: 0 (0 frames)
[14:32:13] render: gained time: 0 (0 frames) (0 not accounted for)
[14:32:13] ac3-decoder done: 14802 frames, 0 decoder errors
[14:32:13] h264-decoder done: 11373 frames, 0 decoder errors
[14:32:13] sync: got 1293 frames, 2184 expected
[14:32:13] sync: framerate min 23,810 fps, max 24,000 fps, avg 24,000 fps
x264 [info]: frame I:6     Avg QP:14,40  size:317168
x264 [info]: frame P:248   Avg QP:18,60  size: 74458
x264 [info]: frame B:1039  Avg QP:27,39  size:  7920
x264 [info]: consecutive B-frames:  1,0%  0,5%  1,4%  0,3% 68,8% 14,8%  1,1%  9,3%  2,8%
x264 [info]: mb I  I16..4: 16,5% 24,7% 58,7%
x264 [info]: mb P  I16..4:  0,5%  2,2%  3,0%  P16..4: 51,6%  5,8% 18,2%  2,1%  1,9%    skip:14,9%
x264 [info]: mb B  I16..4:  0,0%  0,3%  1,3%  B16..8: 24,1%  2,5%  1,5%  direct:17,4%  skip:52,9%  L0:55,0% L1:35,2% BI: 9,9%
x264 [info]: 8x8 transform intra:27,3% inter:36,2%
x264 [info]: direct mvs  spatial:99,3% temporal:0,7%
x264 [info]: coded y,uvDC,uvAC intra: 64,6% 71,1% 46,7% inter: 27,5% 10,5% 2,8%
x264 [info]: i16 v,h,dc,p: 62%  6% 20% 12%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 41%  6% 16%  5%  6%  7%  5%  8%  7%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 68%  3%  6%  3%  4%  5%  3%  4%  4%
x264 [info]: i8c dc,h,v,p: 28% 14% 50%  8%
x264 [info]: Weighted P-Frames: Y:6,0% UV:6,0%
x264 [info]: ref P L0: 88,2%  7,5%  1,7%  0,7%  0,5%  0,5%  0,4%  0,4%  0,0%  0,0%
x264 [info]: ref B L0: 44,2% 53,1%  1,7%  0,4%  0,3%  0,2%  0,1%
x264 [info]: ref B L1: 53,3% 46,7%
x264 [info]: kb/s:4246,50
[14:32:13] mux: track 0, 1293 frames, 28597406 bytes, 4239,92 kbps, fifo 1024
[14:32:13] mux: track 1, 1684 frames, 4311040 bytes, 639,17 kbps, fifo 1024
[14:32:13] mux: track 2, 0 frames, 0 bytes, 0,00 kbps, fifo 8
[14:32:13] libhb: work result = 0
@christophecvr
Copy link

I do not known if its related . But since commit

dbc9a88

The subtitels do not start correct anymore on vlc or ...
This is the same up to last git.

44a359d

But if I just unturn two commits
dbc9a88
6e9c5aa

With other words just replace in the last head the file sync.c

By the one on commit
d105057

All runs fine .

@jstebbins
Copy link
Contributor

I think it should be fixed now. Please give it a test when you can.
Incorrect start time fixed in 1ac26fb
subtitles fixed in 05c142a

@christophecvr
Copy link

Just tested and indeed works back ok now. Even better then before since the very first subtittle was never shown before and now well. The next subtitles are back on schedule and are showing back the correct (requested) time. This for imported pass trough srt files and pass trough vob files.

tested commit

4ca82bd

@fiechr
Copy link
Author

fiechr commented Jun 30, 2016

Encoding a certain time range works (again) fine now (20160627235411-05c142a-master (x86_64)). 😄

Did not have any issues with subtitles before - so didn't checked that.

@bradleysepos
Copy link
Contributor

Thanks, everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants