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 > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd November 2008, 12:05   #1  |  Link
stooky
Registered User
 
Join Date: Dec 2007
Posts: 8
Converting N82 mobile footage to DVD

Hi!
I have a problem: I want to convert footage taken by my N82 mobile device to mpeg2!
Therefore i need a good Avisynth-script that can be opened with HC Encoder.
I am new to Avisynth. I have played a bit with scripts, but I haven't received good results so far.

This is the script I load into HC Encoder so far:

DirectShowSource("C:\...\07102007001.avi",audio=false)
AssumeFPS(25) #the original footage don't has a constant framerate...
#Crop(20,0,-20,-0) #I'm not sure if I have to crop the original in order to get the correct aspect ratio
BicubicResize(720,576,0,0.5) #is there a resize method that provides better quality?
ConvertToYV12()

It is a pretty simple script, I know

In the following thread there is a script that apperently produces videofiles with good quality (source is N95, original footage also provided in this thread). But I don't know how to adapt it to get good looking mpeg2 files...
http://forum.doom9.org/showthread.ph...&highlight=n95

I'm sure there is the possibility to get out good results by applying the right filters... So far i have the feeling that my script produces mpeg2-videos that have a significant loss in sharpness and contrast. Perhaps there is a way to remove the compression artifacts in the original?

Thanks in advance!!

ps: I have another problem: AssumeFPS(25) makes the video stream DVD compliant but HC Encoder isn't capable of producing audio output... So what should I do to get audio which is synchron to the produced video (with AssumeFPS(25) applied)?

How can i transcode the aac-audiostream to DVD-compliant PCM losslessly?

Furthermore i need a free mpeg2 muxer... Do you know one?

Last edited by stooky; 2nd November 2008 at 13:34.
stooky is offline   Reply With Quote
Old 7th November 2008, 14:30   #2  |  Link
stooky
Registered User
 
Join Date: Dec 2007
Posts: 8
Now I've used the following script:

DirectShowSource("07102007001.mp4",audio=true)
#AssumeFPS(25, sync_audio=true) #the original footage don't has a constant framerate...
ResampleAudio(48000)
#Crop(20,0,-20,-0) #I'm not sure if I have to crop the original in order to get the correct aspect ratio
BicubicResize(720,576,0,0.5)
ConvertToYV12()

Now the problem is, that the audio is pitch shifted. It sounds horrible!
Is there no way to convert the video file into DVD-Compliant PAL format with normal, synchronous audio?
stooky is offline   Reply With Quote
Old 7th November 2008, 16:54   #3  |  Link
Comatose
Registered User
 
Join Date: Dec 2007
Posts: 639
Doing what you did with AssumeFPS' sync_audio=true won't fix the variable FPS problem (it's still not going to be synced once the FPS changes).

What you need to do is something like this:
DirectShowSource("07102007001.mp4",convertfps=true,fps=25)
#AssumeFPS(25, sync_audio=true) #the original footage don't has a constant framerate...
ResampleAudio(48000)
BicubicResize(720,576,0,0.5)
ConvertToYV12()

As for anything else (including cropping), we'll need a sample
Comatose is offline   Reply With Quote
Old 7th November 2008, 23:17   #4  |  Link
stooky
Registered User
 
Join Date: Dec 2007
Posts: 8
Thank you very much for your help!
Now with "DirectShowSource("07102007001.mp4",convertfps=true,fps=25)" i get synchronous audio that is not pitch-shifted!
stooky is offline   Reply With Quote
Old 8th November 2008, 05:21   #5  |  Link
Comatose
Registered User
 
Join Date: Dec 2007
Posts: 639
You're welcome

If you work with a better source later on, then you shouldn't do it this way as it might introduce choppyness (so you should come ask again )
I figured it doesn't matter in this case since cellphone video is usually very shaky and jumpy already.. :3
Comatose is offline   Reply With Quote
Old 10th November 2008, 21:11   #6  |  Link
stooky
Registered User
 
Join Date: Dec 2007
Posts: 8
What do you exactly mean with "it might introduce choppyness"? So far I'm happy with the results. Now I can load the *.mp4 files directly into HC Encoder to resize and convert them into mpeg2! The only thing that still bothers me is that I have to save the audio stream as *.wav (out from virtualdub) and to convert it manually with BeLight... At the end I have to mux it with Mplex. --> This is not an efficient workflow

By the way: Is there a way to "remove" the artifacts in the video which were produced due to the poor compression algorithm of the N82? The video could also be a bit sharper, as the sharpness suffers from resizing...
stooky is offline   Reply With Quote
Old 12th November 2008, 13:58   #7  |  Link
Comatose
Registered User
 
Join Date: Dec 2007
Posts: 639
changefps() duplicates or removes frames to reach the target fps, but it doesn't have any other logic.
Therefore, in smooth motion like pans you may end up with dupe frames in the middle of the pan - which will make the pan "jump" forward at that spot.
There are other methods to do it (none of which are perfect of course), but in this case this would be the "best" method because changefps() is a simple solution and cell phone videos are already jumpy and choppy, so you won't notice the dupes.

As for denoising, sharpening and so on, you'll have to upload a sample :P
Comatose is offline   Reply With Quote
Reply

Tags
avisynth, dvd, mobile, mp4, n95

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 03:09.


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