FAQ contenus de différents types

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(New page: | Main Page | General Info | Loading clips | Loading Scripts | [[FAQ_common_errors | Common Error Mes...)
 
m (5 revisions)
 
(4 intermediate revisions by 3 users not shown)
Line 2: Line 2:
  
  
=== The video and audio in my final encoding is out of sync, what should I do? ===
+
=== La vidéo et l'audio de mon encodage final sont désynchronisés, que dois-je faire? ===
  
Assuming that you processed your video and or audio with AviSynth, there can be several reasons why your final encoding is not in sync (synchronization). The most common ones are:
+
En supposant que vous avez traité votre vidéo et/ou audio avec AviSynth, il y a plusieurs raisons possibles pour expliquer que votre encodage final est désynchronisé. Les plus courantes sont les suivantes:
  
1) Your source is already out of sync (thus before any AviSynth processing or any encoding). It's a pain to correct this, but that's not the scope of this FAQ.
+
1) Votre source est déja désynchronisée (ceci avant traitement par AviSynth ou avant encodage). C'est très difficile à corriger, mais ce n'est pas l'objet de cette FAQ.
  
2) The audio has a constant delay, and you forgot to add the delay (either in AviSynth if you imported the audio in AviSynth or in an encoder if you imported the audio directly in your encoder). As an example, the demuxed audio stream from a VOB has often a delay. When demuxing this audio stream with [[DGIndex]], the delay (actually how the delay should be corrected) is written into the name of the demuxed audio stream. You can use [[DelayAudio]] to add the delay in AviSynth.
+
2) L'audio a un délai constant, et vous avez oublié de rajouter le délai (doit dans AviSynth si vous avez importé l'audio avec AviSynth soit dans un encodeur si vous avez importé l'audio directement dans votre encodeur). Par exemple, le flux audio démultiplexé d'une VOB a souvent un délai. Quand vous démultiplexez ce flux audio avec [[DGIndex]], le délai (en fait comment le délai doit être corrigé) est écrit dans le nom du flux audio démultiplexé. Vous pouvez utiliser [[DelayAudio]] pour ajouter ce délai dans AviSynth.
  
  vid = MPEG2Source("D:\movie.d2v")
+
  vid = MPEG2Source("D:\film.d2v")
  aud = NicAC3Source("D:\movie T01 2_0ch 448Kbps DELAY -218ms.ac3")
+
  aud = NicAC3Source("D:\film T01 2_0ch 448Kbps DELAY -218ms.ac3")
 
  AudioDub(vid, aud)
 
  AudioDub(vid, aud)
 
  DelayAudio(-0.218)
 
  DelayAudio(-0.218)
  
3) The audio has a variable delay (with a zero delay at the beginning and a maximal delay at the end). This can be caused when you load a clip into AviSynth which has a variable framerate. Pretty much anything except video contained in an AVI or MPEG-2/VOB file can be variable framerate. If you used DirectShowSource the load your clip, you can use
+
3) L'audio a un délai variable (avec un délai nul au début et un délai maximum à la fin). Ceci peut être causé par le fait que vous chargez dans AviSynth un clip qui a une fréquence variable. A peu près tout sauf les vidéo contenues dans un fichier  AVI ou MPEG-2/VOB peut avoir une fréquence variable. Si vous utilisez DirectShowSource pour charger votre clip, vous pouvez utiliser
  
  # a mkv-file is used here as an example:
+
  # un fichier mkv est utilisé ici comme exemple:
  DirectShowSource("D:\movie.mkv", fps=xxx, convertfps=true) # fps = average framerate
+
  DirectShowSource("D:\film.mkv", fps=xxx, convertfps=true) # fps = fréquence moyenne
  
to ensure sync. What happens is that frames are added or removed to ensure sync, thus converting it to a constant framerate video.
+
Ce qui se passe est que des trames sont ajoutées ou supprimées pour assurer la synchronisation, le convertissant ainsi en une vidéo à fréquence fixe.
  
If you are not using DirectShowSource or you don't want to add or remove frames, you need to create a timecodes file first and use it later on in your final encoding. Have a look at this [[VFR|article]] for more information on this subject.
+
Si vous n'utilisez pas DirectShowSource ou que vous ne souhaitez pas ajouter ou supprimer des trames, vous devez d'abord créer un fichier de timecodes et l'utiliser ensuite dans votre encodage final. Jetez un coup d'oeil à cet [[VFR|article]] pour plus d'informations à ce sujet.
  
 
=== How do I recognize progressive, interlaced, telecined, hybrid and blended content? ===
 
=== How do I recognize progressive, interlaced, telecined, hybrid and blended content? ===
Line 94: Line 94:
  
 
|[[AviSynth_FAQ | Main Page]] | [[FAQ_general_info |General Info]] | [[FAQ_loading_clips | Loading clips]] | [[FAQ_frameserving | Loading Scripts]] | [[FAQ_common_errors | Common Error Messages]] | '''Processing Different Content''' | [[FAQ_YV12 | Dealing with YV12]] | [[FAQ_using_virtualdub_plugins | Processing with Virtualdub Plugins]] |
 
|[[AviSynth_FAQ | Main Page]] | [[FAQ_general_info |General Info]] | [[FAQ_loading_clips | Loading clips]] | [[FAQ_frameserving | Loading Scripts]] | [[FAQ_common_errors | Common Error Messages]] | '''Processing Different Content''' | [[FAQ_YV12 | Dealing with YV12]] | [[FAQ_using_virtualdub_plugins | Processing with Virtualdub Plugins]] |
 +
 +
[[Category:French pages]]

Latest revision as of 21:48, 18 July 2013

| Main Page | General Info | Loading clips | Loading Scripts | Common Error Messages | Processing Different Content | Dealing with YV12 | Processing with Virtualdub Plugins |


Contents

[edit] La vidéo et l'audio de mon encodage final sont désynchronisés, que dois-je faire?

En supposant que vous avez traité votre vidéo et/ou audio avec AviSynth, il y a plusieurs raisons possibles pour expliquer que votre encodage final est désynchronisé. Les plus courantes sont les suivantes:

1) Votre source est déja désynchronisée (ceci avant traitement par AviSynth ou avant encodage). C'est très difficile à corriger, mais ce n'est pas l'objet de cette FAQ.

2) L'audio a un délai constant, et vous avez oublié de rajouter le délai (doit dans AviSynth si vous avez importé l'audio avec AviSynth soit dans un encodeur si vous avez importé l'audio directement dans votre encodeur). Par exemple, le flux audio démultiplexé d'une VOB a souvent un délai. Quand vous démultiplexez ce flux audio avec DGIndex, le délai (en fait comment le délai doit être corrigé) est écrit dans le nom du flux audio démultiplexé. Vous pouvez utiliser DelayAudio pour ajouter ce délai dans AviSynth.

vid = MPEG2Source("D:\film.d2v")
aud = NicAC3Source("D:\film T01 2_0ch 448Kbps DELAY -218ms.ac3")
AudioDub(vid, aud)
DelayAudio(-0.218)

3) L'audio a un délai variable (avec un délai nul au début et un délai maximum à la fin). Ceci peut être causé par le fait que vous chargez dans AviSynth un clip qui a une fréquence variable. A peu près tout sauf les vidéo contenues dans un fichier AVI ou MPEG-2/VOB peut avoir une fréquence variable. Si vous utilisez DirectShowSource pour charger votre clip, vous pouvez utiliser

# un fichier mkv est utilisé ici comme exemple:
DirectShowSource("D:\film.mkv", fps=xxx, convertfps=true) # fps = fréquence moyenne

Ce qui se passe est que des trames sont ajoutées ou supprimées pour assurer la synchronisation, le convertissant ainsi en une vidéo à fréquence fixe.

Si vous n'utilisez pas DirectShowSource ou que vous ne souhaitez pas ajouter ou supprimer des trames, vous devez d'abord créer un fichier de timecodes et l'utiliser ensuite dans votre encodage final. Jetez un coup d'oeil à cet article pour plus d'informations à ce sujet.

[edit] How do I recognize progressive, interlaced, telecined, hybrid and blended content?

It is important to know your content if you want to process it. The most important ones are: progressive, interlaced, telecined, hybrid and blended content, and they should be processed differently.

  • Progressive and interlaced content:

Most filters assume that your content is progressive (which means that every frame is taken at a different time-instant), unless the filter has an option interlaced=true/false. When the option is present you can use interlaced=true for interlaced content. For interlaced content, every field (a frame consists of two fields) is taken at a different time-instant. This is explained in the Analog Capture Guide and the Force Film, IVTC, and Deinterlacing tutorial.

  • Telecined content:

Usually movies are shot at 24 fps (frames per second). When putting this on a dvd, fields are added to match the NTSC frame rate, which is closer to 30 fps. When doing this, the content is called "telecined content" (this holds for the conversions 25 fps -> 30 fps and 24 fps -> 25 fps as well, provided fields are added). More about this can be found in the Force Film, IVTC, and Deinterlacing tutorial.

  • Hybrid content:

Hybrid content is content with different base frame rates (for example 8, 12, and 16 fps at which anime is often drawn). Start Trek is a different example consisting of telecined (at 30 fps) and interlaced content (at 30 fps). Have a look at this article for more information on this subject.

  • Blended content:

Blended content is content which consists of blended fields (in some fields there is content from different time-instants visible). It's usually the result of bad NTSC to PAL conversions (and vice-versa), or messed-up deinterlacing. Some examples can be found here or here.

[edit] How do I process interlaced content?

There are two ways to process your interlaced content (assuming that you use a filter which has no interlaced=true option). The first one is the most accurate, but also the slowest: bobbing, processing and reinterlacing. The second one is the fastest, but also less accurate one: processing the fields separately.

1) bobbing:

AssumeTFF() # or AssumeBFF (set the video's field order correctly)
TDeint(mode=1, type=3) # or any other smart Bob
Filter(...)
AssumeTFF() # or AssumeBFF (set the video's field order correctly)
Separatefields()
Selectevery(4,0,3)
Weave()

2) processing the fields separately:

SeparateFields()
even = SelectEven(last).Filter(...)
odd = SelectOdd(last).Filter(...)
Interleave(even, odd)
Weave()


[edit] How do I process telecined content?

You need to inverse telecine (IVTC) before you do any processing. You can use the plugin Decomb for example, which can be downloaded here. See the tutorials "Force Film, IVTC, and Deinterlacing" or "Analog Capture Guide" which explain how to do this.


[edit] How do I process hybrid content?

You only run into troubles when your clip as openend in AviSynth shows combing (being partly interlaced, telecined, etc ...). I'm not sure yet what to do in that case.


[edit] What is variable framerate video?

There are two kinds of video when considering framerate, constant framerate (cfr) video and variable framerate (vfr) video. For cfr video the frames have a constant duration, and for vfr video the frames have a non-constant duration. Many editing programs (including VirtualDub and AviSynth) assume that the video is cfr, partly because avi doesn't support vfr. Although the avi container doesn't support vfr, there are several containers (mkv, mp4 and wmv/asf for example) which do support vfr. More information can be found here.


[edit] How do I import variable framerate video into AviSynth and how do I process it?

There are two ways to import variable framerate video into AviSynth:

1. Open the video in AviSynth using for example DirectShowSource(..., convertfps=false) or FFmpegSource. The problem is that in those cases no frames are added or removed to convert it to constant framerate video to ensure sync. Generate a timecode file using some external program or using the AviSynth plugin you use for importing the video into AviSynth (if possible). Many non-AVI files contain video with a variable framerate, and in that case you need to make sure of the following two things:

  • Don't change the framerate and the number of frames in AviSynth. If you don't this (and you don't change the timecodes file manually) your video and audio in your final encoding will be out of sync.
  • Use the timecodes file again when muxing your encoded video and audio. If you don't do this your video and audio in your final encoding will be out of sync.

2. Open the video in AviSynth using for example DirectShowSource(..., convertfps=true). In this case frames are added or removed to convert it to constant framerate video to ensure sync. You can process the video the way you want. You can even create a new timecodes file and create a new variable framerate video using it. More information can be found here.

Regarding the first way. If you did change the framerate or the number of frames, you can use DeDup to recreate a new timecode file:

dedup_dedup(threshold=0.1, maxcopies=10, maxdrops=4, log="01.log", timesin="original.tmc", times="final.tmc")

The parameter "timesin" specifies the timecode file of the original video on which the output file will be based on (rather than just using the input stream's framerate). I never used it, so I'm not sure how good this is. Look here for a discussion.

| Main Page | General Info | Loading clips | Loading Scripts | Common Error Messages | Processing Different Content | Dealing with YV12 | Processing with Virtualdub Plugins |

Personal tools