Notices


Reply
Thread Tools
Posts: 561 | Thanked: 75 times | Joined on Jan 2010 @ Spain
#31
I think GStreamer is better but I find less documentation tool and I see it initially more difficult than ffmpeg.

Maybe we should try to take small tutorial to get tips Gstreamer until a GUI.
 
benny1967's Avatar
Posts: 3,790 | Thanked: 5,718 times | Joined on Mar 2006 @ Vienna, Austria
#32
A tutorial would be highly appreciated; also, maybe if those of you who know Python well could have a look at it? See the last 3 paragraphs of this post for the reason why.

I tried to inform myself and get an idea about GStreamer; plus, I wanted to write a shell script as a proof of concept that would take 3 seconds from video A, 3 seconds from video B and encode them to a new video C.

The good news is: I found out GStreamer is much, much more powerful than I had originally thought. It would allow things like recording live audio comments to your edited videos or even picture-in-picture effects, showing your face on the upper right while you comment what's being shown on the main video. It supports conversion (framerates, 16:9 crop to 4:3 etc.), still images as part of the video, text overlays etc etc. ... in theory. If the N900 is powerful enough to handle it and if all the components are installed.

Another advantage seems to be that a lot of the components I did find are installed on the N900 seem to make use of the DSP or are nokia-specific; I simply assume (without knowing ffmpeg and mencoder) that this would help encoding performance-wise in comparison to these two other alternatives.

Last of the good news is that I even got one simple thing working from the command line on my N900 - the playback of one video file I had recorded:

Code:
gst-launch playbin2 uri=file:///media/mmc1/DCIM/20100810_002.mp4
gst-launch is the command, the rest are parameters. This does nothing but play back a file, without any manipulation.

One site I found, the Gstreamer Cheet Sheet, gives you an idea of how huge and complicated these gst-launch command lines can become; the syntax isn't really nice.
But then, if you write an application using GStreamer, you would use it's API and construct the monster one item at a time.

Now for the bad thing - and what I couldn't get to work yesterday:

Once I ran into a problem, I couldn't identify what exactly I'd been doing wrong because the error messages don't mean nothing to me. I copypasted code from the web that involved the gnonlin-component (which is what we need for editing videos) and tried to run it on my desktop (Ubuntu) - errors, errors and no help.
Of course part of my particular problem seems to be that most useful examples about editing videos with Gstreamer and gnonlin are published in Python, not as gst-launch command lines. I don't want to learn Python now while I try to understand Gstreamer... too much.

Maybe people with a solid knowledge of Python could better understand the examples available and apply the necessary changes to make them run on the N900.

I found this page promising.
 

The Following 3 Users Say Thank You to benny1967 For This Useful Post:
Posts: 561 | Thanked: 75 times | Joined on Jan 2010 @ Spain
#33
I think GStreamer is more powerful but less intuitive, we become accustomed to over the Syntaxis type ffmpeg.

Gstreamer trying to understand how it works:

There are three basic components: 1 src (input); 2 Filters, convertors, demuxers, muxers and codecs, 3 º sink (outputs).

Everything is based on an input connected to another element, can be a black box (filters, convertors, etc), or an output.

The tickets we recognize that contain the string "src" and outputs the string "sink."

example: gst-launch-0.10 v4l2src! xvimagesink

To find the available inputs, outputs, and plugins will use the command "gst-inspect." This command lists all available plugins and a brief description of what they do.

If you want more information and to manage parameters write "gst-inspect <<object>>." For example "gst-inspect vertigotv" showing a result ...

Factory Details:
Long name: VertigoTV effect
Class: Filter/Effect/Video
Description: A loopback alpha blending effector with rotating and scaling
Author(s): Wim Taymans <wim.taymans@chello.be>
Rank: none (0)

Plugin Details:
Name: effectv
Description: effect plugins from the effectv project
Filename: /usr/lib/gstreamer-0.10/libgsteffectv.so
Version: 0.10.21
License: LGPL
Source module: gst-plugins-good
Binary package: GStreamer Good Plugins (Ubuntu)
Origin URL: https://launchpad.net/distros/ubuntu...ugins-good0.10

GObject
+----GstObject
+----GstElement
+----GstBaseTransform
+----GstVideoFilter
+----GstVertigoTV

Pad Templates:
SINK template: 'sink'
Availability: Always
Capabilities:
video/x-raw-rgb
bpp: 32
depth: 24
endianness: 4321
red_mask: -16777216
green_mask: 16711680
blue_mask: 65280
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-raw-rgb
bpp: 32
depth: 24
endianness: 4321
red_mask: 65280
green_mask: 16711680
blue_mask: -16777216
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]

SRC template: 'src'
Availability: Always
Capabilities:
video/x-raw-rgb
bpp: 32
depth: 24
endianness: 4321
red_mask: -16777216
green_mask: 16711680
blue_mask: 65280
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-raw-rgb
bpp: 32
depth: 24
endianness: 4321
red_mask: 65280
green_mask: 16711680
blue_mask: -16777216
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]


Element Flags:
no flags set

Element Implementation:
Has change_state() function: gst_element_change_state_func
Has custom save_thyself() function: gst_element_save_thyself
Has custom restore_thyself() function: gst_element_restore_thyself

Element has no clocking capabilities.
Element has no indexing capabilities.
Element has no URI handling capabilities.

Pads:
SRC: 'src'
Implementation:
Has getrangefunc(): gst_base_transform_getrange
Has custom eventfunc(): gst_base_transform_src_event
Has custom queryfunc(): gst_pad_query_default
Provides query types:
Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
Pad Template: 'src'
SINK: 'sink'
Implementation:
Has chainfunc(): gst_base_transform_chain
Has custom eventfunc(): gst_base_transform_sink_event
Has custom queryfunc(): gst_pad_query_default
Provides query types:
Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
Has bufferallocfunc(): gst_base_transform_buffer_alloc
Pad Template: 'sink'

Element Properties:
name : The name of the object
flags: legible, escribible
String. Default: null Current: "vertigotv0"
qos : Handle Quality-of-Service events
flags: legible, escribible
Boolean. Default: false Current: true
speed : Control the speed of movement
flags: legible, escribible
Float. Range: 0,01 - 100 Default: 0,02 Current: 0,02
zoom-speed : Control the rate of zooming
flags: legible, escribible
Float. Range: 1,01 - 1,1 Default: 1,01 Current: 1,01
 

The Following User Says Thank You to WhiteWolf For This Useful Post:
benny1967's Avatar
Posts: 3,790 | Thanked: 5,718 times | Joined on Mar 2006 @ Vienna, Austria
#34
I actually did get a simple "cut and merge" running on my ubuntu PC during the weekend, using Gstreamer's gnonlin component; I still don't know what I do (I copy and paste from the web and then use trial and error to change it until it works), so ATM I can take pieces of video and put them together - but they're missing the original soundtrack. I'll have to check that. Next thing would be to get it running on the N900 with gnonlin installed from extras-testing.
 
Posts: 561 | Thanked: 75 times | Joined on Jan 2010 @ Spain
#35
I think GStreamer is more powerful but less intuitive, we become accustomed to over the Syntaxis type ffmpeg.

Gstreamer trying to understand how it works:

There are three basic components: 1º src (input); 2º Filters, convertors, demuxers, muxers and codecs; 3º sink (outputs).

Everything is based on an input connected to another element, can be a black box (filters, convertors, etc), or an output.

The tickets we recognize that contain the string "src" and outputs the string "sink."

example: gst-launch-0.10 v4l2src ! xvimagesink

To find the available inputs, outputs, and plugins will use the command "gst-inspect." This command lists all available plugins and a brief description of what they do.

If you want more information and to manage parameters write "gst-inspect <<object>>." For example "gst-inspect vertigotv" showing a result ...

Factory Details:
Long name: VertigoTV effect
Class: Filter/Effect/Video
Description: A loopback alpha blending effector with rotating and scaling
Author(s): Wim Taymans <wim.taymans@chello.be>
Rank: none (0)

Plugin Details:
Name: effectv
Description: effect plugins from the effectv project
Filename: /usr/lib/gstreamer-0.10/libgsteffectv.so
Version: 0.10.21
License: LGPL
Source module: gst-plugins-good
Binary package: GStreamer Good Plugins (Ubuntu)
Origin URL: https://launchpad.net/distros/ubuntu...ugins-good0.10

GObject
+----GstObject
+----GstElement
+----GstBaseTransform
+----GstVideoFilter
+----GstVertigoTV

Pad Templates:
SINK template: 'sink'
Availability: Always
Capabilities:
video/x-raw-rgb
bpp: 32
depth: 24
endianness: 4321
red_mask: -16777216
green_mask: 16711680
blue_mask: 65280
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-raw-rgb
bpp: 32
depth: 24
endianness: 4321
red_mask: 65280
green_mask: 16711680
blue_mask: -16777216
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]

SRC template: 'src'
Availability: Always
Capabilities:
video/x-raw-rgb
bpp: 32
depth: 24
endianness: 4321
red_mask: -16777216
green_mask: 16711680
blue_mask: 65280
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-raw-rgb
bpp: 32
depth: 24
endianness: 4321
red_mask: 65280
green_mask: 16711680
blue_mask: -16777216
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]


Element Flags:
no flags set

Element Implementation:
Has change_state() function: gst_element_change_state_func
Has custom save_thyself() function: gst_element_save_thyself
Has custom restore_thyself() function: gst_element_restore_thyself

Element has no clocking capabilities.
Element has no indexing capabilities.
Element has no URI handling capabilities.

Pads:
SRC: 'src'
Implementation:
Has getrangefunc(): gst_base_transform_getrange
Has custom eventfunc(): gst_base_transform_src_event
Has custom queryfunc(): gst_pad_query_default
Provides query types:
Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
Pad Template: 'src'
SINK: 'sink'
Implementation:
Has chainfunc(): gst_base_transform_chain
Has custom eventfunc(): gst_base_transform_sink_event
Has custom queryfunc(): gst_pad_query_default
Provides query types:
Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
Has bufferallocfunc(): gst_base_transform_buffer_alloc
Pad Template: 'sink'

Element Properties:
name : The name of the object
flags: legible, escribible
String. Default: null Current: "vertigotv0"
qos : Handle Quality-of-Service events
flags: legible, escribible
Boolean. Default: false Current: true
speed : Control the speed of movement
flags: legible, escribible
Float. Range: 0,01 - 100 Default: 0,02 Current: 0,02
zoom-speed : Control the rate of zooming
flags: legible, escribible
Float. Range: 1,01 - 1,1 Default: 1,01 Current: 1,01
If we look shows that it has the ability to work with video signals and RGB type.

This forces us to make a video to rgb before or filter would not work.

Another detail is that you tell which codec to use when working with video or audio, well now we no longer "decodebin" to find out if the codec used in audio / video knowledge and leads to the default output.

It is important to understand that to link all plugins should be used pipes are represented by the symbol "!".

Example:
If we look shows that it has the ability to work with video signals and RGB type.

This forces us to make a video to rgb before or filter would not work.

Another detail is that you tell which codec to use when working with video or audio, well now we no longer "decodebin" to find out if the codec used in audio / video knowledge and leads to the default output.

It is important to understand that to link all plugins should be used pipes are represented by the symbol "!".

Example:

We will play only one video file video / audio.

gst-launch-0.10 filesrc location=/home/usr/MyDocs/.videos/9.mp4 ! decodebin ! xvimagesink

Now we will apply a dizzying effect on the image and in real time.

gst-launch-0.10 filesrc location=/home/usr/MyDocs/.videos/9.mp4 ! decodebin ! queue ! ffmpegcolorspace ! video/x-raw-rgb ! vertigotv ! xvimagesink

Last edited by WhiteWolf; 2010-08-30 at 16:16.
 
Reply


 
Forum Jump


All times are GMT. The time now is 07:38.