keine ideen?
Script: Video einfach für iPod konvertieren - läuft
-
awolf -
July 14, 2006 at 6:05 PM -
Closed
-
-
-
debian way:
apt-get install screenfür alle anderen distris einfach schaun woher ihr das paket/die quellen kriegt
-
Um die Sache mal etwas weiterzuspinnen:
Die iTunes-RSS-Sache könnte man doch als Erweiterung von XXV bauen - ich stelle mir das so vor, daß bei Erstellen eines Timers auch noch eine Option "iPod-Konvertierung" steht, mit den Unterpunkten:
-sofort nach Aufnahme
-nach SchnittEbenso könnte man bei Autotimern vorgehen. Dann hätte man nach Schnitt am VDR automatisch kurz darauf die konvertierte Version.
Weitere Anregung: 320x240 sind ja nicht alles, was der iPod kann. Er kann mittlerweile h.264 bei 640x480x30 fps.
Leider habe ich den iPod video meiner Freundin lange nicht mehr in die Finger gekriegt, aber ich habe schon einiges experimentiert:
Auch vor der h.264 Erweiterung konnte der iPod MPEG-4 in laut Apple 480x480x30 fps abspielen.Bringt nicht viel, möchte man meinen.
Aber: 480x480=230400 - und alle Formate mit nicht mehr Pixeln und Kantenlängen, die sich durch 16 teilen lassen, gehen.Beispielsweise 704*320.
Nicht probiert habe ich, ob durch die PAL-Framerate mehr Pixel möglich sind.
Auf meinem Mac kodiere ich zum Auf-dem-Computer-sehen mittlerweile anamorphes h.264 ohne Scaling. Damit kann man prima TV konservieren, und es sieht auch bei 700 kbps noch passabel aus.
Falls der iPod nun anamorph spielt, was ich noch nicht testen konnte... wäre es nicht am besten, nur horizontal zu scalen? Unter der Hypothese, dass durch PAL-Framerate die nutzbare vertikale Auflösung steigt:
480*30/25 = 576 (huch, das paßt ja für PAL )
hätte man 640*576 Pixel zur Verfügung Man müsste also kaum horizontal scalen.
Kann das mal jemand testen? Videoschnipsel in der Auflösung liefer ich gern.
Gruß,
Mirko
-
...mal zur Verdeutlichung, wovon ich rede: Man kann ja die Anzeigeauflösung getrennt von der Encoding-Auflösung definieren - ich habe ganz einfach mal ein kurzes Stück Video in drei Auflösungen nach h.264 konvertiert.
1) 640x480 -> sollte der iPod auf jeden Fall können
2) 480x576 -> hier bleiben wir locker innerhalb der nutzbaren Pixelzahl
3) 640x576 -> hier gehen wir an die Grenze des theoretisch machbaren
Alle drei habe ich mit Quicktime Pro auf Anzeigeauflösung 640x480 gepatcht.Quicktime, VLC, mplayer spielen's bei mir alle in 4:3 ab. Mich interessiert nun, was der iPod draus macht.
Falls sich jemand mit iPod video berufen fühlt, bitte ich um eine PN
-
mein IPod video hat Firmware 1.2 und ist Modell MA146FD
laut gtkpod ist er damit fifth generation; wo genau die unterschiede der halbjährigen updates auf die sixth generation (xA446) liegen weiß ich nicht
meiner mag aber anscheinend nur MP4/AVC(H.264) bis 768kb/s
(H.264 video, up to 768 Kbps, 320 by 240 pixels, 30 frames per sec., Baseline Profile up to Level 1.3 ohne b-frames blablabla)
vorbei die guten alten MPEG-2 Zeiten wo man noch wußte was drin ist
MPEG-4 "standard profile" spielt er auch mit 640x480 und höherer bitrate
mich würde mal interessieren wie sich die verschiedenen MP4-codecs auf den accu auswirken? -
OK,
ich habe mal ein kleines Windows Programm geschrieben, das das video verzeichniss vom VDR überwachen kann, und alle neuen Recordings als Ferndsehsendung an das iTunes überspielt / konvertiert.
Ein linux script wäre besser, aber da bin ich voller dummy.
Das ist nur so ein schneller Hack, aber vieleicht möchte es mal jemand ausprobieren.
http://betoncam.be.funpic.de/VDR2Itunes.zip
By
-
Das ist echt seltsam, da lt Apple alle 5G iPods - also alle videofähigen - zumindest 640*480 bei bis zu 1.5 MBit spielen sollten. Irgendwas seltsames ist da noch am Laufen - zumal wir ja seltsamerweise gestern die 480*576 Version zum laufen bekommen haben...
Gruß,
Mirko -
Hi,
ich habe jetzt mal mit dem VDR2iTunes beim ffmpeg 640x480 eingestellt. Der Test landet auf dem iPod und wird auch ohne Probleme abgespielt. Also an der Auflösung alleine scheints nicht zu liegen. Als vcodec hatte ich xvid eingestellt. Ich werds nochmal mit h264 probieren.
So jetzt hab ich mal weiter probiert.
Also h264 Dateien kommen vom iTunes nicht auf meinen iPod. Ich hab dann mal mit den MPEG4 Dateien weiter getestet.
640x480 geht gut, sogar bis zu einer Bitrate von 1800. Ich hab zum Spass mal 2800 probiert, aber dort wird die Datei wieder nicht vom iTunes zum iPod übertragen.
480x576 wird zwar zum iPod übertragen, aber der spielt die Datei nicht richtig ab. (Das Bild bleibt einfach schwarz.)
640x576 wird nicht zum iPod übertragen.Ich verwende itunes 7.0.2 und iPod 1.2.1
By
-
stocki
Also, ich habe dein vdr2itunes auch mal ausprobiert.
Es funktioniert ganz hervorragend!
Schon mit deiner Standardeinstellung erzeugt das Tool sehr gute Qualität bei weniger als 1/4 der ursprünglichen Dateigröße.
Die Auflösung ist mit 320x240 genau richtig für meinen MDA pro (Pocket PC). Obwohl dieser ein VGA-Display hat, sind die Videos mit dem Core-Player (TCPMP) aufgezoomt eigentlich nicht von 640x480-Videos zu unterscheiden. AAC-Audio muss aber separat als Plugin dazu installiert werden, weil TCPMP von Haus aus kein AAC mitbringt. Die Videos bleiben anderenfalls stumm.Nun, eine Frage habe ich dann noch:
Kannst du den Namen der generierten Datei aus dem ursprünglichen Namen unter VDR herleiten (also Verzeichnisname und ggf. Datum der Aufnahme)?
Die Dateinamen im Format vdr2itunesxxxxxx.xxxxxxxxxx.m4v sind doch allzu wenig aussagekräftig.Danke für das tolle Tool!
-
Es wurde ja doch schon mehrfach (z.B. auch von mir oben in diesem Thread) angeregt, die verschiedenen Konverteraufrufe für ffmpeg etc. zur MP4-Erstellung zu sammeln (200000 Augen und Abspielgeräte sehen einfach mehr ;)) - nachdem nun sowohl Video-iPods etc. als auch Divx/Xvid/MP4-fähige DVD-Player handelsüblich geworden sind, möchte ich das hiermit nochmals aufgreifen - gerade um Serien/Magazinformate besser (und "portabler" für Zugfahrten usw.) archivieren zu können:
VdrAufn. mit transcode zu divx ?
Ich bin wohl zu blöd um vdr umzuwandeln
Xvid? DivX? Mpeg4? Zeigt her eure Command-Lines!
http://wiki.tuxbox.org/TS-Datei_in_MPEG4-Format_umwandelnIn diesem Thread sind nun ja schon einige grob umschriebene Formate angesprochen worden - wenn wir doch (auch aus Windows-Tools - vdr2itunes stürzt hier allerdings gleich nach dem Aufruf ab) ohnehin jeweils ffmpeg aufrufen, sollten wir daher die jeweils die genauen Parameter nennen, um Vergleiche und weitere Optimierungen zu ermöglichen.
Ich mache also mal den Anfang mit einem Vorschlag für DVD-Player; Testsequenz ist eine "Episode" c't-magazin-TV (da mit 30 Minuten recht kurz und überall mehrfach pro Woche frei und unverschlüsselt greifbar):
- Eingangssequenz mit viel Rauch, Bewegung, Schnitt mit wilden Kameraschwenks um zappeligen Moderator etc.
- ffmpeg version CVS, build 3342336 (aus aktuellem Gen2VDR 1.1)
- Tatsächlich erreichte Zielgröße (5% über Vorgabe, also max. 2100 kbit/s): ca. 58% ohne sich dem Betrachter aufdrängende Verluste
- Konvertierungszeit: entspricht auf Intel Pentium 3 mit 1400MHz (Activy 300 im Vollausbau) fast auf die Sekunde der Spielzeit
- Testsysteme für Wiedergabe: VLC 0.85, mplayer als VDR-Plugin, sowie Medion DVD 7000 und 8000
Codeffmpeg -i 001.vdr -vcodec mpeg4 -b 2000 -s 540x432 -acodec mp3 -ac 2 -ab 96 -f mp4 "20060128.m4v"
Das ist noch nicht der Weisheit letzter Schluss: Ausgerechnet im MPlayer-Plugin des VDR "blubbert" hiermit der Ton (habe mir den Code noch nicht näher angesehen - verwendet es einfach den jeweils installierten MPlayer, hier z.B. 1.0pre7try2-3.3.4 ?), ebenso aber auch bei der nächsten Variante:
Codeffmpeg -i 001.vdr -vcodec mpeg4 -b 1600 -s 480x384 -acodec mp3 -ac 2 -ab 128 -f mp4 "20060128.m4v"
Das scheint einigermaßen zu funktionieren, läuft aber auch auf etwa 1730kBit/s hoch.
Ohne Tonstörungen auch im VDR-mplayer-Plugin geht es mit AAC, das dann auch die iPods, aber vielleicht nicht alle Divx/Xvid/MP4-fähigen Standalone-DVD-Player abspielen können sollten:
Codeffmpeg -i 001.vdr -vcodec mpeg4 -b 1600 -s 480x384 -acodec aac -ac 2 -ab 128 -f mp4 "20060128.m4v"
Einige Artefakte sind allerdings vor allem bei Bewegung schräger/runder Objektkanten gelegentlich doch deutlich sichtbar.
Gesucht: Alles, was schneller läuft, ein besseres Verhältnis von Qualität und Bitrate bietet - und dabei zu möglichst vielen Geräten kompatibel bleibt.
Besonders interessant wären natürlich Aufrufe, die es ermöglichen, die Originalauflösung (720*576 Pixel) beibehalten zu können und dennoch die Dateigröße gegenüber MP2 (.vdr/.ts) erheblich zu reduzieren.
Das "Forschungsgebiet" scheint schon deswegen lohnend, weil automatische Divx-Erstellung (Xvid, MP4 etc.) durchaus eine "Killerapplikation" für VDR-Systeme gegenüber DVD-Recordern und MCE-Windosen darstellen kann - und da der Plattenplatz sowieso immer zu knapp wird...
P.S.: vdr2itunes verwendet standardmäßig wohl, wie seine INI-Datei verrät (offenbar für eine andere ffmpeg-Version):
-
Hier mal die Parameter der von stocki empfohlenen ffmpeg-Version, die bei dem Videora iPod Converter mitgeliefert wird:
Code
Display Moreffmpeg version CVS, build 4759, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-mp3lame --enable-faac --enable-faad --enable-amr_nb - -enable-amr_wb --disable-ffplay --enable-small --enable-memalign-hack --enable-g pl --enable-xvid --enable-dts --enable-a52 --disable-vhook --enable-pthread --en able-x264 built on Nov 7 2005 09:41:59, gcc: 3.4.4 (cygming special) (gdc 0.12, using d md 0.125) usage: ffmpeg [[infile options] -i infile]... {[outfile options] outfile}... Hyper fast Audio and Video encoder Main options: -L show license -h show help -version show version -formats show available formats, codecs, protocols, ... -f fmt force format -img img_fmt force image format -i filename input file name -y overwrite output files -t duration set the recording time -fs limit_size set the limit file size -ss time_off set the start time offset -itsoffset time_off set the input ts offset -title string set the title -timestamp time set the timestamp -author string set the author -copyright string set the copyright -comment string set the comment -v verbose control amount of logging -target type specify target file type ("vcd", "svcd", "dvd", "dv", "pal-v cd", "ntsc-svcd", ...) -dframes number set the number of data frames to record -hq activate high quality settings -scodec codec force subtitle codec ('copy' to copy stream) -newsubtitle add a new subtitle stream to the current output stream -slang code set the ISO 639 language code (3 letters) of the current sub title stream Video options: -b bitrate set video bitrate (in kbit/s) -vframes number set the number of video frames to record -r rate set frame rate (Hz value, fraction or abbreviation) -maxfr maxfrate set max frame rate (Hz value, fraction or abbreviation) -s size set frame size (WxH or abbreviation) -aspect aspect set aspect ratio (4:3, 16:9 or 1.3333, 1.7777) -fixaspect fix aspect ratio -croptop size set top crop band size (in pixels) -cropbottom size set bottom crop band size (in pixels) -cropleft size set left crop band size (in pixels) -cropright size set right crop band size (in pixels) -padtop size set top pad band size (in pixels) -padbottom size set bottom pad band size (in pixels) -padleft size set left pad band size (in pixels) -padright size set right pad band size (in pixels) -padcolor color set color of pad bands (Hex 000000 thru FFFFFF) -vn disable video -bt tolerance set video bitrate tolerance (in kbit/s) -maxrate bitrate set max video bitrate tolerance (in kbit/s) -minrate bitrate set min video bitrate tolerance (in kbit/s) -bufsize size set ratecontrol buffer size (in kByte) -vcodec codec force video codec ('copy' to copy stream) -sameq use same video quality as source (implies VBR) -pass n select the pass number (1 or 2) -passlogfile file select two pass log file name -newvideo add a new video stream to the current output stream Advanced Video options: -pix_fmt format set pixel format -g gop_size set the group of picture size -intra use only intra frames -vdt n discard threshold -qscale q use fixed video quantiser scale (VBR) -qmin q min video quantiser scale (VBR) -qmax q max video quantiser scale (VBR) -lmin lambda min video lagrange factor (VBR) -lmax lambda max video lagrange factor (VBR) -mblmin q min macroblock quantiser scale (VBR) -mblmax q max macroblock quantiser scale (VBR) -qdiff q max difference between the quantiser scale (VBR) -qblur blur video quantiser scale blur (VBR) -qsquish squish how to keep quantiser between qmin and qmax (0 = clip, 1 = u se differentiable function) -qcomp compression video quantiser scale compression (VBR) -rc_init_cplx complexity initial complexity for 1-pass encoding -b_qfactor factor qp factor between p and b frames -i_qfactor factor qp factor between p and i frames -b_qoffset offset qp offset between p and b frames -i_qoffset offset qp offset between p and i frames -ibias bias intra quant bias -pbias bias inter quant bias -rc_eq equation set rate control equation -rc_override override rate control override for specific intervals -me method set motion estimation method -dct_algo algo set dct algo -idct_algo algo set idct algo -me_threshold motion estimaton threshold -mb_threshold macroblock threshold -er n set error resilience -ec bit_mask set error concealment -bf frames use 'frames' B frames -mbd mode macroblock decision -mbcmp cmp function macroblock compare function -ildctcmp cmp function ildct compare function -subcmp cmp function subpel compare function -cmp cmp function fullpel compare function -precmp cmp function pre motion estimation compare function -preme pre motion estimation -lelim elim single coefficient elimination threshold for luminance (nega tive values also consider DC coefficient) -celim elim single coefficient elimination threshold for chrominance (ne gative values also consider DC coefficient) -lumi_mask luminance masking -dark_mask darkness masking -scplx_mask spatial complexity masking -tcplx_mask temporal complexity masking -p_mask inter masking -4mv use four motion vector by macroblock (MPEG4) -obmc use overlapped block motion compensation (h263+) -lf use loop filter (h263+) -part use data partitioning (MPEG4) -bug param workaround not auto detected encoder bugs -strict strictness how strictly to follow the standards -deinterlace deinterlace pictures -ildct force interlaced dct support in encoder (MPEG2/MPEG4) -ilme force interlaced me support in encoder (MPEG2/MPEG4) -psnr calculate PSNR of compressed frames -vstats dump video coding statistics to file -vhook module insert video processing module -aic enable Advanced intra coding (h263+) -aiv enable Alternative inter vlc (h263+) -umv enable Unlimited Motion Vector (h263+) -ssm enable Slice Structured mode (h263+) -alt enable alternate scantable (MPEG2/MPEG4) -qprd -cbp -trell enable trellis quantization -mv0 try to encode each MB with MV=<0,0> and choose the better on e (has no effect if mbd=0) -naq normalize adaptive quantization -cgop closed gop -sgop strict gop -noout skip bitstream encoding -scan_offset enable SVCD Scan Offset placeholder -qpel enable 1/4-pel -intra_matrix matrix specify intra matrix coeffs -inter_matrix matrix specify inter matrix coeffs -top top=1/bottom=0/auto=-1 field first -nr noise reduction -qns quantization noise shaping -sc_threshold threshold scene change threshold -me_range range limit motion vectors range (1023 for DivX player) -dc precision intra_dc_precision -coder coder type -context context model -pred prediction method -vprofile profile -vlevel level -nssew weight -subq -mepc factor (1.0 = 256) motion estimation bitrate penalty compensation -lowres -vtag fourcc/tag force video tag/fourcc -skip_threshold threshold frame skip threshold -skip_factor factor frame skip factor -skip_exp exponent frame skip exponent -skip_cmp compare function frame skip compare function -gray encode/decode grayscale Audio options: -aframes number set the number of audio frames to record -ab bitrate set audio bitrate (in kbit/s) -ar rate set audio sampling rate (in Hz) -ac channels set number of audio channels -an disable audio -acodec codec force audio codec ('copy' to copy stream) -vol volume change audio volume (256=normal) -newaudio add a new audio stream to the current output stream -alang code set the ISO 639 language code (3 letters) of the current aud io stream Advanced Audio options: -atag fourcc/tag force audio tag/fourcc Subtitle options: -scodec codec force subtitle codec ('copy' to copy stream) -newsubtitle add a new subtitle stream to the current output stream -slang code set the ISO 639 language code (3 letters) of the current sub title stream Audio/Video grab options: -vd device set video grab device -vc channel set video grab channel (DV1394 only) -tvstd standard set television standard (NTSC, PAL (SECAM)) -ad device set audio device -grab format request grabbing using -gd device set grab device Advanced options: -map file:stream[:syncfile:syncstream] set input stream mapping -map_meta_data outfile:infile set meta data information of outfile from infile -debug print specific debug info -vismv visualize motion vectors -benchmark add timings for benchmarking -dump dump each input packet -hex when dumping packets, also dump the payload -bitexact only use bit exact algorithms (for codec testing) -re read input at native frame rate -loop loop (current only works with images) -loop_output number of times to loop output in formats that support loopi ng (0 loops forever) -threads count thread count -vsync video sync method -async audio sync method -vglobal video global header storage type -copyts copy timestamps -shortest finish encoding within shortest input -b_strategy strategy dynamic b frame selection strategy -ps size set packet size in bits -error rate error rate -muxrate rate set mux rate -packetsize size set packet size -muxdelay seconds set the maximum demux-decode delay -muxpreload seconds set the initial demux-decode delay -muxab bitrate set the audio bitrate in mux tag (in kbit/s) -muxvb bitrate set the video bitrate in mux tag (in kbit/s)
-
Beispiele:
2 Pass:
ffmpeg -f mpeg -y -i 001.vdr -vcodec h264 -pass 1 -me full -refs 3 -subq 5 -b 700 -rc_max_rate 768 -rc_buffer_size 244 -s 320x240 -r 25 -ac 1 -max_b_frames 0 -level 13 -f h264 /dev/null && ffmpeg -f mpeg -y -i 001.vdr -vcodec h264 -pass 2 -me full -refs 3 -subq 5 -b 700 -rc_max_rate 768 -rc_buffer_size 244 -s 320x240 -r 25 -ac 1 -max_b_frames 0 -level 13 -acodec aac -ar 48000 -ab 160 -ac 2 Oliver.mp4Good Single:
ffmpeg -f mpeg -i 001.vdr -v 1 -vcodec h264 -crf 19 -refs 5 -loop 1 -deblockalpha 0 -deblockbeta 0 -parti4x4 1 -partp8x8 1 -partb8x8 1 -me umh -subq 6 -brdo 1 -me_range 21 -chroma 1 -threads 2 -slice 2 -bf 1 -bframebias 1 -b_strategy 1 -g 250 -keyint_min 25 -sc_threshold 40 -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.60 -qmin 7 -qmax 35 -max_qdiff 4 -i_quant_factor 0.71428572 -b_quant_factor 0.76923078 -rc_max_rate 0 -rc_buffer_size 0 -aspect 4:3 -s 320x240 -r 25 -acodec aac -ab 96 -ar 48000 -ac 2 OUTPUTFILE1.mp4# The most important ones for iPod compatibility are
# "-max_b_frames 0 -level 13 -rc_max_rate 768".
# The most important one for high quality is "-loop 1" which
# (contrary to the ffmpeg man page) activates the in-loop deblocker.
# Most of the rest I cribbed from
# http://lists.mplayerhq.hu/pipermail/ffmp…rch/008997.html -
-refs und -vcodec h264 kennen nun aber auch nicht alle Versionen.
Für welches ffmpeg mit welchen Optionen kompiliert und ggf. zusätzlich installierten Komponenten ist dieser Aufruf gedacht?
Wenn es sich per emerge oder z.B. als (source-)tarball irgendwo komplett herunterladen lässt, natürlich um so besser... -
root@vdr2:~# dpkg -l ffmpeg
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Säubern/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/Fehlgeschl. Konf./Halb install.
|/ Fehler?=(kein)/Halten/R=Neuinst notw/X=beide (Status, Fehler: GROSS=schlecht)
||/ Name Version Beschreibung
+++-================================-================================-================================================================================
ii ffmpeg 20060430-0.0 audio/video encoder, streaming server & audio/video file converter
root@vdr2:~# ffmpeg
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --prefix=/usr --libdir=${prefix}/lib --incdir=${prefix}/include/ffmpeg --enable-shared --enable-mp3lame --enable-gpl --enable-faad --mandir=${prefix}/share/man --enable-vorbis --enable-pthreads --enable-faac --enable-xvid --enable-dts --enable-amr_nb --enable-amr_wb --enable-pp --enable-libogg --enable-a52 --enable-theora --enable-libgsm --enable-x264 --enable-a52bin
libavutil version: 49.0.0
libavcodec version: 51.9.0
libavformat version: 50.4.0
built on Apr 30 2006 12:53:40, gcc: 4.0.4 20060422 (prerelease) (Debian 4.0.3-2)
root@vdr2:~# -
Quote
libavutil version: 49.0.0
libavcodec version: 51.9.0
libavformat version: 50.4.0Wo kann man die Pakete im Source herunterladen?
Mit google finde ich nichts passendes, hat jemand einen Link für mich?
Gruß,
gromit -
-
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!