View Full Version : Audio is too long in TS
len0x
15th September 2004, 12:12
I have a 50 min long 720p TS file. It plays well and doesn't seem to have any problem, but every time I try to demux audio from it (AC3) I get resulting AC3 file that has length of more than 9 hours (if I open it in VDubMod). So of course if I mux it with AVI I made then video plays very very fast to try to follow the audio.
Tools that I tried for demuxing (with exactly the same result):
bbdmux
DGindex
ProjectX
Any idea how can I fix AC3 audio afterwards or demux it properly from TS?
unixfs
15th September 2004, 14:12
mplayer -dumpaudio -dumpfile audio.ac3 file.ts
if it doesn't work at once add -tsprobe 10000000
len0x
15th September 2004, 14:39
Thanks, that seems to be working! (Checking audio synch now...)
Any idea why other tools didn't work?
*Edit* Everything seems to be fine! (after I got video delayed with the value I got from DGIndex). Is there a way find out the delay from mplayer?
unixfs
15th September 2004, 15:19
Originally posted by len0x
Thanks, that seems to be working! (Checking audio synch now...)
Any idea why other tools didn't work?
I don't have the slighest idea :)
demuxing audio is so immediate that I can barely believe others programs don't work
*Edit* Everything seems to be fine! (after I got video delayed with the value I got from DGIndex). Is there a way find out the delay from mplayer?
you can read it on the status line on the terminal (at the beginning of the clip)
len0x
15th September 2004, 15:31
I have this info from mplayer on startup:
Playing test.ts.
Cannot seek backward in linear streams!
Cannot seek backward in linear streams!
Cannot seek backward in linear streams!
TS file format detected.
DEMUX OPEN, AUDIO_ID: -1, VIDEO_ID: -1, SUBTITLE_ID: -1,
Cannot seek backward in linear streams!
PROBING UP TO 2000000, PROG: 0
VIDEO MPEG2(pid=4642)...AUDIO A52(pid=4646) NO SUBS (yet)! PROGRAM N. 1
Opened TS demuxer, audio: 2000(pid 4646), video: 10000002(pid 4642)...POS=43240
Cannot seek backward in linear streams!
It seems like may be TS file wasn't cut properly. And also I do not see any info about audio delay here...
unixfs
15th September 2004, 17:19
Originally posted by len0x
I have this info from mplayer on startup:
It seems like may be TS file wasn't cut properly. And also I do not see any info about audio delay here...
there's no improper way to cut TS: it can be cut everywhere you like,
and the demuxer must be able to search the next start point.
The line I was referring to is the one you see during playback,
containing the percentage of cpu used for audio/video decoding, the number of dropped frames, etc.
BTW this message "Cannot seek backward in linear streams!" makes
me believie you are reading from a pipe, such as
cat file.ts | mplayer -
Am I correct? What version are you using?
len0x
15th September 2004, 17:46
Originally posted by unixfs
BTW this message "Cannot seek backward in linear streams!" makes
me believie you are reading from a pipe, such as
cat file.ts | mplayer -
Am I correct? What version are you using?
No piping. I'm using latest version 1.0pre5 on windows. The stream is definitely broken somehow, coz any other TS file I have doesn't have these errors and demuxing is working properly with other tools.
eb
15th September 2004, 18:04
@ lenOx, greetings
Please check this file using PVAStrumento 2.9 but for demux uncheck any corrections, it will simply rewrite and demux but with new /corrected started from zero/ time stamps for video and audio
eb
unixfs
15th September 2004, 20:21
LenOx,
can you post a link where I can download a portion of that file, please?
len0x
15th September 2004, 21:22
Originally posted by eb
Please check this file using PVAStrumento 2.9 but for demux uncheck any corrections
Well, I have version 2.1.0.11 - what exactly should I uncheck (there seem to be quite a bit of options there)?
@unixfs
I'll try to cut the stream in ProjextX tomorrow, but I think it will repair it, so that original problem will go away...
eb
15th September 2004, 21:55
Please uncheck all of them.
eb
len0x
16th September 2004, 11:44
Well, I did and demuxing now (takes really a while - ~2h...). Can see that it synched audio and video, but it changed both streams which means that I cannot just reuse audio with the video I encoded ealier...
len0x
16th September 2004, 14:08
OK, PVAStrumento seems to demux everything properly. Too bad it can't produce single output ts/mpg with audio inside.
len0x
16th September 2004, 18:11
Originally posted by unixfs
LenOx,
can you post a link where I can download a portion of that file, please?
Question - how do I just cut it without repairing the stream? All tools seem to be doing demuxing first...
DrP
16th September 2004, 21:06
Womble's MPEG Video Wizzard will let you chop directly from the TS (I think).
www.womble.com
eb
16th September 2004, 23:08
And again ProjectX can be good solution in this case of cutting, but do not set demuxing , set to PVA if there is only video and audio streams, set to TS if there are also subtitles.
In general all cutting programs rewrinting files not keeping original time stamps, but starting from zero.
eb
len0x
17th September 2004, 10:22
Originally posted by eb
In general all cutting programs rewrinting files not keeping original time stamps, but starting from zero.
Yes, looks like. But unixfs originally asked for untouched sample of that TS and looks like its impossible to do :)
What puzzles me in ProjectX though - if you select a portion of video and say make TS out of it - it tries to process the whole stream (I never had the patience to wait until it finishes) and resulting files seem to be huge (not the estimation size its shows oin cutting window), but if you just demux then only portion of the file is processed very quickly. Why is that?
unixfs
18th September 2004, 08:12
Originally posted by len0x
Question - how do I just cut it without repairing the stream? All tools seem to be doing demuxing first...
sorry Len0x for being late, I was away :)
using the program dd you can cut the portion you want, e.g.:
dd if=file.ts of=dest.ts bs=1024 count=2048 skip=1024
will cut 2MB from file.ts skipping the first 1MB and save the output
to dest.ts.
you can find the dd.exe for windows here: http://unxutils.sourceforge.net/UnxUtils.zip
len0x
19th September 2004, 10:20
@unixfs
Why didn't I think of that? :) (especially coz I have cygwin tools on my PC). I'll make a sample for you on Monday.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.