View Full Version : 1080P BluRay to 480P DVD-Video disc
Sn8kbordin
8th December 2008, 18:52
I made a BluRay back up into AVC disc that PS3 plays, but I want to make it into good old DVD-Video that DVD player will play.
Do I just need to resize to 720x480? Which resizer would be good for making it smaller?
What aspect ratio do I set on DVD?
Should I crop any black bars from BluRay before?
I'll be using CCE to encode and Tmpg DVD author to make DVD.
Ulf
9th December 2008, 10:55
Sn8kbordin,
I have make a script that converts an avs-file (with pixel aspect ratio 1:1) to SD (720x576 PAL or 720x480 NTSC). Save the script file with ".bat" suffix and drop your avs file (with video+audio) in the script file. I assume that you have removed the pulldown flags from the video stream (so that the framerate is 23.976 fps).
The script will produce a new avs file in SD format. You can choose between 4:3 and 16:9 aspect ratios. The resulting file can be encoded directly in CCE.
The script:
echo off
@REM Drop AVS with 1:1 pixel aspect ratio to create a 4:3 or 16:9 DVD AVS file
@REM Input framerate must be 23.976, 24 or 25 fps
@REM Output is PAL (25 fps, 720x576) or NTSC (29.97 fps, 720x480) avs file
cls
echo ---AVS (1:1 pixel aspect ratio) to DVD (PAL or NTSC) AVS creation---
@REM ------------------------------------------------------------
set PAL=1
set ANS=Y
echo -----
set /P ANS=Convert to PAL? (Y/N):
IF %ANS%==N set PAL=0
IF %ANS%==n set PAL=0
set SCALE=false
set ANS=N
echo -----
set /P ANS=Scale correctly (CCIR-601)? (Y/N):
IF %ANS%==Y set SCALE=true
IF %ANS%==y set SCALE=true
set WIDE=true
set ANS=Y
echo -----
set /P ANS=Wide 16:9 format? (Y/N):
IF %ANS%==N set WIDE=false
IF %ANS%==n set WIDE=false
@REM ------------------------------------------------------------
set IN_AVS=%~f1
IF %PAL%==1 set AVS_FILE=%~dp1576p_%~n1.avs
IF %PAL%==0 set AVS_FILE=%~dp1480i_%~n1.avs
@REM ------------------------------------------------------------
echo Import("%IN_AVS%") > "%AVS_FILE%"
echo ConvertToYV12() >> "%AVS_FILE%"
echo CCIR = %SCALE% >> "%AVS_FILE%"
echo WIDE = %WIDE% >> "%AVS_FILE%"
echo NW = 720 >> "%AVS_FILE%"
IF %PAL%==1 echo NH = 576 >> "%AVS_FILE%"
IF %PAL%==0 echo NH = 480 >> "%AVS_FILE%"
echo OW = Width() >> "%AVS_FILE%"
IF %PAL%==1 echo OHW = CCIR ? Height()*(118.0/81.0) : Height()*(64.0/45.0) >> "%AVS_FILE%"
IF %PAL%==1 echo OHN = CCIR ? Height()*(59.0/54.0) : Height()*(16.0/15.0) >> "%AVS_FILE%"
IF %PAL%==0 echo OHW = CCIR ? Height()*(40.0/33.0) : Height()*(32.0/27.0) >> "%AVS_FILE%"
IF %PAL%==0 echo OHN = CCIR ? Height()*(10.0/11.0) : Height()*(8.0/9.0) >> "%AVS_FILE%"
echo OH = WIDE ? OHW : OHN >> "%AVS_FILE%"
echo W_or_H = (((NW*OH)/(NH*OW)) ^<= 1) >> "%AVS_FILE%"
echo NWB = W_or_H ? NW : 4*Round(NH*OW/(4.0*OH)) >> "%AVS_FILE%"
echo NHB = W_or_H ? 4*Round(NW*OH/(4.0*OW)) : NH >> "%AVS_FILE%"
echo NWB = (NWB ^> NW) ? NW : NWB >> "%AVS_FILE%"
echo NHB = (NHB ^> NH) ? NH : NHB >> "%AVS_FILE%"
echo Spline36Resize(NWB, NHB) >> "%AVS_FILE%"
echo borderW = (NW - NWB)/2 >> "%AVS_FILE%"
echo borderH = (NH - NHB)/2 >> "%AVS_FILE%"
echo AddBorders(borderW, borderH, borderW, borderH) >> "%AVS_FILE%"
echo (Audiorate() == 48000) ? last : SSRC(48000) >> "%AVS_FILE%"
IF %PAL%==1 echo (Framerate() == 25) ? last : TimeStretch(pitch=(100.0*Framerate())/25.0).AssumeFPS(25,true).SSRC(48000) >> "%AVS_FILE%"
IF %PAL%==0 echo (Framerate() == 25) ? TimeStretch(pitch=(100.1*25.0)/24.0) : last >> "%AVS_FILE%"
IF %PAL%==0 echo AssumeFPS(24000,1001,true) >> "%AVS_FILE%"
IF %PAL%==0 echo (Audiorate() == 48000) ? last : SSRC(48000) >> "%AVS_FILE%"
IF %PAL%==0 echo AssumeFrameBased().ComplementParity() >> "%AVS_FILE%"
IF %PAL%==0 echo SeparateFields() >> "%AVS_FILE%"
IF %PAL%==0 echo SelectEvery(8,0,1,2,3,2,5,4,7,6,7) >> "%AVS_FILE%"
IF %PAL%==0 echo Weave() >> "%AVS_FILE%"
echo trim(0,0) >> "%AVS_FILE%"
@REM ------------------------------------------------------------
You don't need to crop the black bars from your video. Hope this will help. Obs, the script only works on Windows.
Sn8kbordin
9th December 2008, 17:44
I assume that you have removed the pulldown flags from the video stream (so that the framerate is 23.976 fps)
How can I tell if it has pulldown flags?
It is from BluRay.
Ulf
9th December 2008, 19:30
How can I tell if it has pulldown flags?
It is from BluRay.
You have already done a AVC disk, and I guess you used tsMuxer for that. It you open the stream (m2ts) from your AVC disk in tsMuxer and it shows up as "fps: 24000/1001" under "General track options", you are OK. You can now use tsMuxer to demux the video and audio streams.
I assume that you know how to create an avs file with video+audio.
Sn8kbordin
9th December 2008, 19:33
I was going convert audio into AC3 that DVD can take, then encode video by itself, and add video and audio track in DVD author.
rica
10th December 2008, 00:29
Hi Ulf.
I gave it a go with your script.
Here is what i selected:
--AVS (1:1 pixel aspect ratio) to DVD (PAL or NTSC) AVS creation---
-----
Convert to PAL? (Y/N): Y
-----
Scale correctly (CCIR-601)? (Y/N): Y
-----
Wide 16:9 format? (Y/N): Y
And here is the avs created by your script:
Import("C:\Users\rica\Desktop\video.h264")
ConvertToYV12()
CCIR = true
WIDE = true
NW = 720
NH = 576
OW = Width()
OHW = CCIR ? Height()*(118.0/81.0) : Height()*(64.0/45.0)
OHN = CCIR ? Height()*(59.0/54.0) : Height()*(16.0/15.0)
OH = WIDE ? OHW : OHN
W_or_H = (((NW*OH)/(NH*OW)) <= 1)
NWB = W_or_H ? NW : 4*Round(NH*OW/(4.0*OH))
NHB = W_or_H ? 4*Round(NW*OH/(4.0*OW)) : NH
NWB = (NWB > NW) ? NW : NWB
NHB = (NHB > NH) ? NH : NHB
Spline36Resize(NWB, NHB)
borderW = (NW - NWB)/2
borderH = (NH - NHB)/2
AddBorders(borderW, borderH, borderW, borderH)
(Audiorate() == 48000) ? last : SSRC(48000)
(Framerate() == 25) ? last : TimeStretch(pitch=(100.0*Framerate())/25.0).AssumeFPS(25,true).SSRC(48000)
trim(0,0)
But Elecard Converter Studio finds some errors on avs and doesn't accept it and CCE closes itself when i open that and start to encode?
Ulf
10th December 2008, 20:20
Hi Ulf.
I gave it a go with your script.
Here is what i selected:
...
Import("C:\Users\rica\Desktop\video.h264")
But Elecard Converter Studio finds some errors on avs and doesn't accept it and CCE closes itself when i open that and start to encode?
You should drop an avs file in the script, not a H.264 elementary file. Use DGAVCIndex to create a DGAVCIndex Project File (*.dga).
Say you have video.dga and audio.ac3. The avs would be:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGAVCDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\NicAudio.dll")
vid=AVCSource("C:\video.dga")
aud=NicAC3Source("C:\audio.ac3")
AudioDub(vid,aud)
rica
11th December 2008, 00:01
Ok, sorry for the misunderstanding.
I use DGAVCDecodeNV.
My source avs is:
LoadPlugin("C:\users\rica\desktop\DGAVC\DGAVCDecodeNV.dll")
AVCSource("C:\Trial\video.dga")
Created avs by your script is:
Import("C:\Trial\video.avs")
ConvertToYV12()
CCIR = true
WIDE = true
NW = 720
NH = 576
OW = Width()
OHW = CCIR ? Height()*(118.0/81.0) : Height()*(64.0/45.0)
OHN = CCIR ? Height()*(59.0/54.0) : Height()*(16.0/15.0)
OH = WIDE ? OHW : OHN
W_or_H = (((NW*OH)/(NH*OW)) <= 1)
NWB = W_or_H ? NW : 4*Round(NH*OW/(4.0*OH))
NHB = W_or_H ? 4*Round(NW*OH/(4.0*OW)) : NH
NWB = (NWB > NW) ? NW : NWB
NHB = (NHB > NH) ? NH : NHB
Spline36Resize(NWB, NHB)
borderW = (NW - NWB)/2
borderH = (NH - NHB)/2
AddBorders(borderW, borderH, borderW, borderH)
(Audiorate() == 48000) ? last : SSRC(48000)
(Framerate() == 25) ? last : TimeStretch(pitch=(100.0*Framerate())/25.0).AssumeFPS(25,true).SSRC(48000)
trim(0,0)
And it works.
I tried with Elecard Converter Studio 2.1 (mpeg2) and MeGui/SD_HQ preset (avc)
Thanks :helpful:
Ulf
11th December 2008, 10:19
rica and Sn8kbordin,
Note that it is important to include the audio in the avs file. The resulting avs file won't work otherwise.
If you are converting from 23.976 fps to 25 fps (PAL), you must reencode the audio. The PAL film runs appr. 4% faster than the original and the script adjust the length of the audio while preserving the tone pitch.
If you are converting from 23.976 fps to 29.97 fps (NTSC) you don't have to reencode the audio.
rica
11th December 2008, 17:45
Thanks i know but i use ec3to -speedup option for extracting audio and remux with video while authoring.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.