PDA

View Full Version : change fps by DTS audio stream


xandercage
5th November 2009, 20:55
How can I change fps by DTS audio stream?

I can do it via ac3to, but only with AC3 audio tracks.

How can I convert audio to 24 fps, if its DTS?

Any ideas?

Thanks for yours feedback

leeperry
5th November 2009, 20:58
tried to export to FLAC? double lossy conversion is no good anyway..

and why not changing the video speed to match the untouched audio instead? then use Reclock in realtime to slow down to 24fps

Inspector.Gadget
5th November 2009, 21:00
If you're going PAL to FILM and your target container is Matroska, I think you can stretch the audio instead of re-encoding...

leeperry
5th November 2009, 21:04
If you're going PAL to FILM and your target container is Matroska, I think you can stretch the audio instead of re-encoding...
to get juddery video or glitchy audio, great! plus the pitch won't be good...the chipmunk syndrome ^^

xandercage
5th November 2009, 23:49
I m using for AC3 this simple scripts and command

LoadPlugin("nic_audio.dll")

a = NicAc3Source("PECZ.ac3")
a = ConvertAudioToFloat(a)

dst = 23.976
src = 25.000

a = TimeStretch(a, tempo = (100.0 * dst) / src)

return a

and dat

bepipe --script "import(^fps.avs^)" | aften -b 384 -dynrng 1 -v 0 -readtoeof 1 - PECZOK.ac3

Simple quick and quality :))


I m asking you, if you now about somethitg like this but with DTS audio???

tebasuna51
6th November 2009, 02:46
Yes, with:

LoadPlugin("nicaudio.dll")

a = NicDtsSource("PECZ.dts")
#a = ConvertAudioToFloat(a) #not needed the NicDtsSource output is already float

dst = 24.0 / 1.001 #more exact than 23.976
src = 25.000

a = TimeStretch(a, tempo = (100.0 * dst) / src)

return a

and now

bepipe --script "import(^fps.avs^)" | aften -b 448 -v 0 -readtoeof 1 - PECZOK.ac3

If you need recode use the more efficient encoder, and don't exist a free dts encoder.
Don't use -dynrng 1, now the 'Night mode' in receivers don't need help
Use al least 448 Kb/s or maybe 640 Kb/s.

You can use also eac3to:

eac3to PECZ.dts PECZOK.ac3 -448 -25.000 -changeTo23.976

xandercage
6th November 2009, 16:48
Yes, with:

LoadPlugin("nicaudio.dll")

a = NicDtsSource("PECZ.dts")
#a = ConvertAudioToFloat(a) #not needed the NicDtsSource output is already float

dst = 24.0 / 1.001 #more exact than 23.976
src = 25.000

a = TimeStretch(a, tempo = (100.0 * dst) / src)

return a

and now

bepipe --script "import(^fps.avs^)" | aften -b 448 -v 0 -readtoeof 1 - PECZOK.ac3

If you need recode use the more efficient encoder, and don't exist a free dts encoder.
Don't use -dynrng 1, now the 'Night mode' in receivers don't need help
Use al least 448 Kb/s or maybe 640 Kb/s.

You can use also eac3to:

eac3to PECZ.dts PECZOK.ac3 -448 -25.000 -changeTo23.976

This look good but it dont works for me.
I have audio.dts as input with 23,976 fps and need output audio.dts 24 fps.
Can you make some changes in script or command??

Thanks

tebasuna51
6th November 2009, 17:47
dst = 24.0
src = 24.0 / 1.001

or

eac3to PECZ.dts PECZOK.ac3 -448 -23.976 -changeTo24.000

xandercage
6th November 2009, 18:06
dst = 24.0
src = 24.0 / 1.001

or

eac3to PECZ.dts PECZOK.ac3 -448 -23.976 -changeTo24.000


I need output file with this properties

DTS 1536 kbps 24 fps,

input is the same but with 23,976.

I guees by yours script, commad is output file AC3.
I can get AC3 with 24 fps, but I need DTS.

tebasuna51
6th November 2009, 20:52
For what you need dts?

If you need recode use the more efficient, and compatible, encode ac3.
Don't exist a free dts encoder.
Buy a dts encoder and encode the files created with:

eac3to PECZ.dts PECZOK.wavs -23.976 -changeTo24.000

xandercage
6th November 2009, 23:24
eac3to PECZ.dts PECZOK.wavs -23.976 -changeTo24.000



Great syntax, this is it. :thanks:

I just join this 6 wavs via DTS encoder. Final DTS have now correct fps, in my case 24.

You save ma day dude :)

leeperry
8th November 2009, 15:08
You save ma day dude :)
except that 640 kbit AC3 is widely acknowledged as sounding better than 1.5mbit DTS...and going dual lossy is frowned up anyway! but well you wanted double lossy DTS, good for you :p

EuropeanMan
10th November 2009, 19:35
I have a sort of SIMILAR SITUATION...

I have a movie. One DVD is from EUROPE - PAL of course. The other is US DVD9 R0 NTSC....

NTSC DVD - 2 HOURS 11 MIN 46 SECONDS

PAL DVD - 2 HOURS 06 MIN 38 SECONDS

we have VERY close to a 4% speedup in the PAL.

The PAL DVD has superior VIDEO. NTSC has DTS audio WHICH I WANT TO KEEP.

The object here is to re-encode to NTSC my PAL VIDEO...but I need it to SYNCH to the DTS...how can I do this please. I eventually will make my OWN DVD9 with the best of 2 worlds for my collection.

PAL VIDEO is 25p...through AviSynth, I'll get an NTSC framing, and after DGPulldown it'll be 29.970 at the end. DO I SLOW DOWN the video somehow WITHOUT AFFECTING playback? or....

I'm NOT a professional nor somewhat experienced with AUDIO encoding/decoding...so any help will be appreciated.

leeperry
11th November 2009, 03:32
don't reencode...use DGPulldown to change the speed of the MPEG2 video stream then mux it w/ the DTS?

syncing is easy, find the right delay in ffdshow then remux w/ the right figure.

EuropeanMan
11th November 2009, 04:09
^ okay, that sounds plausible. i DEMUX the video...resulting in an .m2v file. THEN DGpulldown with WHAT FLAG? i'll try 25--> 29.970...see what happens.

EuropeanMan
11th November 2009, 04:45
Did not work...

EuropeanMan
11th November 2009, 08:03
Ok, so I ran a quick one-pass Xvid with AssumeFPS(23.976)...The resulting length very nearly matched the length of the NTSC video. However, upon muxing the DTS with video...no synching throughout. So that doesn't work.

So NOW what do I do?

Is it possible to get the NTSC DTS audio to synch up with the PAL VIDEO somehow?

leeperry
11th November 2009, 11:07
well find some way to change the speed of a MPEG2 stream, I though DGPullDown would work...tried it both on a sample of the primary element and a PS remux? you would wanna do 25>23.976

you really have no need to reencode..keep both untouched if you want the best quality, it's entirely possible AFAIK.

if the movies use two different cuts, it will never work.

TinTime
11th November 2009, 14:04
Or try eac3to...

eac3to.exe input.m2v output.m2v -changeTo23.976

But as leeperry pointed out, if your two films are slightly different versions then you won't have any joy.

When you say "no synching throughout" do you mean that there's a constant mismatch or does it gradually drift out of synch?

EuropeanMan
11th November 2009, 14:39
^ gradually drifts...

TinTime
11th November 2009, 15:41
In that case there's no easy solution. You could try the PAL video at 24fps and see if that's any better.

However, if 24000/1001fps is no good and 24fps is no good then you'll have to transcode the PAL video to a format which supports arbitrary framerates, which would defeat the purpose of what you're trying to do. Or you'll have to try repeating / dropping DTS frames to synch it up which is probably more trouble than it's worth.

EuropeanMan
11th November 2009, 22:26
What I don't understand is that for 99.8% - it SEEMS like the prints are exactly the same. MIND you, the DVDs are made by different companies, so the beginning frames and ending frames are slightly different...OTHER THAN that, adding "AssumeFPS(23.976)" to encode the PAL to a 1-pass XviD file, made sense because it was ONLY ONE frame off, from just using "tfm(order=1).decimate" on the NTSC...just ONE frame. THAT should have allowed the synching to be a CONSTANT variable when muxing!!! Right? Why does it vary?

EuropeanMan
12th November 2009, 04:47
^ I have completely given up on this... :( Oh well...will have to work with the PAL audio instead.

leeperry
12th November 2009, 13:16
you wanna slow down the original video stream to 23.976 and then remux and find the right delay...make sure the video is actually 23.976 in the end! Reclock will tell you that if you need

if you lose sync overtime, these might not be the same cut and this will not work.

I've recently done the same on 2 different BD's, one had a great video but totally messed up DTS-HD track and the other had a great lossless track but so-so video.

I've accelerated the video stream from 23.976 to 24, found the right delay using ffdshow in realtime(in 5 ms steps)...et voila, perfect sync :)

EuropeanMan
13th November 2009, 20:51
^ this particular source has some variances that I can't explain.

I've worked with other movies as well that have been released as PAL & NTSC...and usually when I take my NTSC subs to mux with my PAL vid/aud to an NTSC DVD9 encode, all i have to do with the subs is speed it up a notch and everything is fine.

For THIS particular movie, subs were a pain to synch up, as they speed up in some areas and slow down in other areas. So WHEN I muxed the audio, it was the same thing...it was off by 1.2secs in the beginning, gradually increased, then decreased again, then increased...which TELLS me then that for whatever reason, the video & audio are somehow DIFFERENT from both PAL & NTSC versions...WHY I don't get it, because I have watched both now separately, and it's the exact same movie, JUST sometimes it seems that between the two SOME SCENES play slower/faster...which explains why I can't synch the AUDIO for both. THAT IS MY BEST EDUCATED GUESS.