Sunday, October 28, 2007

Convert DVD, flv, DV, MJPEG, AVI to iTunes, iPod Touch, Apple TV

DVD to DVD flow
SmartRipper 2.41 (2001)
DVD Shrink 3.2 (2004) old
DVD Decrypter 3.5.4.0 (2005) better
RipIt4Me 1.7.1.0 (2007) needs DVD Decrypter (better) or DVD Shrink
FixVTS (2007)
VobBlanker (2007)
DVD Rebuilder 0.98.2 (2008)
DVD43 4.6.0 (2009)
DVDFab HD Decrypter 8.1.3.3 Beta (2011) latest and greatest

Make/Create date ISO file from ImgBurn
Rip: DVDFab Decrypter or DVD Decrypter or RipIt4Me or DVD Shrink to VIDEO_TS
Fix: FixVTS and VobBlanker
Encoding: DVD Rebuilder or DVD Shrink
Burn: Windows Image Disc Burner, iso writer, ImgBurn
Play ISO: mount ISO as Disk using WinCDEmu

DVD to mp4
vob2mpg to extract mpeg2 files
ffmpeg -i movie.mpg movie.mp4; default way to encode H264 (AVC) + AAC

RipIt4Me + DVD Decrypter (old)
DVDFab HD Decrypter
ffmpeg documentation/manual

DV flow: miniDV .dv file uses dvvideo and pcm_s16le
ffmpeg -i file.dv -vcodec copy -acodec copy -copyts file.avi
ffmpeg -i file.dv -threads 0 -vcodec libx264 -acodec libfaac file.mp4
ffmpeg -i file.dv -threads 0 -vcodec mpeg2video -acodec libfaac file.avi

HDV flow
Windows Movie Maker capture HDV to DVR-MS - no good, no scene spliting
Capturing HDV: HDVSplit capture to native MPEG transport stream .m2t .ts .m2ts, rename .m2t to .mpg
Viewing .m2t .mpg using either
1. MPlayer frontend gui: SMPlayer + Windows binaries: mplayer-win32 (with older ffmpeg) = MPlayer for Windows, use adaptive filter to deinterlace, yadif or kerndeint (kernel deinterlacer) (Deinterlacing filters)
2. VideoLAN VLC media player (without installer), 1440 -> 1920 problem
3. ffdshow a DirectShow filter and VFW codec

Convert m2t to MPEG program stream mpeg2 using (slight quality degradation with multithreaded MPEG* encoding)
1a. ffmpeg -i file.m2t -vcodec copy -acodec copy -copyts file.vob <- use svcd
1b. ffmpeg -i file.m2t -vcodec copy -acodec copy -f vob -ss 00:00:10 -t 00:09:59 file.mpeg <- seek to position, duration, copy ts automatically?
1c. ffmpeg -i file.m2t -threads 0 -vcodec libx264 -b 4000k -vpre slowfirstpass -pass 1 -an -s vga file.mp4 <- phanfare SD (discard SD original > 4mbps)
    ffmpeg -i file.m2t -threads 0 -vcodec libx264 -b 4000k -vpre max -pass 2 -acodec (libfaac -ab 64k -ar 22050 -ac 1 | copy) -s vga -y file.mp4
1d. ffmpeg -i file.m2t -threads 0 -vcodec libx264 -b 5000k -vpre slowfirstpass -pass 1 -an -s hd720 file.mp4 <- phanfare HD (discard HD original > 5mbps)
    ffmpeg -i file.m2t -threads 0 -vcodec libx264 -b 5000k -vpre max -pass 2 -acodec (libfaac -ab 192k | copy) -s hd720 -y file.mp4
1e. ffmpeg -i file.m2t -threads 0 -vcodec libx264 -b 2000k -vpre fastfirstpass -pass 1 -an -s hd1080 file.mp4 <- YouTube HD 1080p (can upload original)
    ffmpeg -i file.m2t -threads 0 -vcodec libx264 -b 2000k -vpre hq -pass 2 -y -acodec libfaac -ab 232k -ar 44100 -ac 2 -s hd1080 -y file.mp4
1f. ffmpeg -i file.m2t -threads 0 -vcodec libx264 -b 7000k -vpre slowfirstpass -pass 1 -an -s hd720 file.mp4 <- Xbox 360
    ffmpeg -i file.m2t -threads 0 -vcodec libx264 -b 7000k -vpre max -pass 2 -y -acodec libfaac -ab 192k -s hd720 -y file.mp4
2. MPEG Streamclip convert to MPEG with MP2 Audio, batch

AVCHD streaming MTS file viewing, do not use VLC Player (has non-installer option), SMPlayer, MPC-HC
on Vista, use
Media Player Classic Home Cinema
on XP, use
1. ffdshow tryouts latest SVN build
2. Media Player Classic 6.4.9.1 rev 107
3. Haali Media Splitter optional
note: Add AVCHD/M2TS Support to Windows Media Player 11 and Windows Media Center, Setup a Proper Playback Chain in Windows, MP4 Usage Guide, Playgack

Youtube 1080p HD 2GB / 10 minutes = 26.67 Mbps. HDV 25M+374K bps
Phanfare HD 2GB / 10 minutes 2GB = 26.67 Mbps, archived at 4Mbps MPEG4 AVI, streaming at 1Mbps flash 7

Flash swf, flv extraction and demuxing
ffmpeg/tools/cws2fws.exe to convert compressed swf to uncompressed swf

YouTube - How To Extract Audio From an SWF File (Annotated)


1. flv extract to extract both video and audio

2.** official Windows version of ffmpeg  (official Zeranoe with libvo_aacenc, h264 high profile, presets
(Japan single-binary ffmpeg with libvo_aacenc, h264 main profile, threads) 
(New Ramiro Polla M1Research daily with libfaac, h264 high profile, w32threads, presets) 
(Dirk Paehl with libfaac, h264 high profile, pthread might have newer executable binary) 
(very old sourceforge version with doc MPlayer for Win32), get ffpresets from bare sources, to demux audio/video, most flexible

Linux Mint needs to install libavcodec-extra-52 and related packages.

3. AAC encoders FAAC, neroAACenc, libavcodec, VisualOn encoder, Fraunhofer FDK AAC, libaacplus

extract/strip video/audio only

ffmpeg -i test.mp4 -vcodec copy -an video.m4v -ss -t
ffmpeg -i test.mp4 -acodec copy -vn audio.m4a
ffmpeg -i test.flv -vn audio.wav
supported codecs,
ffmpeg -formats

Video size spec hd720 hd1080


* Seeking to split a file or select a segment: cut, trim (-t duration -to position)
-ss before -i

ffmpeg -ss 1:00 -i video.mp4 -to 2:10 -c copy cut.mp4
 -to might still be duration, in this case, use duration before -i
ffmpeg -ss 1:00 -t 1:10 -i video.mp4 -c copy cut.mp4

How to concatenate (join, merge) media files 

create mylist.txt of file

ffmpeg -f concat -i mylist.txt -c copy out.mp4
ffmpeg -i out.mp4 -acodec copy [-vcodec libx264] [-s hd720] final.mp4
ffmpeg -i a1.m4a -i a2.m4a -i a3.m4a -filter_complex concat=n=3:v=0:a=1 -vn -y final.m4a

AVANTI - FFMPEG / AviSynth GUI
XMedia Recode 

  
Format Factory conversion between formats

Avidemux video editor
XviD4PSP guide
Handbrake: DVD to AppleTV, iPhone 480x..., iPod 640x...
Videora: DVD, flv, ... to ipod ...x320, ...x480
SUPER: flv, ... to mp4 avc h264, 640x480, many A/V bitrates
MeGui
AutoMKV

iPod 5G 2.5" QVGA 320x240
iPod classic 6G 2.5" QVGA 320x240
iPod nano 3G 2" QVGA 320x240
iPod touch 480x320

H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second, Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
H.264 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Baseline Profile up to Level 3.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats

iPod video guide
# 1 reference frame
# Up to H.264 level 3
# 640 pixels maximum frame width

Video Encoding Redux.

No comments: