Log in

View Full Version : Warning in resize


Trafalgar Law
26th December 2010, 07:20
I have the following file:


General
Nombre completo : D:\source.mp4
Formato : MPEG-4
Formato del perfil : Base Media
ID Códec : isom
Tamaño del archivo : 864MB
Duración : 24min.
Tasa de bits total : 5 023Kbps
Fecha de codificación : UTC 2009-05-29 06:58:10
Fecha de la etiqueta : UTC 2009-05-29 06:58:10

Video
ID : 1
Formato : AVC
Formato/Info : Advanced Video Codec
Formato del perfil : High@L4.1
Ajustes del formato, CABAC : No
Ajustes del formato, RefFrames : 5marcos
ID Códec : avc1
ID Códec/Info : Advanced Video Coding
Duración : 24min.
Tipo de tasa de bits : Variable
Tasa de bits : 4 833Kbps
Ancho : 1 440pixeles
Alto : 1 080pixeles
Relación de aspecto : 4:3
Modo de velocidad de cuadro : Constante
Velocidad de cuadro : 23,976fps
Estándar : NTSC
ColorSpace : YUV
ChromaSubsampling : 4:2:0
BitDepth/String : 8bits
Tipo de exploración : Progresivo
Bits/(Pixel*cuadro) : 0.130
Tamaño de pista : 831MB (96%)
Idioma : Inglés
Fecha de codificación : UTC 2009-05-29 06:58:10
Fecha de la etiqueta : UTC 2009-05-29 06:58:10
colour_primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
transfer_characteristics : BT.709-5, BT.1361
matrix_coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177

Audio
ID : 2
Formato : AAC
Formato/Info : Advanced Audio Codec
Formato de la versión : Version 4


This is the script of the first pass


x264.exe --tune animation --profile high --bframes 16 --ref 1 --no-8x8dct --me dia --subme 3 --trellis 0 --weightb --deblock 1:1 --pass 1 --bitrate 1989 --stats "stats.tmp" --slow-firstpass --thread-input --aq-mode 0 --direct auto --me esa --level 5.1 --video-filter resize:720,480 --output "C:\Users\CESAR\Documents\Mis descargas\prueba.mp4" "D:\script.avs" 2>log.txt


I'm encoding a two pass. On the first pass I have the following warnings

resize [warning]: converting from yuyv422 to yuv422p
resize [info]: resizing to 720x480
resize [warning]: converting from yuv422p to yuv420p

Why are these warnings? :helpful:

roozhou
26th December 2010, 11:36
Your input avs uses YUY2.

Trafalgar Law
26th December 2010, 18:37
This is my input avs

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\VSFilter.dll")
raw=DirectShowSource("D:\raw.mp4", fps=23.976, audio=false, convertfps=true)
op=raw.trim(0,2176).TextSub("D:\inicio.ass")
cap=raw.trim(2177,34676)
final=op+cap
final=final.TextSub("D:\timmeo.ass")
return final




I do not use YUY2

Didée
26th December 2010, 19:32
On your system, DirectShowSource happens to use a decoder that outputs YUY2. Re-configure the decoder's output options, or use ConvertToYV12 in the script. Or even better, don't use DirectShowSource at all.

Trafalgar Law
26th December 2010, 19:45
The script now is this


LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\VSFilter.dll")
raw=DirectShowSource("D:\raw.mp4", fps=23.976, audio=false, convertfps=true)
op=raw.trim(0,2176).TextSub("D:\inicio.ass")
cap=raw.trim(2177,34676)
final=op+cap
final=final.TextSub("D:\timmeo.ass")
ConvertToYV12(final)
return final


And the warnings are still those

avs [info]: 1440x1080p 0:0 @ 2500000/104271 fps (cfr)
resize [warning]: converting from yuyv422 to yuv422p
resize [warning]: converting from yuv422p to yuv420p
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile Main, level 5.1

Did I do something wrong?

Or can only try the other method?

Pd: I have on my system Windows 7

Didée
26th December 2010, 20:06
You are still outputting YUY2. The conversion to YV12 goes into "last", then you return the not-converted "final".

Fixed ...


LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\VSFilter.dll")
raw=DirectShowSource("D:\raw.mp4", fps=23.976, audio=false, convertfps=true)
op=raw.trim(0,2176).TextSub("D:\inicio.ass")
cap=raw.trim(2177,34676)
final=op+cap
final=final.TextSub("D:\timmeo.ass")
final=ConvertToYV12(final)
return final

Trafalgar Law
26th December 2010, 20:15
Thanks for the help :thanks:

LoRd_MuldeR
26th December 2010, 21:23
Thanks for the help :thanks:

Still there's no difference between doing the "YUY2 -> YV12" conversion explicitly in your or Avisynth script or letting x264 do the required conversion automatically for you...

kemuri-_9
26th December 2010, 22:14
Still there's no difference between doing the "YUY2 -> YV12" conversion explicitly in your or Avisynth script or letting x264 do the required conversion automatically for you...

technically there's 2 conversions done by x264cli in the above scenario as it's converting YUY2 to YV16 and then YV16 to YV12.
where as doing it in avisynth is a single conversion.

Didée
27th December 2010, 00:59
That, plus the initial YV12 -> YUY2 conversion done by the DirectShow Decoder.

The smartest way would be to avoid ANY kind of colorspace conversion.
... even better, don't use DirectShowSource at all.
/metalks to the wind.