Σταθεροποίηση εικόνας βίντεο

...το μέρος για να ξεκινήσετε!

Συντονιστής: adem1

Κανόνες Δ. Συζήτησης
Παρακαλώ να επιλέξετε, με προσοχή, την άδεια που θέλετε να έχουν οι οδηγοί που συγγράφετε.
Πληροφορίες για τις άδειες μπορείτε να βρείτε εδώ.
Άμα επιθυμείτε κάποια άλλη άδεια επικοινωνήστε με κάποιο Διαχειριστή είτε Συντονιστή.

Σημαντικό είναι να χρησιμοποιήσετε την υπηρεσία http://imagebin.ubuntu-gr.org για τις εικόνες.

Σταθεροποίηση εικόνας βίντεο

Δημοσίευσηαπό the_eye » 23 Φεβ 2012, 01:56

Πολλά βίντεο που γράφουμε με κάμερα χειρός έχουν κούνημα από το χέρι μας και αυτό κάνει δυσάρεστη την αναπαραγωγή.

Υπάρχει ένα πρόγραμμα το οποίο βελτιώνει το βίντεο σε πάρα πολύ καλό βαθμό.



Εγκαθιστάτε το transcode
Κώδικας: Επιλογή όλων
sudo apt-get install transcode


κατεβάζετε από εδώ
http://public.hronopik.de/vid.stab/download.php?lang=en
το video stabilization plugin

πχ για 32bit
http://public.hronopik.de/vid.stab/file ... y-i386.tgz

Αποσυμπιέζετε το αρχείο και τρέχετε στον φάκελο του
Κώδικας: Επιλογή όλων
sudo ./install.sh


Αυτό θα εγκαταστήσει το stabilization plugin στο transcode

Μετά εκτελούμε τις παρακάτω 2 εντολές για να διορθώσουμε το video.
Η πρώτη θα βρει το "κούνημα" του βίντεο και η δεύτερη θα το διορθώσει και θα το επανακωδικοποιήσει.

Κώδικας: Επιλογή όλων
transcode -J stabilize -i MOVIE -y null,null -o dummy
transcode -J transform -i MOVIE OUTPUTOPTIONS -o STABILE


MOVIE: το αρχικό βίντεο
STABILE: το τελικό βίντεο
OUTPUTOPTIONS: επιλογές για το τελικό βίντεο πχ -y ffmpeg,null -F mpeg2video ή -y xvid


Περισσότερα εδώ
http://public.hronopik.de/vid.stab/features.php?lang=en
Όσο λιγότερο κλειστό λογισμικό έχεις, τόσα λιγότερα προβλήματα.
1 Γνώσεις ⇛ Linux: Καλό ┃ Προγραμματισμός: Ναι PHP, MySQL ┃ Αγγλικά: Καλά
2 Ubuntu 22.04 Jammy Jellyfish 5.15.0-58-generic 64bit (el_GR.UTF-8, ubuntu:GNOME ubuntu)
3 Intel Core i3-6100 CPU @ 3.70GHz ‖ RAM 7836 MiB ‖ Gigabyte B150M-HD3 DDR3-CF - Gigabyte B150M-HD3 DDR3
4 Intel HD Graphics 530 [8086:1912] {i915}
5 enp1s0: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
Οδηγοί Ubuntu Βίντεο Οδηγοί
Άβαταρ μέλους
the_eye
Διαχειριστής
Διαχειριστής
 
Δημοσιεύσεις: 11671
Εγγραφή: 16 Μαρ 2010, 17:19
Launchpad: ntoulasd
IRC: the_eye_
Εκτύπωση

Re: Σταθεροποίηση εικόνας βίντεο

Δημοσίευσηαπό simosx » 25 Φεβ 2012, 16:02

Πολύ καλό και χρήσιμο! Είναι ωραίο που εντοπίζει αυτόματα το αντικείμενο ενδιαφέροντος στο βίντεο ώστε να σταθεροποιήσει προς αυτό.
προσωπικό ιστολόγιο ϗ πλανήτης Ubuntu-gr
Συμβάλετε και εσείς στο ελληνικό βιβλίο Ubuntu!
1 Γνώσεις Linux: Πολύ καλό ┃ Προγραμματισμού: Πολύ καλό ┃ Αγγλικών: Πολύ καλό
2 Ubuntu 13.10 saucy 3.11.0-031100rc1-generic 64bit (el_GR.UTF-8, Unity ubuntu)
3 AMD E-450 APU with Radeon HD Graphics ‖ RAM 3555 MiB ‖ Sony Corporation VAIO
4 AMD nee ATI Wrestler [Radeon HD 6320] [1002:9806] {fglrx_pci}
5 eth0: Atheros Inc. AR8151 v2.0 Gigabit Ethernet [1969:1083] (rev c0) ⋮ wlan0: Atheros Inc. AR9285 [168c:002b] (rev 01)
Φτιάξτε και εσείς τη δική σας υπογραφή (παραπάνω κείμενο) αυτόματα με κλικ εδώ!
simosx
Επίτιμο μέλος
Επίτιμο μέλος
 
Δημοσιεύσεις: 10334
Εγγραφή: 11 Μάιος 2008, 18:52
Launchpad: simosx
IRC: simosx
Εκτύπωση

Re: Σταθεροποίηση εικόνας βίντεο

Δημοσίευσηαπό Learner » 26 Φεβ 2012, 00:24

Επειδή το εργαλείο είναι καλό - χρήσιμο , και θέλω να το κάνω να δουλέψει παραθέτω τα παρακάτω.

Βρισκόμαστε σε έκδοση 10.04 . Το transcode εγκαταστάθηκε σωστά .
Τα plugins προστέθηκαν .
Spoiler: show
Κώδικας: Επιλογή όλων
sudo ./install.sh
Do you want to install the plugins to /usr/lib/transcode ? [y/N] y
Copy files... `./filter_stabilize.so' -> `/usr/lib/transcode/filter_stabilize.so' (backup: `/usr/lib/transcode/filter_stabilize.so.~1~')
`./filter_transform.so' -> `/usr/lib/transcode/filter_transform.so' (backup: `/usr/lib/transcode/filter_transform.so.~1~')
`./filter_deshake.so' -> `/usr/lib/transcode/filter_deshake.so'


Υπάρχει ένα αρχείο βίντεο , ανεπεξέργαστο , όπως βγήκε από την κάμερα. Είναι σε μορφή AVI , διάρκειας 10 δευτερόλεπτα και μέγεθος 38.1MB.
Δίνοντας την εντολή
Κώδικας: Επιλογή όλων
transcode -J stabilize -i P2250041.AVI -y null,null -o dummy
παίρνω το παρακάτω
Spoiler: show
Κώδικας: Επιλογή όλων
transcode v1.1.5 (C) 2001-2003 Thomas Oestreich, 2003-2009 Transcode Team
libdvdread: Encrypted DVD support unavailable.
************************************************
**                                            **
**  No css library available. See             **
**  /usr/share/doc/libdvdread4/README.Debian  **
**  for more information.                     **
**                                            **
************************************************
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdread: Encrypted DVD support unavailable.
************************************************
**                                            **
**  No css library available. See             **
**  /usr/share/doc/libdvdread4/README.Debian  **
**  for more information.                     **
**                                            **
************************************************
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
[transcode] V: auto-probing     | P2250041.AVI (OK)
[transcode] V: import format    | MJPEG in RIFF data, AVI (module=ffmpeg)
[transcode] A: auto-probing     | P2250041.AVI (OK)
[transcode] A: import format    | AC3 in RIFF data, AVI (module=null)
[transcode] V: AV demux/sync    | (1) sync AV at initial MPEG sequence
[transcode] V: import frame     | 1280x720  1.78:1  encoded @ 16:9
[transcode] V: bits/pixel       | 0.065 (low)
[transcode] V: decoding fps,frc | 30.000,5
[transcode] V: video format     | YUV420 (4:2:0) aka I420
[transcode] A: import           | disabled
[transcode] A: export           | disabled
[transcode] V: encoding fps,frc | 30.000,5
[transcode] A: bytes per frame  | 0 (0.000000)
[transcode] A: adjustment       | 0@1000
[transcode] V: IA32/AMD64 accel | sse3 sse2 sse 3dnowext 3dnow mmxext mmx cmove asm
[transcode] V: video buffer     | 10 @ 1280x720 [0x2]
[transcode] A: audio buffer     | 10 @ 0x0x16
[import_null.so] v0.2.0 (2002-01-19) (video) null | (audio) null
[import_ffmpeg.so] v0.1.15 (2008-01-28) (video) ffmpeg: MS MPEG4v1-3/MPEG4/MJPEG
[filter_stabilize.so] v0.93 (2011-11-09) extracts relative transformations of
    subsequent frames (used for stabilization together with the
    transform filter in a second pass)
[filter_stabilize.so] Fieldsize: 96, Maximal translation: 90 pixel
[filter_stabilize.so] Number of used measurement fields: 13 out of 40
[filter_stabilize.so] Image Stabilization Settings:
[filter_stabilize.so]      shakiness = 5
[filter_stabilize.so]       accuracy = 5
[filter_stabilize.so]       stepsize = 6
[filter_stabilize.so]           algo = 1
[filter_stabilize.so]    mincontrast = 0.250000
[filter_stabilize.so]           show = 0
[filter_stabilize.so]         result = P2250041.AVI.trf
[export_null.so] v0.1.2 (2001-08-17) (video) null | (audio) null
[import_ffmpeg.so] input is mjpeg, reducing range from YUVJ420P to YUV420P
[filter_levels.so] instance #2
[filter_levels.so] v1.2.0 (2007-06-07) Luminosity level scaler
[filter_levels.so] scaling 0-255 gamma 1.000000 to 16-240 (pre-process)
Segmentation fault

Παρόλο το Segmentation fault το αρχείο P2250041.AVI.trf δημιουργείται.
Δίνοντας την εντολή
Κώδικας: Επιλογή όλων
transcode -J transform -i P2250041.AVI.trf -y mpeg4 -o STABILE
το αποτέλεσμα είναι
Spoiler: show
Κώδικας: Επιλογή όλων
transcode v1.1.5 (C) 2001-2003 Thomas Oestreich, 2003-2009 Transcode Team
libdvdread: Encrypted DVD support unavailable.
************************************************
**                                            **
**  No css library available. See             **
**  /usr/share/doc/libdvdread4/README.Debian  **
**  for more information.                     **
**                                            **
************************************************
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
[fileinfo.c] warning: [fileinfo.c:125] file read error: Success
[probe_ffmpeg.c] critical: unable to open 'P2250041.AVI.trf' (libavformat failure)
[transcode] V: auto-probing     | P2250041.AVI.trf (FAILED)
[transcode] V: import format    | (null) in  (module=null)
[transcode] A: auto-probing     | P2250041.AVI.trf (FAILED)
[transcode] A: import format    | AC3 in  (module=null)
[transcode] V: AV demux/sync    | (1) sync AV at initial MPEG sequence
[transcode] V: import frame     | 720x576  1.25:1  encoded @ UNKNOWN
[transcode] V: bits/pixel       | 0.174
[transcode] V: decoding fps,frc | 25.000,0
[transcode] V: video format     | YUV420 (4:2:0) aka I420
[transcode] A: import format    | 0x2000  AC3          [48000,16,2]
[transcode] A: export format    | 0x55    MPEG ES Layer 3 [48000,16,2]  128 kbps
[transcode] V: export format    | unknown (module dependant)
[transcode] V: encoding fps,frc | 25.000,3
[transcode] A: bytes per frame  | 7680 (7680.000000)
[transcode] A: adjustment       | 0@1000
[transcode] V: IA32/AMD64 accel | sse3 sse2 sse 3dnowext 3dnow mmxext mmx cmove asm
[transcode] V: video buffer     | 10 @ 720x576 [0x2]
[transcode] A: audio buffer     | 10 @ 48000x2x16
[import_null.so] v0.2.0 (2002-01-19) (video) null | (audio) null
[filter_transform.so] v0.93 (2011-11-09) transforms each frame according to transformations
given in an input file (e.g. translation, rotate) see also filter stabilize
[filter_transform.so] critical: cannot open input file P2250041.AVI.trf.trf!

[filter_transform.so] Image Transformation/Stabilization Settings:
[filter_transform.so]     input     = P2250041.AVI.trf.trf
[filter_transform.so]     smoothing = 10
[filter_transform.so]     maxshift  = -1
[filter_transform.so]     maxangle  = -1.000000
[filter_transform.so]     crop      = Keep
[filter_transform.so]     relative  = True
[filter_transform.so]     invert    = False
[filter_transform.so]     zoom      = 0.000000
[filter_transform.so]     optzoom   = On
[filter_transform.so]     interpol  = Bi-Linear (2)
[filter_transform.so]     sharpen   = 0.800000
[filter_unsharp.so] unsharp: 5x5:0.80 (sharpen luma)
[filter_unsharp.so] unsharp: 5x5:0.40 (sharpen chroma)
[filter_unsharp.so] v1.0.1 (2003-10-27) unsharp mask & gaussian blur
[transcode] warning: /usr/lib/transcode/export_mpeg4.so: cannot open shared object file: No such file or directory
[transcode] warning: (dl_loader.c) loading "/usr/lib/transcode/export_mpeg4.so" failed
[encoder.c] warning: loading audio export module failed
[transcode] critical: failed to init export modules
[transcode] critical: plug-in initialization failed
. Το ίδιο και με την εντολή
Κώδικας: Επιλογή όλων
transcode -J transform -i P2250041.AVI.trf -y xvid -o STABILE
αποτέλεσμα
Spoiler: show
Κώδικας: Επιλογή όλων
transcode v1.1.5 (C) 2001-2003 Thomas Oestreich, 2003-2009 Transcode Team
libdvdread: Encrypted DVD support unavailable.
************************************************
**                                            **
**  No css library available. See             **
**  /usr/share/doc/libdvdread4/README.Debian  **
**  for more information.                     **
**                                            **
************************************************
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
[fileinfo.c] warning: [fileinfo.c:125] file read error: Success
[probe_ffmpeg.c] critical: unable to open 'P2250041.AVI.trf' (libavformat failure)
[transcode] V: auto-probing     | P2250041.AVI.trf (FAILED)
[transcode] V: import format    | (null) in  (module=null)
[transcode] A: auto-probing     | P2250041.AVI.trf (FAILED)
[transcode] A: import format    | AC3 in  (module=null)
[transcode] V: AV demux/sync    | (1) sync AV at initial MPEG sequence
[transcode] V: import frame     | 720x576  1.25:1  encoded @ UNKNOWN
[transcode] V: bits/pixel       | 0.174
[transcode] V: decoding fps,frc | 25.000,0
[transcode] V: video format     | YUV420 (4:2:0) aka I420
[transcode] A: import format    | 0x2000  AC3          [48000,16,2]
[transcode] A: export format    | 0x55    MPEG ES Layer 3 [48000,16,2]  128 kbps
[transcode] V: export format    | unknown (module dependant)
[transcode] V: encoding fps,frc | 25.000,3
[transcode] A: bytes per frame  | 7680 (7680.000000)
[transcode] A: adjustment       | 0@1000
[transcode] V: IA32/AMD64 accel | sse3 sse2 sse 3dnowext 3dnow mmxext mmx cmove asm
[transcode] V: video buffer     | 10 @ 720x576 [0x2]
[transcode] A: audio buffer     | 10 @ 48000x2x16
[import_null.so] v0.2.0 (2002-01-19) (video) null | (audio) null
[filter_transform.so] v0.93 (2011-11-09) transforms each frame according to transformations
given in an input file (e.g. translation, rotate) see also filter stabilize
[filter_transform.so] critical: cannot open input file P2250041.AVI.trf.trf!

[filter_transform.so] Image Transformation/Stabilization Settings:
[filter_transform.so]     input     = P2250041.AVI.trf.trf
[filter_transform.so]     smoothing = 10
[filter_transform.so]     maxshift  = -1
[filter_transform.so]     maxangle  = -1.000000
[filter_transform.so]     crop      = Keep
[filter_transform.so]     relative  = True
[filter_transform.so]     invert    = False
[filter_transform.so]     zoom      = 0.000000
[filter_transform.so]     optzoom   = On
[filter_transform.so]     interpol  = Bi-Linear (2)
[filter_transform.so]     sharpen   = 0.800000
[filter_unsharp.so] unsharp: 5x5:0.80 (sharpen luma)
[filter_unsharp.so] unsharp: 5x5:0.40 (sharpen chroma)
[filter_unsharp.so] v1.0.1 (2003-10-27) unsharp mask & gaussian blur
[export_xvid4.so] v0.0.6 (2007-08-11) (video) XviD 1.0.x series (aka API 4.0) | (audio) MPEG/AC3/PCM
[filter_transform.so] warning: not enough transforms found, use last transformation!

Segmentation fault

Σκέφτηκα να δώσω και την original ταινία (αντί του αρχείου trf )
Κώδικας: Επιλογή όλων
transcode -J transform -i P2250041.AVI -y xvid -o STABILE
αλλά όπως ήταν αναμενόμενο το αποτέλεσμα είναι ...
Spoiler: show
Κώδικας: Επιλογή όλων
transcode v1.1.5 (C) 2001-2003 Thomas Oestreich, 2003-2009 Transcode Team
libdvdread: Encrypted DVD support unavailable.
************************************************
**                                            **
**  No css library available. See             **
**  /usr/share/doc/libdvdread4/README.Debian  **
**  for more information.                     **
**                                            **
************************************************
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdread: Encrypted DVD support unavailable.
************************************************
**                                            **
**  No css library available. See             **
**  /usr/share/doc/libdvdread4/README.Debian  **
**  for more information.                     **
**                                            **
************************************************
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
[transcode] V: auto-probing     | P2250041.AVI (OK)
[transcode] V: import format    | MJPEG in RIFF data, AVI (module=ffmpeg)
[transcode] A: auto-probing     | P2250041.AVI (OK)
[transcode] A: import format    | AC3 in RIFF data, AVI (module=null)
[transcode] V: AV demux/sync    | (1) sync AV at initial MPEG sequence
[transcode] V: import frame     | 1280x720  1.78:1  encoded @ 16:9
[transcode] V: bits/pixel       | 0.065 (low)
[transcode] V: decoding fps,frc | 30.000,5
[transcode] V: video format     | YUV420 (4:2:0) aka I420
[transcode] A: import           | disabled
[transcode] A: export           | disabled
[transcode] V: encoding fps,frc | 30.000,5
[transcode] A: bytes per frame  | 0 (0.000000)
[transcode] A: adjustment       | 0@1000
[transcode] V: IA32/AMD64 accel | sse3 sse2 sse 3dnowext 3dnow mmxext mmx cmove asm
[transcode] V: video buffer     | 10 @ 1280x720 [0x2]
[transcode] A: audio buffer     | 10 @ 0x0x16
[import_null.so] v0.2.0 (2002-01-19) (video) null | (audio) null
[import_ffmpeg.so] v0.1.15 (2008-01-28) (video) ffmpeg: MS MPEG4v1-3/MPEG4/MJPEG
[filter_transform.so] v0.93 (2011-11-09) transforms each frame according to transformations
given in an input file (e.g. translation, rotate) see also filter stabilize
[filter_transform.so] error parsing input file P2250041.AVI.trf!

[filter_transform.so] Image Transformation/Stabilization Settings:
[filter_transform.so]     input     = P2250041.AVI.trf
[filter_transform.so]     smoothing = 10
[filter_transform.so]     maxshift  = -1
[filter_transform.so]     maxangle  = -1.000000
[filter_transform.so]     crop      = Keep
[filter_transform.so]     relative  = True
[filter_transform.so]     invert    = False
[filter_transform.so]     zoom      = 0.000000
[filter_transform.so]     optzoom   = On
[filter_transform.so]     interpol  = Bi-Linear (2)
[filter_transform.so]     sharpen   = 0.800000
[filter_unsharp.so] unsharp: 5x5:0.80 (sharpen luma)
[filter_unsharp.so] unsharp: 5x5:0.40 (sharpen chroma)
[filter_unsharp.so] v1.0.1 (2003-10-27) unsharp mask & gaussian blur
[export_null.so] v0.1.2 (2001-08-17) (video) null | (audio) null
[export_xvid4.so] v0.0.6 (2007-08-11) (video) XviD 1.0.x series (aka API 4.0) | (audio) MPEG/AC3/PCM
[import_ffmpeg.so] input is mjpeg, reducing range from YUVJ420P to YUV420P
[filter_levels.so] instance #3
[filter_levels.so] v1.2.0 (2007-06-07) Luminosity level scaler
[filter_levels.so] scaling 0-255 gamma 1.000000 to 16-240 (pre-process)
[export_xvid4.so] warning: Error opening configuration file ./xvid4.cfg: No such file or directory
Segmentation fault



Το αρχείο xvid4.cfg υπάρχει. Αποτέλσμα εντολής
Κώδικας: Επιλογή όλων
cat /usr/lib/transcode/xvid4.cfg

Spoiler: show
Κώδικας: Επιλογή όλων
# Default = 0

cartoon = 0


# Activates High Quality AC coefficient prediction from neighboor blocks.
#
# Values = 0 (no) | 1 (yes)
# Default = 1

hqacpred = 1


# XviD keeps track of block coding type (skipped, predicted, intra). The skipped
# block counter can be used to choose wether a frame is so close to its reference
# that it can be _completly_ skipped.
#
# This setting allows you to choose the (100 - value) threshold for skipping a
# frame.
#
# Values = [0..100] (0 -> never skip a frame, 100 -> skip all frames)
# Default = 0

frame_drop_ratio = 0

# XviD discard chroma planes bitstream so the encoded video is greyscale only.
# Note that this does not speed up encoding, that just prevent chroma data
# from being written in the last stage of encoding.
#
# This setting enable Chroma color discarding.
#
# Values = 0 (no) | 1 (yes)
# Default = 0

greyscale = 0

# For testing purposes, or quality measurement, XviD can return some stats
# about the encoded frames.
#
# This option activates PSNR measurement, the average PSNR is displayed at the
# end of the encoding session. This option is probably something a Joe user
# does not really care. This option makes the encoding a bit slower.
#
# Values = 0 (no) | 1 (yes)
# Default = 0

stats = 0

# When doing the first pass of a 2-pass encode, the encoder takes some
# shortcuts and does not produce a full quality encode. Must users have
# no reason to do this, since the first pass is usually discarded.
#
# Setting this option forces the encoder to produce a full quality first
# pass at Q2. Enabling this makes the first pass a lot slower, and should
# only be enabled if you're using the resuts of the first pass for something.
#
# Values = 0 (standard first pass) | 1 (full quality first pass)
# Default = 0

full1pass = 0

# ----------------------------------------------------------------------------
#
# Section: Quantizer
#
# This section allows you to tune quantizing process.
# ----------------------------------------------------------------------------

[quantizer]

# The next 6 settings control the valid range of quantizers for a specific frame
# type
#
# a [2..31] range is probably good for all sequences, you can decrease the higher
# bound limit if you notice some scenes with artefacts. However, restricting the
# valid range can make the bitrate controller fails to achieve the desired bitrate
#
# Use this ranges with MUCH care
#
# Values = [0..31]
#  1-> small quantizer -> better quality
# 31-> high quantizer -> bad quality
#  0 has a special meaning, it lets XviD uses its own default values

min_iquant = 2
max_iquant = 31
min_pquant = 2
max_pquant = 31
min_bquant = 2
max_bquant = 31

# With the MPEG quantization method you can provide custom matrices optimized
# your video material.
#
# A matrix file is just a file where 64 decimal values ranged in 1..255 are
# specified separated by  space chars (newline, space, tabs)
#
# The 8x8 matrix is then rebuilt like that
#
# [ first coeff, second coeff, ... eighth coeff]
# [ ninth coeff, ...                           ]
# [ ...                                        ]
# [                                            ]
# [                                            ]
# [                                            ]
# [                                            ]
# [                                            ]
#
# Value = filename of the matrix
# Default : none (no custom matrix)

#quant_intra_matrix =
#quant_inter_matrix =


# ----------------------------------------------------------------------------
#
# Section: CBR
#
# This section allows you to tune the Constant Bitrate settings.
# ----------------------------------------------------------------------------

[cbr]

# This parameter controls the delay in frames before the CBR rate controller
# will react to bitrate changes and will try to compensate the change to obtain
# a constant bitrate over an averaging range of frames (see below).
#
# Value = >=0
# Default = 16
# 0 has a special meaning, it lets XviD uses its own default values

reaction_delay_factor = 16


# Real CBR is hard to achieve. Depending on the video material, bitrate can be
# variable, and hard to predict. That's why XviD uses an averaging period for
# which it guarantees a given amount of bits (minus a small variation).
#
# This settings express the "number of frames" for which XviD averages bitrate
# and tries to achieve CBR.
#
# Value = >=0
# Default = 100
# 0 has a special meaning, it lets XviD uses its own default values

averaging_period = 100


# Todo: find its exact meaning
#
# Value = >=0
# Default = 100
# 0 has a special meaning, it lets XviD uses its own default values

buffer = 100

# ----------------------------------------------------------------------------
#
# Section: VBR
#
# This section allows you to tune the Variable Bitrate controller settings.
# (2nd pass control in simpler words)
# ----------------------------------------------------------------------------

[vbr]

# The two pass algorithm scales the initial bitrate curve to obtain one that
# respect both the user target bitrate and the natural shape of the first pass
# curve. However it is possible to give an additionnal amount of bits for Intra
# frames.
#
# This setting tells how many additional amount of bits, Intra Frames are
# supposed to be given (this "bossting" amount of bits is compensated by
# subtracting the same amount of bits from other frame types pool)
#
# Value = [0..100]
# Default = 0

keyframe_boost = 0


# This settigs control how much the upper part of the curve has to get closer
# to the average bitrate value. The upper part of the curve is the set of values
# that are higher than the curve average. It is expressed in %.
#
# Think of that setting like a shrinking factor for the upper part of the
# curve.
#
# Value = [0..100]
# Default = 0

curve_compression_high = 0


# This settigs control how much the lower part of the curve has to get closer
# to the average bitrate value. The lower part of the curve is the set of values
# that are lower than the curve average. It is expressed in %.
#
# Think of that setting like a growing factor for the lower part of the
# curve.
#
# Value = [0..100]
# Default = 0

curve_compression_low = 0


# During two pass, a scaled bitrate curve is computed. The difference between
# that expected curve and the result obtained during encoding is called
# overflow. Obviously, the two pass Rate Controller tries to compensate
# that overflow distributing it over next frames to be encoded.
#
# This setting controls how much overflow is distributed at each new frame.
# Low values allow lazy overflow control, big rate bursts are compensated more
# slowly (could lead to lack of precision for small clips). High values
# make RC compensate very hard the overflow, this can have a very bad impact on
# quality during rate bursts.
#
# NB: This setting impacts quality a lot, play with it carefully !
#
# Value = [0..100]
# Default = 0
# 0 has a special meaning, it lets XviD uses its own default values

overflow_control_strength = 5

# During the frame bit allocation, overflow control may increase the frame
# size. This parameter controls how much the overflow control is allowed
# to increase the frame size in percent compared to the ideal curve allocation
#
# Value = >=0
# Default = 60
# 0 has a special meaning, it lets XviD uses its own default values

max_overflow_improvement = 5


# During the frame bit allocation, overflow control may decrease the frame
# size. This parameter controls how much the overflow control is allowed
# to decrease the frame size in percent compared to the ideal curve allocation
#
# Value = >=0
# Default = 60
# 0 has a special meaning, it lets XviD uses its own default values

max_overflow_degradation = 5


# This reduction factor is the maximum allowed keyframe penalty applied to
# a frame in a ivop sequence. The more the frame is distant from the last
# ivop in the consecutive ivop sequence, the more penalty it is applied.
# This ensures a maximum bitrate allocation to the last ivop, thus favorizing
# a good reference frame for following p/s/b vops.
#
# Value = >=0
# Default = 20
# 0 has a special meaning, it lets XviD uses its own default values

kfreduction = 20


# Distance between two ivops so that it is not decresed its bit allocation by
# the ivop reduction mechanism.
#
# Value = >=0
# Default = 1
# 0 has a special meaning, it lets XviD uses its own default values

kfthreshold = 1


# Most of the time users express their target bitrate for video w/o taking care
# of the video container overhead. This small but (mostly) constant overhead
# can make the target file size is not respected (oversized result). We decided
# to allow users to set the amount of overhead per frame the container generates
# (give only an average per frame)
#
# Value = >=0
# Default = 24 (AVI frame average overhead per frame in bytes)
# 0 has a special meaning, it lets XviD uses its own default values

container_frame_overhead = 24

##############################################################################
# Do not modify this tag comment
# arch-tag: bb7970c1-33fb-4c8c-8d1b-742ff2e53336 xvid config file

To ίδιο αποτέλεσμα βγάζει και μετά από αντιγραφή του xvid4.cfg στα κρυφά μου αρχεία.
Κώδικας: Επιλογή όλων
sudo cp /usr/lib/transcode/xvid4.cfg ~/.xvid4.cfg
:idea: Μήπως πρέπει να το αντιγράψω κάπου αλλού ; :?:


:idea: Μήπως πρέπει να εγκαταστήσω το Ubuntu-restricted-extras ;
Το εγκαθιστώ λοιπόν και το αποτέλεσμα είναι ας το πούμε θετικό .
Κώδικας: Επιλογή όλων
transcode -J transform -i P2250041.AVI.trf -y xvid -o STABILE

Αποτέλεσμα.
Spoiler: show

Το encoding συνεχίζεται αρκετή ώρα , ώσπου δεν αντέχω και το κλείνω. Το αρχείο μεγαλώνει και μεγαλώνει .... δεν ξέρω πόσο θα γίνει στο τέλος. Ο επεξεργαστής όλη αυτή την ώρα δουλεύει σαν τρελός.. ( Οκ . Φυσικό θα μου πείτε , αφού κάνει encoding. Αλλά είναι πολλή η ώρα. Υπερβολικά . )
αποτέλεσμα της top
Spoiler: show
Κώδικας: Επιλογή όλων
Tasks: 189 total,   1 running, 188 sleeping,   0 stopped,   0 zombie
Cpu(s): 54.9%us,  4.4%sy,  0.0%ni, 40.4%id,  0.1%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   4124464k total,  2117180k used,  2007284k free,    84208k buffers
Swap:  8648688k total,        0k used,  8648688k free,  1477336k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                               
6083 nikos     20   0  393m  55m 3152 S  172  1.4  28:53.84 transcode                                                             
2926 nikos     20   0  497m 144m  31m S   40  3.6  18:24.45 firefox                                                               
1319 root      20   0 94304  72m  16m S    8  1.8  29:45.74 Xorg                                                                   
1612 nikos     20   0 83192  66m  20m S    7  1.7  11:43.45 compiz                                                                 
3205 nikos     20   0 81788  15m  11m S    4  0.4   7:03.82 gnome-terminal                                                         
1614 nikos     20   0  102m  34m  23m S    4  0.9   0:58.33 nautilus                                                               
2991 nikos     20   0  240m  48m  25m S    2  1.2   2:31.03 plugin-containe                                                       
3779 nikos     20   0 74160  21m  12m S    2  0.5   0:36.86 gedit                                                                 
1453 root      20   0  3612 1232 1048 S    1  0.0   0:13.76 hald-addon-inpu                                                       
   75 root      20   0     0    0    0 S    0  0.0   0:06.24 kondemand/3                                                           
1764 nikos     20   0 33136  18m 4156 S    0  0.5   0:28.64 ubuntuone-syncd                                                       
7185 nikos     20   0  2548 1232  904 R    0  0.0   0:00.03 top                                                                   
    1 root      20   0  2804 1620 1168 S    0  0.0   0:00.58 init                                                                   
    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd                                                               
    3 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0                                                           
    4 root      20   0     0    0    0 S    0  0.0   0:00.16 ksoftirqd/0                                                           
    5 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0

Αν λειτουργεί έτσι δηλαδή το πρόγραμμα , οκ. Καλό μεν , αλλά ...

Μήπως όμως κάνω κάτι λάθος ;
Κάθε βοήθεια - ιδέα δεκτή.
About Me
NickTux@GitHub

Spoiler: show
1. Ubuntu 18.04 LTS
2. Intel Core i3 CPU M 380 2.53GHz ‖ RAM 6GB ‖ Acer Aspire 5733
3. Intel Integrated Graphics [8086:0046] {i915}
4. wlan0: Atheros Inc. AR9485 Wireless Network Adapter [168c:0032] (rev 01)
Άβαταρ μέλους
Learner
Συντονιστής
Συντονιστής
 
Δημοσιεύσεις: 9765
Εγγραφή: 08 Νοέμ 2010, 21:24
Τοποθεσία: Αθήνα
Launchpad: nicktux
IRC: NickTux
Εκτύπωση

Re: Σταθεροποίηση εικόνας βίντεο

Δημοσίευσηαπό the_eye » 26 Φεβ 2012, 04:02

Learner έγραψε:transcode v1.1.5 (C) 2001-2003 Thomas Oestreich, 2003-2009 Transcode Team
libdvdread: Encrypted DVD support unavailable.


Κάτι συμβαίνει με την κωδικοποίηση του video, δοκίμασε να το μετατρέψεις σε άλλη μορφή.
Όσο λιγότερο κλειστό λογισμικό έχεις, τόσα λιγότερα προβλήματα.
1 Γνώσεις ⇛ Linux: Καλό ┃ Προγραμματισμός: Ναι PHP, MySQL ┃ Αγγλικά: Καλά
2 Ubuntu 22.04 Jammy Jellyfish 5.15.0-58-generic 64bit (el_GR.UTF-8, ubuntu:GNOME ubuntu)
3 Intel Core i3-6100 CPU @ 3.70GHz ‖ RAM 7836 MiB ‖ Gigabyte B150M-HD3 DDR3-CF - Gigabyte B150M-HD3 DDR3
4 Intel HD Graphics 530 [8086:1912] {i915}
5 enp1s0: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
Οδηγοί Ubuntu Βίντεο Οδηγοί
Άβαταρ μέλους
the_eye
Διαχειριστής
Διαχειριστής
 
Δημοσιεύσεις: 11671
Εγγραφή: 16 Μαρ 2010, 17:19
Launchpad: ntoulasd
IRC: the_eye_
Εκτύπωση

Re: Σταθεροποίηση εικόνας βίντεο

Δημοσίευσηαπό Learner » 27 Φεβ 2012, 01:21

the_eye έγραψε:
Learner έγραψε:transcode v1.1.5 (C) 2001-2003 Thomas Oestreich, 2003-2009 Transcode Team
libdvdread: Encrypted DVD support unavailable.


Κάτι συμβαίνει με την κωδικοποίηση του video, δοκίμασε να το μετατρέψεις σε άλλη μορφή.


Το μήνυμα αυτό είναι νομίζω για Encrypted DVD , όπως το γράφει. Το αρχείο που προσπαθώ να κωδικοποιήσω είναι avi και έχω δοκιμάσει 4 export . Xvid , mpeg4 ,ffmpeg , mpeg2video.
Δεν ξέρω τι άλλο να δοκιμάσω. Διάβασα και το Wiki του transcode αλλά δεν κατάφερα κάτι. Έδωσα και άλλες παραμέτρους χωρίς κάποιο αποτέλεσμα.
Δοκίμασα και google search engine αλλά το support γι' αυτό το πρόγραμμα μάλλον είναι λειψό. Δεν βρήκα κάτι.

Εσένα κάνει φαντάζομαι κανονικά την μετατροπή ε ; Σου αργεί ; κάνει αρκετή ώρα ;
About Me
NickTux@GitHub

Spoiler: show
1. Ubuntu 18.04 LTS
2. Intel Core i3 CPU M 380 2.53GHz ‖ RAM 6GB ‖ Acer Aspire 5733
3. Intel Integrated Graphics [8086:0046] {i915}
4. wlan0: Atheros Inc. AR9485 Wireless Network Adapter [168c:0032] (rev 01)
Άβαταρ μέλους
Learner
Συντονιστής
Συντονιστής
 
Δημοσιεύσεις: 9765
Εγγραφή: 08 Νοέμ 2010, 21:24
Τοποθεσία: Αθήνα
Launchpad: nicktux
IRC: NickTux
Εκτύπωση

Re: Σταθεροποίηση εικόνας βίντεο

Δημοσίευσηαπό the_eye » 27 Φεβ 2012, 02:10

Εννοώ να μετατρέψεις το αρχικό avi σε άλλη μορφή και μετά να το βάλεις στο transcode.

Πολλές βιντεοκάμερες κωδικοποιούν σε κλειστά format.
Όσο λιγότερο κλειστό λογισμικό έχεις, τόσα λιγότερα προβλήματα.
1 Γνώσεις ⇛ Linux: Καλό ┃ Προγραμματισμός: Ναι PHP, MySQL ┃ Αγγλικά: Καλά
2 Ubuntu 22.04 Jammy Jellyfish 5.15.0-58-generic 64bit (el_GR.UTF-8, ubuntu:GNOME ubuntu)
3 Intel Core i3-6100 CPU @ 3.70GHz ‖ RAM 7836 MiB ‖ Gigabyte B150M-HD3 DDR3-CF - Gigabyte B150M-HD3 DDR3
4 Intel HD Graphics 530 [8086:1912] {i915}
5 enp1s0: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
Οδηγοί Ubuntu Βίντεο Οδηγοί
Άβαταρ μέλους
the_eye
Διαχειριστής
Διαχειριστής
 
Δημοσιεύσεις: 11671
Εγγραφή: 16 Μαρ 2010, 17:19
Launchpad: ntoulasd
IRC: the_eye_
Εκτύπωση

Re: Σταθεροποίηση εικόνας βίντεο

Δημοσίευσηαπό Learner » 27 Φεβ 2012, 03:26

the_eye έγραψε:Εννοώ να μετατρέψεις το αρχικό avi σε άλλη μορφή και μετά να το βάλεις στο transcode.

Πολλές βιντεοκάμερες κωδικοποιούν σε κλειστά format.


Καλή ιδέα. Δεν το είχα σκεφτεί. Βέβαια δεν έχω τρόπο να "βγάλω" το βίντεο σε άλλη μορφή εκτός από αυτή(λόγω κάμερας) . Το μετέτρεψα σε μια μορφή avi(πάλι) , αλλά με κωδικοποίηση(codec) mpeg4 μέσω του Openshot.
Έδειξε να δουλεύει , στην πρώτη εντολή αλλά στο τέλος πάλι Segmentation Fault. Επίσης δημιούργησε ένα αρχείο trf μεγέθους 226.9MB. :shock:



Κώδικας: Επιλογή όλων
transcode -J stabilize -i Default.avi -y null,null -o dummy

αποτέλεσμα
Spoiler: show
Κώδικας: Επιλογή όλων
transcode v1.1.5 (C) 2001-2003 Thomas Oestreich, 2003-2009 Transcode Team
libdvdread: Encrypted DVD support unavailable.
************************************************
**                                            **
**  No css library available. See             **
**  /usr/share/doc/libdvdread4/README.Debian  **
**  for more information.                     **
**                                            **
************************************************
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdread: Encrypted DVD support unavailable.
************************************************
**                                            **
**  No css library available. See             **
**  /usr/share/doc/libdvdread4/README.Debian  **
**  for more information.                     **
**                                            **
************************************************
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
[transcode] V: auto-probing     | Default.avi (OK)
[transcode] V: import format    | (null) in RIFF data, AVI (module=null)
[transcode] A: auto-probing     | Default.avi (OK)
[transcode] A: import format    | MPEG ES Layer 3 in RIFF data, AVI (module=null)
[transcode] V: AV demux/sync    | (1) sync AV at initial MPEG sequence
[transcode] V: import frame     | disabled
[transcode] V: bits/pixel       | 0.000 (unknown)
[transcode] V: decoding fps,frc | 25.000,3
[transcode] V: video format     | YUV420 (4:2:0) aka I420
[transcode] A: import format    | 0x55    MPEG ES Layer 3 [44100,16,2]  192 kbps
[transcode] A: export           | disabled
[transcode] V: encoding fps,frc | 25.000,3
[transcode] A: bytes per frame  | 7056 (7056.000000)
[transcode] A: adjustment       | 0@1000
[transcode] V: IA32/AMD64 accel | sse3 sse2 sse 3dnowext 3dnow mmxext mmx cmove asm
[transcode] V: video buffer     | 10 @ 0x0 [0x2]
[transcode] A: audio buffer     | 10 @ 44100x2x16
[import_null.so] v0.2.0 (2002-01-19) (video) null | (audio) null
[filter_stabilize.so] v0.93 (2011-11-09) extracts relative transformations of
    subsequent frames (used for stabilization together with the
    transform filter in a second pass)
[filter_stabilize.so] Fieldsize: 16, Maximal translation: 4 pixel
[filter_stabilize.so] Number of used measurement fields: 3 out of 9
[filter_stabilize.so] Image Stabilization Settings:
[filter_stabilize.so]      shakiness = 5
[filter_stabilize.so]       accuracy = 5
[filter_stabilize.so]       stepsize = 6
[filter_stabilize.so]           algo = 1
[filter_stabilize.so]    mincontrast = 0.250000
[filter_stabilize.so]           show = 0
[filter_stabilize.so]         result = Default.avi.trf
[export_null.so] v0.1.2 (2001-08-17) (video) null | (audio) null
[/home/georg/src/cpp/vid.stab/vid.stab/src/motiondetect.c:867] tc_malloc(): can't allocate 72 bytes
[/home/georg/src/cpp/vid.stab/vid.stab/src/motiondetect.c:787] tc_malloc(): can't allocate 108 bytes
[/home/georg/src/cpp/vid.stab/vid.stab/src/dsvector.c:35] tc_zalloc(): can't allocate 36 bytes
[/home/georg/src/cpp/vid.stab/vid.stab/src/motiondetect.c:796] tc_malloc(): can't allocate 108 bytes
Segmentation fault

Η δεύτερη εντολή δεν δούλεψε. Δεν παραθέτω τα λάθη της, είναι τα ίδια με αυτά στο πρώτο ποστ.

Θα δοκιμάσω και μερικά άλλα formats με Openshot , αν και έχω αρχίσει να χάνω ελπίδες.
About Me
NickTux@GitHub

Spoiler: show
1. Ubuntu 18.04 LTS
2. Intel Core i3 CPU M 380 2.53GHz ‖ RAM 6GB ‖ Acer Aspire 5733
3. Intel Integrated Graphics [8086:0046] {i915}
4. wlan0: Atheros Inc. AR9485 Wireless Network Adapter [168c:0032] (rev 01)
Άβαταρ μέλους
Learner
Συντονιστής
Συντονιστής
 
Δημοσιεύσεις: 9765
Εγγραφή: 08 Νοέμ 2010, 21:24
Τοποθεσία: Αθήνα
Launchpad: nicktux
IRC: NickTux
Εκτύπωση


  • ΣΧΕΤΙΚΑ ΘΕΜΑΤΑ
    ΑΠΑΝΤΗΣΕΙΣ
    ΠΡΟΒΟΛΕΣ
    ΣΥΓΓΡΑΦΕΑΣ

Επιστροφή στο Οδηγοί - How to - Tutorials