ohio813 / xvid4psp

Automatically exported from code.google.com/p/xvid4psp
GNU General Public License v2.0
0 stars 0 forks source link

Cannot encode .mkv and have it retain linked chapters #85

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Opening my .mkv using DirectShowSource, DirectShowSource2 or FFmpegSource2 
and encoding (the problems are visible in the preview).

What is the expected output? What do you see instead?
Expected output is the full episode with the OP and ED in their correct places. 
Output using FFmpegSource2 will encode fine (except it's missing the OP and 
ED). Output using either DirectShowSource will attempt to include the OP and 
ED, except that the video is glitchy where those segments should be, and the 
subtitles and audio are unaffected, meaning that it's desynced from the moment 
where the OP is meant to start.

What version of the product are you using? On what operating system?
5.10.289.0 on Windows 7

Please provide any additional information below.
Specifically, it's the THORA release of the first season of K-On.

Original issue reported on code.google.com by ryanjric...@gmail.com on 28 Feb 2015 at 2:57

GoogleCodeExporter commented 9 years ago
I forgot to clarify this: the OP and ED are separate .mkv's from the episode. 
They're played as part of the episode because of the episode's .xml chapter 
file.

Original comment by ryanjric...@gmail.com on 28 Feb 2015 at 4:18

GoogleCodeExporter commented 9 years ago
Ordered chapters seem to be hit and miss for me when encoding

But you are encoding the audio too right?

I've noticed you have to encode it if you want it to be synced properly.

Original comment by b...@live.com on 7 Mar 2015 at 5:59

GoogleCodeExporter commented 9 years ago
I've tried a lot of different settings (messing with the decoders and their 
settings, mostly) to get the audio to work, but none of them can cause the 
audio to "catch on" as it were.

I've sought help elsewhere and am currently trying out this: splitting the 
original episode file into three parts in MKVmerge using the timecodes in the 
chapter file (splitting removes the chapter files from the resulting pieces) - 
pre-OP, post-OP/pre-ED, and post-ED - then encoding the individual bits (along 
with the OP and ED) into .mkv's. Then, I'm going to use MKVtoMP4 to mux them 
all together into an .mp4. Hopefully, this will work.

Original comment by ryanjric...@gmail.com on 7 Mar 2015 at 6:46

GoogleCodeExporter commented 9 years ago
Update: I tried the method above, and it worked perfectly. Although you do have 
to extract subtitles from each individual piece before encoding, and MKVtoMP4 
doesn't append files, so you have to append the .mkv's in MKVmerge first, then 
repackage as a .mp4 in MKVtoMP4.

Original comment by ryanjric...@gmail.com on 7 Mar 2015 at 9:58

GoogleCodeExporter commented 9 years ago
I see you're using a fairly old version of xvid4psp (289 was made in july 2012) 
You should see if the later versions fix your problem

I'm using 330.0 atm and haven't had any problems with encoding ordered chapter 
videos in awhile. I just got done encoding AtsA's FMAB release as a matter of 
fact.

but you say you were messing with decoder settings i was talking about just 
encoding 
the audio. Because it sounds like its trying to find the audio for the op and 
can't because its not encoded so its just leaving it out.

Also what splitters are you using? LAV or Haali?

Original comment by b...@live.com on 9 Mar 2015 at 10:11

GoogleCodeExporter commented 9 years ago
Haali. And even if it does get the audio, it also needs to get the subtitles 
and not have the video glitch out.

Original comment by ryanjric...@gmail.com on 9 Mar 2015 at 11:54

GoogleCodeExporter commented 9 years ago
well like i said have you tried updating the version?

Also what codec pack are you using

Original comment by b...@live.com on 10 Mar 2015 at 4:04

GoogleCodeExporter commented 9 years ago
I tried updating, but I find 6 confusing and I think it removed some things, 
and I don't know what 7 is supposed to be.

Not sure what codec pack it is. Where would I find that?

Original comment by ryanjric...@gmail.com on 10 Mar 2015 at 4:35

GoogleCodeExporter commented 9 years ago
no don't use 6, there are updated versions of 5.

Here download this one, its the one i currently use

http://xvid4psp.googlecode.com/files/XviD4PSP_5.10.330.0_%282013-03-21%29_rc33.1
.exe

As for codec pack i recommend k-lite

http://www.codecguide.com/download_k-lite_codec_pack_full.htm

Original comment by b...@live.com on 10 Mar 2015 at 5:07

GoogleCodeExporter commented 9 years ago
also when you're installing the codec pack make sure you choose haali as your 
splitters for mkv instead of LAV.

Original comment by b...@live.com on 10 Mar 2015 at 5:09

GoogleCodeExporter commented 9 years ago
I'm getting this message when I startup the codec installer:

===

Setup has detected that you have the following codec installed on your computer:

" Haali Media Splitter "

It is recommended that you uninstall that codec. The K-Lite Codec Pack either 
also includes that codec or contains a better alternative.

Would you like to install it now?

[Yes][No]

===

Should I say yes?

Original comment by ryanjric...@gmail.com on 10 Mar 2015 at 6:44

GoogleCodeExporter commented 9 years ago
yes uninstall all the old stuff you're using.

Original comment by b...@live.com on 10 Mar 2015 at 6:55

GoogleCodeExporter commented 9 years ago
In the Decoders menu, in the DirectShowSource2 section, it's got LAV Splitter 
and LAV Decoder checked. Should I uncheck them?

Original comment by ryanjric...@gmail.com on 10 Mar 2015 at 6:57

GoogleCodeExporter commented 9 years ago
after you install the pack go to the start menu

K-Lite codec pack > codec tweak tool > preferred splitters

Then you'll see mkv, it should be the second one down.

Make sure you change it for both 32bit and 64bit

Original comment by b...@live.com on 10 Mar 2015 at 7:02

GoogleCodeExporter commented 9 years ago
I did that during installation, but I meant in Xvid4PSP. Here's a picture.

Original comment by ryanjric...@gmail.com on 10 Mar 2015 at 7:11

Attachments:

GoogleCodeExporter commented 9 years ago
Oh, and I tried the method I described above to circumnavigate the problem (by 
splitting) on a different release of a different show (specifically, Coalgirls 
1280x720 release of Suite Precure) and it didn't work. It looks like this isn't 
a universal fix, so I am very much interested in finding out more.

Original comment by ryanjric...@gmail.com on 10 Mar 2015 at 7:15

GoogleCodeExporter commented 9 years ago
ah

well i just use the regular DirectShowSource for everything. (not 
DirectShowSource2)

Original comment by b...@live.com on 10 Mar 2015 at 7:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Can you post a mediainfo file of both the original thora release and your 
encode of it?

Original comment by b...@live.com on 10 Mar 2015 at 7:27

GoogleCodeExporter commented 9 years ago
How can I create a MediaInfo log?

Original comment by ryanjric...@gmail.com on 10 Mar 2015 at 8:18

GoogleCodeExporter commented 9 years ago
Never mind, found it. Do you want the log of a straight encode, in all of it's 
glitchy desynced glory, or a log of the encode I made via the long workaround?

Original comment by ryanjric...@gmail.com on 10 Mar 2015 at 8:23

GoogleCodeExporter commented 9 years ago
no just the media info

You should be able to right click your mkv files and open them with it. (it 
says MediaInfo)

Alternatively you can go to start menu and k-lite codec pack then under tools 
you can open the mediainfo exe and navigate to your mkv files through that

the text will look like this

General
Unique ID                   : 244535964127420042147879568943712549812 
(0xB7F7E9E0549483198F84DE3D2E1FBBB4)
Complete name               : 
G:\Anime\Fullmetal_Alchemist_Brotherhood_55_[BD_1080p][AtsA][8FF96EEF].mkv
Format                      : Matroska
Format version              : Version 2
File size                   : 1.16 GiB
Duration                    : 21mn 27s
Overall bit rate            : 7 735 Kbps
Movie name                  : Fullmetal Alchemist Brotherhood - 55 - The 
Adults' Way of Life
Encoded date                : UTC 2011-03-05 21:25:36
Writing application         : mkvmerge v4.2.0 ('No Talking') gemaakt op Jul 29 
2010 11:34:44
Writing library             : libebml v1.0.0 + libmatroska v1.0.0
Attachements                : Calligraphic-810-BT.ttf / Wunderlich-Medium.otf

Video
ID                          : 1
Format                      : AVC
Format/Info                 : Advanced Video Codec
Format profile              : High@L4.1
Format settings, CABAC      : Yes
Format settings, ReFrames   : 4 frames
Codec ID                    : V_MPEG4/ISO/AVC
Duration                    : 21mn 27s
Width                       : 1 904 pixels
Height                      : 1 072 pixels
Display aspect ratio        : 16:9
Original display aspect rat : 16:9
Frame rate mode             : Constant
Frame rate                  : 23.976 fps
Color space                 : YUV
Chroma subsampling          : 4:2:0
Bit depth                   : 8 bits
Scan type                   : Progressive
Title                       : H.264 1904x1072 L4.1
Writing library             : x264 core 110 r1820 fdcf2ae
Encoding settings           : cabac=1 / ref=4 / deblock=1:0:0 / 
analyse=0x3:0x113 / me=umh / subme=10 / psy=1 / psy_rd=0.60:0.00 / mixed_ref=1 
/ me_range=48 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / 
fast_pskip=0 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 / 
decimate=1 / interlaced=0 / constrained_intra=0 / bframes=15 / b_pyramid=2 / 
b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / 
keyint=300 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / 
rc=crf / mbtree=1 / crf=18.0 / qcomp=0.80 / qpmin=0 / qpmax=51 / qpstep=4 / 
vbv_maxrate=50000 / vbv_bufsize=50000 / crf_max=0.0 / ip_ratio=1.40 / aq=1:1.50 
/ nal_hrd=none
Language                    : Japanese
Default                     : Yes
Forced                      : No
Matrix coefficients         : BT.709
Color range                 : Limited

Audio
ID                          : 2
Format                      : AAC
Format/Info                 : Advanced Audio Codec
Format profile              : LC
Codec ID                    : A_AAC
Duration                    : 21mn 27s
Channel(s)                  : 2 channels
Channel positions           : Front: L R
Sampling rate               : 48.0 KHz
Compression mode            : Lossy
Title                       : AAC-LD 2.0 q1.0
Language                    : Japanese
Default                     : Yes
Forced                      : No

Text
ID                          : 3
Format                      : ASS
Codec ID                    : S_TEXT/ASS
Codec ID/Info               : Advanced Sub Station Alpha
Compression mode            : Lossless
Title                       : ASS - Subs by Eclipse
Language                    : English
Default                     : Yes
Forced                      : No

Menu
00:00:00.000                : en:Opening / en:Main / en:Ending
00:20:57.590                : en:Preview

Original comment by b...@live.com on 10 Mar 2015 at 9:44

GoogleCodeExporter commented 9 years ago
That's what I meant; the MediaInfo file of the glitchy encode, or of the 
workaround encode?

Original comment by ryanjric...@gmail.com on 11 Mar 2015 at 1:41

GoogleCodeExporter commented 9 years ago
Post one of the original thora release, and one of the glitchy encode.

Original comment by b...@live.com on 11 Mar 2015 at 2:39

GoogleCodeExporter commented 9 years ago
Here they are.

Original comment by ryanjric...@gmail.com on 11 Mar 2015 at 2:42

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
post me a screenshot of your xvid4psp screen like my attachment

Original comment by b...@live.com on 11 Mar 2015 at 3:00

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by ryanjric...@gmail.com on 11 Mar 2015 at 3:04

Attachments:

GoogleCodeExporter commented 9 years ago
can you post your decode settings

Original comment by b...@live.com on 11 Mar 2015 at 3:33

GoogleCodeExporter commented 9 years ago
also does the video play properly in the preview box on xvid4psp or is it out 
of sync there too?

Original comment by b...@live.com on 11 Mar 2015 at 3:38

GoogleCodeExporter commented 9 years ago
Everything that goes wrong after the encode also shows up in the preview.

Original comment by ryanjric...@gmail.com on 11 Mar 2015 at 3:58

Attachments:

GoogleCodeExporter commented 9 years ago
seems like there's something wrong with that encode of it

have you tried other ordered chapter mkv files? (not by thora)

Original comment by b...@live.com on 11 Mar 2015 at 4:17

GoogleCodeExporter commented 9 years ago
Yes. I tried doing Coalgirls' release of Suite Precure, and it goes by a 
different set of rules. I don't remember what happens when I try to straight 
encode it, but I know that if I try to do the workaround (split, encode pieces 
into .mkv, recombine and rewrap), each piece after encoding (but not before) 
thinks that it's 24 minutes long and is very unstable.

Original comment by ryanjric...@gmail.com on 11 Mar 2015 at 4:24

GoogleCodeExporter commented 9 years ago
try it with directshow2 and lav splitters (dont forget to change the subs below 
to "1")

Original comment by b...@live.com on 11 Mar 2015 at 4:33

GoogleCodeExporter commented 9 years ago
I always extract subtitles and have the program add them automatically. And 
I've found that setting it to 1 doesn't do anything; 2 adds subtitles from 
within the file.

I just tried opening a Coalgirls Suite episode in DirecShowSource and it was 
the proper length (indicating that it did realize that there were linked 
chapters), but the audio was the non-OP/ED length and the video was all grey.

DirectShowSource2 ignores the linked chapters entirely, but it shows up 
properly otherwise.

Original comment by ryanjric...@gmail.com on 11 Mar 2015 at 4:40

GoogleCodeExporter commented 9 years ago
use directshow and try it without extracting the subtitles.

also make sure vsfilter is autoloading in haali settings (under options > 
compatibility)

Original comment by b...@live.com on 11 Mar 2015 at 5:30

GoogleCodeExporter commented 9 years ago
VSFilter was off, is on now. When opening in DirectShowSource, the video is 
all-grey, no subtitles. And DirectShowSource2 does the same thing unless I turn 
on the LAV Decoder (although I did learn this: turning on both LAV Splitter and 
Decoder completely omits the OP and ED, both video and audio, but turning on 
the Decoder but not the Splitter adds the OP and ED video and subtitles, but 
not the audio).

Original comment by ryanjric...@gmail.com on 11 Mar 2015 at 5:55

GoogleCodeExporter commented 9 years ago
Update: Loading the subtitles from inside the file matches them to the video, 
loading them from an extracted file matches them to the audio.

Original comment by ryanjric...@gmail.com on 11 Mar 2015 at 6:39

GoogleCodeExporter commented 9 years ago
How do the files play when inside of media player classic?

Original comment by b...@live.com on 11 Mar 2015 at 7:10

GoogleCodeExporter commented 9 years ago
also if your doing ordered chapter you shouldn't turn off vsfilter since it has 
to load the subtitles inside of the op\ed mkvs.

Original comment by b...@live.com on 11 Mar 2015 at 7:14

GoogleCodeExporter commented 9 years ago
It says it can't play the file.

Original comment by ryanjric...@gmail.com on 11 Mar 2015 at 7:21

GoogleCodeExporter commented 9 years ago
huh...?

Do you have teamviewer?

Original comment by b...@live.com on 11 Mar 2015 at 7:44

GoogleCodeExporter commented 9 years ago
No, but I can easily get it and I've used it before. Although it's rather late 
and I doubt I'd be able to do it until Thursday afternoon.

Also, it specifically says "PlayIn: Can't find file!". I opened it in MPC not 
through XVid4PSP and it plays just fine, video, audio and subtitles.

Original comment by ryanjric...@gmail.com on 11 Mar 2015 at 8:02

GoogleCodeExporter commented 9 years ago
well ive done all i can like this, if im on TV it might be easier to fix

I'll come back on the topic tomorrow and see if you want to do it

Original comment by b...@live.com on 11 Mar 2015 at 8:06

GoogleCodeExporter commented 9 years ago
Woohoo! Success! I figured that, since the only thing that is wrong is the 
audio, I might as well tackle that problem differently. So, I split the file in 
MKVmerge at the timecodes (only the audio, resulting in .mka files), then 
extracted the .flac audio from each. I then extracted the .flac audio from the 
OP and ED, and muxed them all together in order in MKVmerge, resulting in 
another .mka. I then extracted the .flac from that and used it as the audio 
track during the encoding as opposed to the internal one (I used FFAudioSource 
as the decoder). And it worked perfectly!

Original comment by ryanjric...@gmail.com on 11 Mar 2015 at 7:54

GoogleCodeExporter commented 9 years ago
Well if that works for you then go for it

still seems like there's something wrong with the way you have it setup, it 
should work fine without doing any of that.

Original comment by b...@live.com on 11 Mar 2015 at 8:31