Tach Team,
Über die 500 KBit/sec Initiativen für HD Material im Netz, ausgelößt durch den neuen Flash Player von Adobe, , bin ich ein wenig am herumspielen, was man mit h264 für SD Material so machen kann.
500Kbit HD Links :
--> http://www.progettosinergia.co…hvideo/flashvideoblog.htm
--> http://www.flashcomguru.com/index.cfm/2008/2/2/jaw-drop-h264
Ich habe für Testzwecke ein paar Commandlines zusammengelegt, die ein 400 KBit/sec ( Video ) mit aac als mp4 erzeugen.
Originale Bildbreite bleibt dabei erhalten. Dienen soll das Ganze erstmal als Spielwiese, um die optimalen Encoding Parameter zu ermitteln, daher hier auch erstmal eine Studie.
kurzes Beispiel mp4 hier :
--> http://uploaded.to/?id=uh416m
- 10 Minuten
- 720x416
- 400 Kbit Video ( 28,6Mbyte ) ,
- 86Kbit Audio ( 6 Mbyte )
- zusammen --> 37,4 MByte)
Full Length Beispiel mit selben Codec Parametern :
--> http://uploaded.to/?id=hcm53v
- 41min 11 sec
- 720x416
- 400 Kbit Video : 117,8 Mbyte
- 86Kbit Audio : 24,7 Mbyte
- zusammen 153,6 Mbyte
Die Rechte am Bildmaterial liegen beim jeweiligen Urheber, die Files werden hier nur zur technischen Demonstration verwendet.
gebraucht wird :
- transcode
- x264
- faac
- mp4creator aus mpeg4ip
fest codierte Bedingungen :
- Ausgangsmaterial noninterlaced, 720x576 @16:9, mpg
- Codierbereich 1-15000 Frames ( 10 min )
Aufruf :
aktuelles Verzeichnis beschreibbar ( für tmp dateien )
Infile --> mpg mit voller Pfadangabe
Outfile --> Endung .mp4 mit voller Pfadangabe
Code transcode_2_h264.sh
#!/bin/bash
# Parameter
# $1 -> Inputfile : should be 16:9 non interlaced on pix format 720 x 576 , like Transmission Format DVB-S
# $2 -> Outfile : must end with .mp4 , otherwise there are problems with the binary mp4creator
## neddet binarys
# transcode
# x264 ( the pure encoder )
# faac
# mp4creator from mpg4ip
echo "Design study for transcoding vdr to mp4 on ultra low video bitrates from alex Richter last edit 2008-06-01"
echo "transcode to h264 mp4 with transcode and piped x264, also transcode Audio from mpg to aac for mp4
"
## feel free to edit the coder settings
bitrate="400"
threads="4"
count="1-15000"
rm ./out_mp4creator.mp4
rm test.y4m
mkfifo -m 660 test.y4m && \
transcode -i $1 -u 1024 -k -y yuv4mpeg -B 10,0,16 -c $count -o ./test.y4m & \
x264 --level 3.1 --b-pyramid --no-psnr --sar 16:9 --qcomp 0.71 -r 4 --bime --weightb --partitions "p8x8,b8x8,i4x4,i8x8" --8x8dct -b 4 --trellis 2 --me umh --subme 1 --ratetol 3.0 --mixed-refs --threads auto --direct auto -B $bitrate --pass 1 -o /dev/null test.y4m 720x416
# ~ 52 fps on 4 threads
transcode -i $1 -u 1024 -k -y yuv4mpeg -B 10,0,16 -c $count -o ./test.y4m & \
x264 --level 3.1 --b-pyramid --no-psnr --sar 16:9 --qcomp 0.71 -r 4 --bime --weightb --partitions "p8x8,b8x8,i4x4,i8x8" --8x8dct -b 4 --trellis 2 --me umh --subme 7 --ratetol 3.0 --mixed-refs --threads auto --direct auto -B $bitrate --pass 2 -o out.264 test.y4m 720x416 && \
# ~ 23 fps on 4 threads
rm test.y4m
rm x264_2pass.log
rm test.wav
mkfifo -m 660 test.wav && \
transcode -i $1 -x vob -y null,wav -u 1024 -c $count -s 0.9 -J normalize -g 0x0 -a 0 -O -o test.wav &\
nice -10 faac -q 50 -c 14000 --mpeg-vers 4 -o out.aac test.wav
# ~ 384 fps
rm test.wav
mp4creator -create=out.264 -rate 25 $2 && echo "h264 done"
mp4creator -create=out.aac $2 && echo "aac done"
mp4creator -hint=1 $2
mp4creator -hint=2 $2
mp4creator -optimize $2
mp4creator -list $2
Alles anzeigen
Bin gespannt, was bei euch so rauskommt, vielleicht wirds ja mal ein Script vdr -> mp4 ( SD ), der 300 Mbyte Spielfilm rückt in greifbare Nähe
PS : Multipprozessor Maschine von Vorteil um die Frame/sec zu erreichen :
hier Phenom 4 x 2,2 Ghz -> pass 1 / 52fps -> pass 2 / 23 fps
Grüße vom Alex