rbfsrc to video file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

rbfsrc to video file

AGAYEV, LEVON
Hello,
I started using GStreamer 3 days ago, so sorry for my lack of knowledge

I wanted to connect to a VNC server and record the GUI. 

For the moment i'm able to connect and display the remote GUI, 

gst-launch-1.0 -v rfbsrc host=xx.xx.x.x port=5900 password=passw view-only=true ! videoconvert !  openh264enc !  "video/x-h264, stream-format=(string)byte-stream" ! openh264dec ! autovideosink

now i only replace the  autovideosink  by  filesink location=test.mp4

the video file is created (not empty) but i can't read it with WindowsMediaPlayer or VLC 
I also tryed  filesink location=test.h264   and enabled VLC's H264 demuxer, but no result.

In some exemples i can see that the last step before filesink is XXXXmux , but if i try 

gst-launch-1.0 -v rfbsrc host=10.81.4.68 port=5900 password=pa009v view-only=true ! videoconvert !  openh264enc  ! flvmux  !  filesink location=test.flv

i get : WARNING: erroneous pipeline: could not link openh264enc0 to flvmux0

Can someone tell me what i have to do to save the video to a file please ? 
Thank you in advance.
Levon


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: rbfsrc to video file

Arjen Veenhuizen


Won't work, as you are encoding the video, subsequently decoding the video
and then storing the decoded video to disk. Adding "mp4" as file extension
also doesn't make it an mp4 file. For that, you need a multiplexer.



Will also not work, as you need to parse the encoded bitstream into the
right "format". For that, you need h264parse.

So a pipeline that should work would read:






--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: rbfsrc to video file

Nicolas Dufresne-5
In reply to this post by AGAYEV, LEVON
Le mardi 15 janvier 2019 à 12:11 +0100, AGAYEV, LEVON a écrit :

> Hello,
> I started using GStreamer 3 days ago, so sorry for my lack of knowledge
>
> I wanted to connect to a VNC server and record the GUI.
>
> For the moment i'm able to connect and display the remote GUI,
>
> gst-launch-1.0 -v rfbsrc host=xx.xx.x.x port=5900 password=passw view-only=true ! videoconvert !  openh264enc !  "video/x-h264, stream-format=(string)byte-stream" ! openh264dec ! autovideosink
>
> now i only replace the  autovideosink  by  filesink location=test.mp4
You need two things, first use -e, so that gst-launch-1.0 will send an
EOS when you press CTRL+C and properly finish wriping the MP4 headers.
And then replace "openh264dec ! autovideosink" with "h264parse ! mp4mux
! filesink location=test.mp4" then it should work a little better.

>
> the video file is created (not empty) but i can't read it with WindowsMediaPlayer or VLC
> I also tryed  filesink location=test.h264   and enabled VLC's H264 demuxer, but no result.
>
> In some exemples i can see that the last step before filesink is XXXXmux , but if i try
>
> gst-launch-1.0 -v rfbsrc host=10.81.4.68 port=5900 password=pa009v view-only=true ! videoconvert !  openh264enc  ! flvmux  !  filesink location=test.flv
>
> i get : WARNING: erroneous pipeline: could not link openh264enc0 to flvmux0

You need a parser, h264parse in your case, in front of the muxer. H264
has multiple type of encapsulation and h264parse is able to
convert/adapt to the difference between you encoder and muxer
requirements.

>
> Can someone tell me what i have to do to save the video to a file please ?
> Thank you in advance.
> Levon
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: rbfsrc to video file

Arjen Veenhuizen
In reply to this post by Arjen Veenhuizen
Arjen Veenhuizen wrote

> Won't work, as you are encoding the video, subsequently decoding the video
> and then storing the decoded video to disk. Adding "mp4" as file extension
> also doesn't make it an mp4 file. For that, you need a multiplexer.
>
>
>
> Will also not work, as you need to parse the encoded bitstream into the
> right "format". For that, you need h264parse.
>
> So a pipeline that should work would read:


It looks like the mailinglist ate my pipeline examples, though in preview
(just before I posted) they showed up fine. FWIW, they were in < raw> <
/raw> tags.

In the meantime, Nicolas' answer should've got you going :)



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: rbfsrc to video file

Nicolas Dufresne-5
Le jeudi 17 janvier 2019 à 00:15 -0600, Arjen Veenhuizen a écrit :

> Arjen Veenhuizen wrote
> > Won't work, as you are encoding the video, subsequently decoding the video
> > and then storing the decoded video to disk. Adding "mp4" as file extension
> > also doesn't make it an mp4 file. For that, you need a multiplexer.
> >
> >
> >
> > Will also not work, as you need to parse the encoded bitstream into the
> > right "format". For that, you need h264parse.
> >
> > So a pipeline that should work would read:
>
> It looks like the mailinglist ate my pipeline examples, though in preview
> (just before I posted) they showed up fine. FWIW, they were in < raw> <
> /raw> tags.
>
> In the meantime, Nicolas' answer should've got you going :)

Indeed, nabble can be a really bad friend to interface with mailing
list. Specially fore ascii type of mailing list like this one.

>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel