video rescaling

Patrick Welche prlw1 at cam.ac.uk
Sat Jun 6 15:17:06 UTC 2020


On Sat, Jun 06, 2020 at 07:58:58AM -0700, David Ing wrote:
> On Sat, Jun 6, 2020, 7:14 AM Patrick Welche <prlw1 at cam.ac.uk> wrote:
> 
> > Given a sample video, e.g.,
> > http://techslides.com/demos/sample-videos/small.ogv
> > and following the videoscale documentation,
> >
> > gst-launch-1.0 -e \
> > filesrc location=small.ogv ! decodebin ! video/x-raw ! videoconvert \
> > ! videoscale ! video/x-raw,width=50 ! ximagesink
> >
> > does exactly what one expects. If I channel the output to a file
> >
> > gst-launch-1.0 -e \
> > filesrc location=small.ogv ! decodebin ! video/x-raw ! videoconvert \
> > ! videoscale ! video/x-raw,width=50 ! x264enc ! filesink location=out.mp4
> >
> > the file has the desired resolution, but gst-play-1.0 out.mp4 displays a
> > window of the original dimensions.
> >
> > What am I missing?
>
> Try using a muxer (mp4mux) after x264enc.

I should have updated my note to say I tried that as soon as I hit
send but with the same result...

gst-launch-1.0 -e \
filesrc location=small.ogv ! decodebin ! video/x-raw ! videoconvert \
! videoscale ! video/x-raw,width=50 ! x264enc ! mp4mux ! filesink location=out.mp4

creates a file which gst-play-1.0 displays in a window of the original
width, but with only 50 stretched pixels inside.


Cheers,

Patrick


More information about the gstreamer-devel mailing list