Cach chuyen doi phim 2D thanh 3D de dang

Tags: 3D Vision, tren may tinh, toan the gioi, nguoi ham mo, nguoi dung, tep tin, Bo phim, cac Bo, chuong trinh, chuyen doi, video, For, F2, F1, thanh


- Cac bo phim 3D dang thu hut kha nhieu nguoi ham mo tren toan the gioi nhung so luong phim con chua nhieu. Vi vay, bai viet se cung cap cho doc gia yeu thich phim 3D, mot cach don gian de nang cap cac noi dung 2D len 3D.

Anh minh hoa

Don gian nguoi dung chi can mot doan scrip duoi day, tai va cai dat ung dung AviSynth.

Chuyen doi 2D thanh 3D bang AviSynth

## 2D to 3D Realtime Video Conversion Avisynth script v0.3b
## Made by Anton Belev at 3D Vision Blog
## http://www.3dvision-blog.com
## Additionally extended by Martin Haverland at audiomh.de for quality resize
## and different output modes including interlaced format for use in non-3d specific players e.g. windows media player.

## Open the video file for conversion, change the video file name
video2d = DirectShowSource("Avatar_Trailer_HD.avi")

## Increase video brightnes on dark videos, good for 3D Vision owners
# video2d = video2d.Tweak(Bright=10)

## Convert to RGB32 to avoid the width restrictions
video2d = ConvertToRGB32(video2d)

## Optional aspect ratio maintaining quality resize for 3d monitor target resolution.
## Very cpu intensive, may be for offline use only, e.g. in virtualdubmod.
## 2x 3.0ghz cpu may give you a framerate of 16fps while running the whole script in virtualdubmod including xvid compression in HDTV quality saving setting.
## Offers great quality in the result video for fullscreen playback in every .avs capable player later.
## Also reduces ghosting if the original file resolution is smaller than the target resolution.
# videoW = width(video2d)
# videoH = height(video2d)
## For 19" Zalman use 1280, for 22" Zalman Trimon it is 1680 etc.
# hzTargetSize = 1280
# video2d = Lanczos4Resize(video2d, hzTargetsize, hzTargetsize * videoH / videoW)
## Commenting out the above resizing maintains realtime capability!

## Get video width/height and set the frame stretch factor
## Lower the value 100 to increase frame stretch, may introduce ghosting
videoW = width(video2d)
videoH = height(video2d)
ResW = videoW + (videoW / 100)
CropW = (ResW - videoW) / 2

## Create variables for left and right frame with one frame difference
## This is the Plufrich-like simulation that creates illusion of depth from movement
f1 = video2d
f2 = DeleteFrame(video2d, 0)

## Stretch the right frame to further the depth effect
f1 = LanczosResize(f1, ResW, videoH)
f1 = Crop(f1, 0, 0, videoW, videoH)

## Stretch the left frame to further the depth effect
f2 = LanczosResize(f2, ResW, videoH)
f2 = Crop(f2, CropW, 0, videoW, videoH)

## Output the two video frames in a side-by-side / parallel format
## Use this as a default for playing back on 3D Vision (Side by Side L/R)
StackHorizontal(f2, f1)

## Output the two video frames in a Above/Below format (like Sony?)
# StackVertical(f2,f1)

## Output the two video frames in a page flipping format for shutter glasses etc.
## The Tweak as proposed by eslave is for brighter image, modify the value 30
# f1 = f1.ConvertToYV12.Tweak(Bright=30)
# f2 = f2.ConvertToYV12.Tweak(Bright=30)
# Interleave(f2,f1)

## Output the two video frames in anaglyph red-cyan as proposed by eslave
# MergeRGB(f2.ShowRed, f1.ShowGreen, f1.ShowBlue)

## For reversed anaglyph i.e. cyan-red
# MergeRGB(f1.ShowRed, f2.ShowGreen, f2.ShowBlue)

## Output the two video frames in anaglyph yellow-blue as proposed by eslave (untested)
# f1 = f1.ConvertToYV12(matrix="PC.601").tweak(bright=12.5, sat=1.25, coring=false)
# f1 = f1.ConvertToRGB32
# f1 = f1.Levels(0, 1.05, 255, 0, 255, coring=false)
# MergeRGB(f2.ShowRed, f1.ShowGreen, f1.ShowBlue)

## Output the two video frames in anaglyph blue-Yellow as proposed by eslave (untested)
# f2 = f2.ConvertToYV12(matrix="PC.601").tweak(bright=12.5, sat=1.25, coring=false)
# f2 = f2.ConvertToRGB32
# f2 = f2.Levels(0, 1.05, 255, 0, 255, coring=false)
# MergeRGB(f1.ShowRed, f2.ShowGreen, f2.ShowBlue)

## Output two video frames in Interlaced mode
## Ueed for Zalman Trimon, Acer Aspire 3D etc.
# f1 = SeparateFields(f1)
# f1 = SelectEven(f1)
# f2 = SeparateFields(f2)
# f2 = SelectOdd(f2)
# interleave(f2,f1)
# AssumeFieldBased()
# weave()

De chuyen cac bo phim 2D thanh 3D, nguoi dung tai chuong trinh co ten goi AviSynth ve va cai dat tren may tinh. Tuy nhien, chuong trinh nay khong co giao dien nguoi dung ma thay vao do, chung chi co chuc nang nhu mot bo Codec de cho phep cac ung dung nhu Windows Media Player hieu duoc cac tap lenh (script) cua AviSynth (duoi dang cac tep tin AVS).

Chi can su dung cung mot script AVS tren day de chuyen cac tep tin 2D thanh 3D. Cac buoc thuc hien gom:

- Chep doan script do va dan vao trong Notepad.
- Doi ten tep tin o ngay dau doan script “Avatar_Trailer_HD.avi” thanh ten tep tin video ma nguoi dung dang muon chuyen sang 3D.
- Luu lai theo dang ten tep tin mo rong.AVS trong cung thu muc chua tep tin video.

Anh minh hoa


Nhu vay la cong viec chuyen doi da hoan thanh va chi con cach de thuong thuc bo phim 3D do ma thoi. Don gian, nguoi dung mo mot chuong trinh nghe nhac doc duoc cac script AVS (nhu Windows Media Player) va mo tep tin .AVS da duoc tao o buoc tren. Gia su ban lam dung nhu cac buoc tren, ban se nhin thay phien ban video cuc rong voi hai khung hinh hoi khac nhau dang chay canh nhau de tao hieu ung 3D. Cac tep tin 3D nay duoc dinh dang de hoat dong cung voi cong nghe 3D Vision cua Nvidia. Neu ban thich 3D noi mau (do/luc lam) de su dung voi cap kinh loc, nguoi dung can chinh sua nhanh doan script. Bang cach them # vao dau dong StackHorizontal(f2, f1), roi bo # o dong # MergeRGB(f2.ShowRed, f1.ShowGreen, f1.ShowBlue).

Tuy nhien, chuong trinh AviSynth hoat dong theo thoi gian thuc. Chung tong hop tu tep tin .Avi goc va script, xep khung hinh de trinh trinh nghe nhac xu ly cac khung hinh do. Nhung dieu kho khan cho nguoi dung la neu muon xem bo phim 3D do o cac may tinh khac thi lai phai cai dat AviSynth va thuc hien cac thao tac nhu tren. De loai bo phien phuc do, don gian nguoi dung chi can luu vinh vien video 3D nay tren o cung nho chuong trinh VirtualDub.

Anh minh hoa

Luu video 3D bang VirtualDub

De luu cac bo phim 3D, nguoi dung truy cap vao trang VirtualDub , tai va giai nen chuong trinh nay tren may tinh. VirtualDub la mot trinh bien tap video nguon mo co dung luong nhe va dac biet tot khi ma hoa lai cac video rat nhanh. Buoc tiep theo cua qua trinh, nguoi dung phai dam bao rang VirtualDub co cac cong cu can thiet de tao mot ban sao chat luong cao cua bo phim 3D do. Cu the, chung can cac bo Codec-mot danh cho hinh anh video va mot danh cho am thanh, chang han nhu cac bo Codec Xvid MP4 va LAME MP3. Neu tren may tinh chua co san cac bo Codec nay, nguoi dung nen tai ve (Codec Xvid va LAME) va cai dat. Khi tai ve ca hai, can chay trinh cai dat de dang ky cac Codec nay voi he dieu hanh Windows.

Thiet lap VirtualDub de su dung Xvid bang cach, kich Video -> Compression va chon Xvid MPEG-4 Codec. Thiet lap am thanh bang cach, kich vao Audio -> Full, cho chut chuong trinh xu ly, roi kich vao Audio -> Compression va chon MPEG Layer 3.

Anh minh hoa

Cuoi cung mo tep tin .AVS cua video 3D do va kich File -> Save as AVI va go ten muon luu. Nhu vay, chung ta da tao ra mot bo phim 3D de mo bat cu luc nao ma khong phai thuc hien cac thao tac o tren cung nhu khong can cai dat chuong trinh AviSynth nua.

Anh minh hoa


Ha Bui - (theo PCW)

Viet Bao

TIN Công Nghệ NỔI BẬT

Trên tay Samsung Galaxy Note 4 vỏ kim loại

Samsung Galaxy Note 4 sở hữu kích thước 153.5 x 78.6 x 8.5mm, trọng lượng 176g. Máy có ngôn ngữ thiết kế cá tính và thanh lịch kiểu Galaxy. Thiết bị có khung kim loại cao cấp với góc bo tròn mềm mại tích hợp hài hòa với màn hình máy.

Tìm hiểu: 3D Vision, tren may tinh, toan the gioi, nguoi ham mo, nguoi dung, tep tin, Bo phim, cac Bo, chuong trinh, chuyen doi, video, For, F2, F1, thanh

Xem Bản Tiếng Việt Có Dấu: Cách chuyển đổi phim 2D thành 3D dễ dàng

Ban co the doc ban tieng Viet co dau cua bai viet Cách chuyển đổi phim 2D thành 3D dễ dàng bang cach nhan chuot vao duong dan tren.

Lien he ve tin Cach chuyen doi phim 2D thanh 3D de dang

Nhan xet, hay lien he ve tin Cach chuyen doi phim 2D thanh 3D de dang co the gui bang duong dan o duoi. Ban nen gui kem tieu de bai viet Cach chuyen doi phim 2D thanh 3D de dang de lam tham khao. Bai viet nay thuoc chuyen de Kinh nghiem trong chuyen muc Cong nghe.

Cac tin khac:

Xem tiep ... Kinh nghiem
Kenh Tin RSS Kenh Tin RSS | Du Bao Thoi Tiet | Lich Xem TV | Lien He - Contact | Quang Cao | Viec Lam | Dieu Kien Su Dung | Bao Ve Tinh Rieng Tu | Sitemap

Copyright©2008 VietBao.vn, Thu Vien Thong Tin Tong Hop Viet Nam va The Gioi, phien ban thu nghiem phan mem Viet Bao Viet Nam, beta 1.0