Apparently the file, produced by x264 was reported by QTmIndexSweeper to have a moov atom at the beginning. I remember when i was exporting with premiere codecs i had a problem with streaming h264 with some simple players. Probably JW has a walk-around to that problem...
Thank you for the settings and links, I will have a look and try playing with it...
Regarding nero, before doing it in a right way, I grabbed it with Nero recode to h264 but with quite high bitrate.
So i thought I can use the output to re-encode with x264 for streaming. But somehow it does not work like that producing out of sync issues even having input h264 file ok...
Anyway, I am trying to do it properly now. I use Dv2 Project creator to create .d2v file. Then use Avi Synth Script Creator to make a script for MeGui.
Maybe you can give me some hints with the problem i have: input DVD has several chapters (several shorts actually). I'm trying to to grab only one. During creating d2v audio was de-muxed. For avs i have cutting:
__film = last
__t0 = __film.trim(103961, 114516)
but I don't know in what format/how should I write same info to Audio Cutter?
Thank you for your help.
+ Reply to Thread
Results 31 to 49 of 49
If you are using the AVS Cutter in MeGUI, you can save a "cuts file". The audio section has an input for that cuts file
You can also do the same with with avisynth scripts manually with trim() and specifying both video & audio in the script with audiodub()
I'm still a bit unsure of your workflow? Are you ripping a DVD, importing into Premiere, exporting something? (or using debugmode) into MeGUI?
Thank you for the advise with "save cuts". During cutting video i used "add cuts to avi" and have not seen this button... I tried using it, but sound is completely out of place... don't know what is a problem... imput for audio is ac3 file...
Can you please specify how to use audiodub()?
Beginning of my script is:
I was trying to use the last line instead of 2 first (as it was in the tutorial you linked in this thread) but it doesnt work. Probably I should add here something like
__film = last
audio = Ac3Source("myAudioFromDVD.ac3") # don't know the command
__film = AudioDub(__film, audio)
__t0 = __film.trim(103961, 114516) #will apply both for audio and video?
Do I have to download audio dub or it's a standard command in AviSynth script?
Regarding workflow, sorry for messing things up. I was doing both. I encoded from Premiere with MeGui using debugmode (no questions, everything works). Another thing is ripping DVD, just DVD->D2v->Avisyth->MeGui->x264->mp4 output
Actually it's 2 separate methods of doing it (but they are essentially the same)
1) If you are using the avs cutter with an MPEG2 source that is indexed by DGIndex (I can tell you are because you have DGDecode_MPEG2Source() in your script), the audio is separatly demuxed. You can use the "save cuts file" button and it will give you a .clt file. That is what you enter in the audio section for "cuts". You enter the audio directly into the audio section with this method (not using the .avs script to specify audio). If you note the demuxed audio will have a name like "file DELAY 72ms.ac3", this is usually correct and entered in the bottom right corner in the audio section automatically upon loading the audio file - infrequently it's wrong and you have to zero it out.
2) If you are doing the script manually without the script generator using audiodub() to specify both audio & video in the script, you then enter the same script for both audio & video (instead of script for video and .ac3 directly for audio)
AudioDub is a standard and does not need to be loaded as a plugin or downloaded separately
Note the audio script generator in your example included colormatrix() and suggested interlaced source. So you many want to deinterlace (I included an example with yadif and TFF - top field first field order). Double check if this is true & adjust to whatever you feel is better. It might look something like this (In this example 2 segments are joined):
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\NicAudio.dll") LoadPlugin("PATH\DGDecode.dll") Load_Stdcall_Plugin("C:\Program Files\AviSynth 2.5\plugins\yadif.dll") vid=MPEG2Source("FILE.d2v") aud=NicAC3Source("FILE T01 2_0ch 192Kbps DELAY 72ms.ac3").DelayAudio(0.72) AudioDub(vid,aud) ColorMatrix() Yadif(order=1) #TFF Trim(100,500)++Trim(1000,2000)
Thank you for such a detailed post.
I tried both ways and have the same result. Audio is from absolutely wrong part of the DVD, but it present there, so it's not a completely garbage.
I tried to remake .d2v and ac3 file using D2v creator, but still absolutely the same result.
How can I check ac3 file produced by D2v creator? Or how do I preview audio before encoding?
I guess something is wrong with the input ac3 file...
What version of DGIndex are you using (try using DGMPGDec 153 as a standalone, ie. not from MeGUI's .d2v creator; you would use MPEG2Source(), not DGDecode_MPEG2Source() )
When you ripped the DVD, did you have 1 big .vob or multiple .vob's? If not, just use DGIndex on the individual vob that contains your segment of interest, and the corresponding .ac3 file generated by DGIndex
Does that particular .vob segment play correctly in a media player? You can use MPC to preview/playback a .m2v and .ac3 file in the same directory
It's really weird. Ac3 is perfectly fine and contains information I need.
DVD is made from several vob's which are perfectly fine and could be played.
I will try using DGIndex on sepratete vob as well as using DGMPGDec tonight...
EDIT: going to sleep, will try it tomorow...
by the way, this is written at JW FLV page:
If your MP4 files cannot be seeked before they are completely downloaded, the so-called MOOV atom (which contains the seeking information) is located at the end of your video. Check out this little application to parse your videos and fix it.
so moov atom should be in a right place anyway
EDIT2: a tried DGMGP, the same result. input .avs script have this sync problem. In some parts it's just slightly, at the last short film, it's completely off. But somewhere in the middle it was fine and no sync problems.... Going to try mpg2cut2...
An alternative approach is to cut your segment using an MPEG2 cutter first (e.g. mpg2cut2 (free), cuttermaran (free), videoredo ($) ), then use that segment as input - this would minimize the chance of getting the "wrong" audio section
You can preview and check .avs files by using MPC to play the .avs. (e.g. if you used the audiodub() method)
Ok, i tried mpeg2cut2 but it can't open first .vob of the DVD, error: file is too small = 18432.
other .vob's are fine, but the movie i need is in the middle of 2, so i would prefare to open whole dvd and cut what i need...
with cuttermaran i can't open .vob, it supports .mpv, .m1v and .m2v.
Please check my previous post, i added some info there.
Perhaps your DVD is not decrypted properly?
For mpg2cut2, just open it on the 2nd vob instead of the 1st (ie. place the vob of interest in a separate directory so it doesn't automatically append all segments, then open it up)
Other options to cut are avidemux (free) (using copy mode and mark in/mark out), or DGIndex using the "[" and "]" to mark segments - this will even demux the segment to the elementary streams
Not sure if I missed this, but what is the original format of your video? Is is DV-AVI? If so and you are having problems after editing in Premiere you should be able to save as DV-AVI again then compress in a 3rd party app.
I'm using the JW FLV player on my website and like it alot. So are you guys saying the x264 files will play fine using this player? If so I need to look into it as I've not been too impressed with some of the flv files I've uploaded to it, even at 400kbps - 320x240
Thank you for helping, finally DGIndex produced ok results using mark-in|mark-out before making d2v.
resulting .avs file plays ok with no sync problem. Doing x264 encoding now...
@greymalkin: the problem with audio syn was with the DVD as an input. No premiere editing at all.
x264 are fine with JW player. The only thing is MOOV atom. If you video does not stream unless it is fully downloaded try this: http://renaun.com/blog/2008/08/14/262/
@greymalkin - yes you can use x264 with JW Player embedded
Here are some examples (from smoke3 @ Doom9), use the drop down menu to see more
Thanks to everybody for the help. Finally everything works so I got no problems anymore.
Just want to share what I found here http://forum.doom9.org/archive/index.php/t-129134.html regarding MOOV ATOM:
1) x264 is a video encoder writing the video stream info directly into the mp4. doing so the header will be written at the end of the mp4, as the header is only known at the end of encoding
2) for muxing the video with audio mp4box is used in megui. mp4box writes the header at the beginning of the file with the default settings.
therefore your mp4 should already have the header at the start.