Log in

View Full Version : ivtc and mpeg 1 layer 2 audio?


BabaG
12th July 2011, 23:13
probably a dumb question but here goes.

i have a bunch of files downloaded from Prelinger Archives. They are
mpeg 2 and the audio is mpeg 1 layer 2 according to gspot. all of it is
originally film and has been transferred to tape and digitized.


edit:
just to be clear, these are clips from a public domain archive. i checked
with getty images who hold the masters and they, while they do sell
the media, did confirm to me that the material is public domain and
stated to me that, if i could find the material somewhere other than
getty, there would be no issues of copyright infringement. the person
i spoke to confirmed this with a supervisor. it actually took a long time
waiting for them to get back with that info.
end edit


i'm using a simple avisynth script to employ the tivtc filter and get the
file back to something like the original film's 23.976 frames without
the pulldown. i then open the file in virtualdubmod and export select
portions to uncompressed files for editing. problem is: no audio.

i tried opening the file directly and exporting a clip from virtualdub and
the audio does come through with the clip. when i open the file as an
avs, though, i get no audio.

what would be the best way to accomplish this clip-making task without
losing the audio?

do i need a separate plugin for the audio? how do i address that in the
script?

oh, yeah, and i changed the original .mpeg file suffix to .vob just
because i found that that would allow me to open the file, whereas i
couldn't without doing that.

here's the simple script:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\TIVTC.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MPEGDecoder.dll")
MPEGSource("E:\receiving\Choosing1950.vob")

TFM(order=1) #0=bff, 1=tff
TDecimate()

thanks for any help,
BabaG

Blue_MiSfit
13th July 2011, 02:43
If you're editing, then you'll probably want to work with uncompressed PCM audio. WAV files are usually fine.

I'd suggest something like this (which assumes that your "VOB" / MPEG-PS files have only two tracks, one video and one audio:


eac3to input.vob 2:audio.wav


or


ffmpeg -i input.vob -acodec copy output.wav


Derek

BabaG
13th July 2011, 17:47
thanks for the tip. i believe what you're suggesting would yield a
separate audio track for the entire piece, though. do you know of
a way i can export clips, only portions of the original, while keeping
the audio? it works with the clip directly but not when i use the avisyth
script to execute the ivtc. i'd love to find a way to get the video AND
audio into virtualdub so i can export them muxed as one clip.

thanks again,
BabaG

poisondeathray
13th July 2011, 17:52
Use dgindex

when you use dgindex it will demux the audio, and write the delay value in the name enter that value in ms in the delay audio line

vid = mpeg2source("file.d2v")
aud = mpasource("audio.mp2")
audiodub(vid,aud)
delayaudio(#value)

If it's 100% film, you can use "force film" in dgindex, instead of tfm / tdecimate

Read the instructions included with dgindex for more details

BabaG
13th July 2011, 18:00
thanks pdr.

as this becomes more complex, i want to make sure i'm keeping things straight.
as it is now, i have one original file, one avisynth script, and virtualdub.
as you're suggesting, let me see if i have the process right.

1. mpeg original
2. mark and save segments in dgindex as separate vid/aud files
3. add your lines to avisynth script
4. open script in vdub and export (no selecting of segments as has been pre-selected in dgindex)

is this correct?

thanks again,
BabaG

poisondeathray
13th July 2011, 18:02
You might find marking segments too crude in dgindex

Use Trim() in the avs script, or make the marks in vdub (mark in/out)

BabaG
13th July 2011, 18:05
so, i should maybe export the entire file and, once it's been converted to 23.976
with audio, then select the clips in vdub? they don't have to be frame accurate.
within about a second would be fine.

thanks again,
BabaG

poisondeathray
13th July 2011, 18:08
If you only need rough cut of 1 section , that would be ok

But let's say you want several sections, this is much easier to manipulate in avs script

e.g.

Trim(2000,3000) ++ Trim(5000,6000)

This would return frames 2000-3000 and 5000-6000



What do you intend to do with this? There are easier ways to cut segments without re-encoding (and you lose no quality). AVIsynth will frame serve uncompressed audio & video (will require re-encoding)

BabaG
15th July 2011, 21:14
sorry, was out of town.

we're using these clips to make art pieces. there are large numbers of
public domain source files we're working with that come as .mpeg
files. because of the bulk of the material, i'm looking to pull clips
rather than leave the media in its entirety. i started out just converting
to uncompressed and leaving things as 29.97fps. then a request was
made to slow some clips down, sometimes to as much as only 10% of
the original speed. in doing so, artifacts began to appear. combing
from the interlacing became obvious, as did the doubled frames. for
these reasons i started looking for a way to convert to ivtc the media
but without having to first store the entire film. i was hoping to find
a way to, while previewing the media for desirable clips, export them
directly from the original format of telecined 29.97 material to new
clips at 23.976 without interlacing. when i did this, though, i lost the
audio. in a nutshell, what i'm trying to do is put the original media
on a timeline and export it as clips in ivtc 23.976fps/non-interlaced
media with audio.

there are some other things being done that make virtualdub a good
app to work with. the source is 4x3 and we usually work in 16x9 so
virtualdub makes it easy to pillarbox the clips while exporting.

thanks and, again, sorry for the delay in getting back,
BabaG