Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th June 2010, 17:53   #1  |  Link
shafran
Registered User
 
Join Date: Jan 2009
Posts: 4
H264 in .ts into .mkv

I'm having following problem:
I have this file:
Code:
General
ID                               : 1
Complete name                    : D:\video.ts
Format                           : MPEG-TS
File size                        : 8.43 GiB
Duration                         : 57mn 49s
Overall bit rate                 : 20.9 Mbps

Video
ID                               : 517 (0x205)
Menu ID                          : 1 (0x1)
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : Main@L4.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Duration                         : 57mn 49s
Bit rate                         : 19.7 Mbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16/9
Frame rate                       : 25.000 fps
Resolution                       : 24 bits
Colorimetry                      : 4:2:0
Scan type                        : Interlaced
Scan order                       : Top Field First
Bits/(Pixel*Frame)               : 0.379

Audio
ID                               : 700 (0x2BC)
Menu ID                          : 1 (0x1)
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 2
Duration                         : 57mn 49s
Bit rate mode                    : Constant
Bit rate                         : 384 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Video delay                      : -664ms
and i wanted to add chapters (in mkv container) so I demuxed .264 and .mpa files (via mkvmerge). When I mux it in mkvmerge or Haali DS mux, video is slow-motion. What can i do? Do i must reencode this H264 stream into different format?
shafran is offline   Reply With Quote
Old 12th June 2010, 18:23   #2  |  Link
Inspector.Gadget
Registered User
 
Join Date: May 2008
Posts: 1,618
Try demuxing it with eac3to to a Matroska file contaning the video and a separate audio file. So:

Code:
eac3to video.ts 1: video.mkv 2: audio.mpa
Then mux the video.mkv and audio.mpa to a new Matroska file using MKVMergeGUI.

Also, consider that if you are using a different H.264 decoder for your Matroska file than for your TS file, the one used to decode your Matroska file may have problems with interlaced H.264 streams that the decoder used for the TS does not have. If possible, try using ffmpeg-mt (in ffdshow) or Media Player Classic Home Cinema's internal decoder to render both and see if you still have the issue.
Inspector.Gadget is offline   Reply With Quote
Old 12th June 2010, 19:18   #3  |  Link
shafran
Registered User
 
Join Date: Jan 2009
Posts: 4
I use CoreAVC for both. when i try to demux with eac3to it gives me:
Code:
TS, 1 video track, 1 audio track, 0:57:51, 50i
1: h264/AVC, 1080i50 (16:9)
2: MP2, 2.0 channels, 384kbps, 48kHz, -820ms
This audio conversion is not supported.
shafran is offline   Reply With Quote
Old 12th June 2010, 19:19   #4  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,868
eac3to video.ts 1: video.mkv 2: audio.mp2
Atak_Snajpera is offline   Reply With Quote
Old 13th June 2010, 00:21   #5  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,991
eac3to video.ts -demux

Derek
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 13th June 2010, 11:53   #6  |  Link
shafran
Registered User
 
Join Date: Jan 2009
Posts: 4
It worked, thx Atak_Snajpera. Muxed video had some gaps and glitches (eac3to created .gaps file) so i demuxed it second time (eac3to found .gaps file) and now video and audio start in synch but as time goes by it goes out of synch minimally. From the beginning I have some audio gaps and video damaged frames. Is there any tool to fix this? log (after second demux):
Code:
eac3to v3.20
command line: eac3to  video.ts 1: eacvideo.mkv 2: eacaudio.mp2
------------------------------------------------------------------------------
TS, 1 video track, 1 audio track, 0:57:51, 50i
1: h264/AVC, 1080i50 (16:9)
2: MP2, 2.0 channels, 384kbps, 48kHz, -820ms
[v01] Video gap description file detected, will be used for muxing...
[a02] Extracting audio track number 2...
[v01] Extracting video track number 1...
[v01] Muxing video to Matroska...
[a02] Applying MPx delay...
[a02] A remaining delay of -4ms could not be fixed.
[a02] Creating file "eacaudio.mp2"...
[v01] [0:00:31] The source file seems to be damaged (discontinuity).  <WARNING>
[v01] [0:00:31] The source file seems to be damaged (discontinuity).  <WARNING>
[a02] [0:00:31] The source file seems to be damaged (discontinuity).  <WARNING>
[v01] [0:00:31] The source file seems to be damaged (discontinuity).  <WARNING>
[a02] [0:00:31] The source file seems to be damaged (discontinuity).  <WARNING>
[a02] [0:00:31] The source file seems to be damaged (discontinuity).  <WARNING>
[v01] [0:00:32] The source file seems to be damaged (discontinuity).  <WARNING>
[a02] [0:00:31] The source file seems to be damaged (discontinuity).  <WARNING>
[v01] [0:00:31] The source file seems to be damaged (discontinuity).  <WARNING>
[v01] [0:00:32] The source file seems to be damaged (discontinuity).  <WARNING>
[a02] This track is not clean.  <WARNING>
[v01] [0:00:32] The source file seems to be damaged (discontinuity).  <WARNING>
----a lot of the same warnings---
[v01] [0:46:26] The source file seems to be damaged (discontinuity).  <WARNING>
[a02] Audio has a gap of 24ms at playtime 0:00:31.  <WARNING>
-----a lot of gaps----
[a02] Audio has a gap of 24ms at playtime 0:46:25.  <WARNING>
[a02] Starting 2nd pass...
[a02] Realizing MPx gaps...
[a02] Creating file "eacaudio.mp2"...
Added fps value (25) to MKV header.
Video track 1 contains 173504 fields.
eac3to processing took 6 minutes, 24 seconds.
Done.
shafran is offline   Reply With Quote
Old 13th June 2010, 15:56   #7  |  Link
Inspector.Gadget
Registered User
 
Join Date: May 2008
Posts: 1,618
Throw it through TSDoctor first and see if that helps.
Inspector.Gadget is offline   Reply With Quote
Old 13th June 2010, 18:35   #8  |  Link
shafran
Registered User
 
Join Date: Jan 2009
Posts: 4
TSDoctor cleaned video stream (only from errors in eac3to cause the same glitches are still noticeable, but it's fine for me as long it's not out of synch), audio is still ok in the beginning and out of synch (more at the end - audio is too late). Is there any way to clean the audio stream?
eac3to log:
Code:
eac3to v3.20
command line: eac3to  video_fixed.ts 1: eacvideo-tsd.mkv 2: eacaudio-tsd.mp2
------------------------------------------------------------------------------
TS, 1 video track, 1 audio track, 0:57:51, 50i
1: h264/AVC, 1080i50 (16:9)
2: MP2, 2.0 channels, 384kbps, 48kHz, -820ms
[v01] Video gap description file detected, will be used for muxing...
[a02] Extracting audio track number 2...
[v01] Extracting video track number 1...
[a02] Applying MPx delay...
[a02] A remaining delay of -4ms could not be fixed.
[v01] Muxing video to Matroska...
[a02] Creating file "eacaudio-tsd.mp2"...
[a02] This track is not clean.  <WARNING>
[a02] Audio has a gap of 24ms at playtime 0:00:31.  <WARNING>
----a lot of this errors-----
[a02] Audio has a gap of 24ms at playtime 0:46:25.  <WARNING>
[a02] Starting 2nd pass...
[a02] Realizing MPx gaps...
[a02] Creating file "eacaudio-tsd.mp2"...
Added fps value (25) to MKV header.
Video track 1 contains 173504 fields.
eac3to processing took 7 minutes, 1 second.
Done.
shafran is offline   Reply With Quote
Reply

Tags
h264, mkv, mpeg-ts

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.