Convert mkv (mjpeg) to mpeg4

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

Convert mkv (mjpeg) to mpeg4

Wes Miller
Administrator
Hi,

Is this a correct way to convert an mjpeg in a .mkv into an mpeg4 file?

     gst-launch filesrc location="xyz.mkv" ! matroskademux ! ffenc_mpeg4 ! filesink location="xyz.mpg"

Thanks,

Wes
Reply | Threaded
Open this post in threaded view
|

Re: Convert mkv (mjpeg) to mpeg4

Wes Miller
Administrator
Well, I added some to the pipeline.  The output file is there but it doesn't show anything when I play it.

     gst-launch  filesrc location=1.mkv ! matroskademux ! videorate ! jpegdec ! ffmpegcolorspace ! ffenc_mpeg4 ! filesink location=1.mpg

Wes
Reply | Threaded
Open this post in threaded view
|

Re: Convert mkv (mjpeg) to mpeg4

Edward Hervey
Administrator
On Thu, 2010-07-01 at 08:44 -0700, Wes Miller wrote:
> Well, I added some to the pipeline.  The output file is there but it doesn't
> show anything when I play it.
>
>      gst-launch  filesrc location=1.mkv ! matroskademux ! videorate !
> jpegdec ! ffmpegcolorspace ! ffenc_mpeg4 ! filesink location=1.mpg
>
> Wes

  Might want to use a container format, no ?

  Edward



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Convert mkv (mjpeg) to mpeg4

Tim-Philipp Müller-2
In reply to this post by Wes Miller
On Thu, 2010-07-01 at 08:23 -0700, Wes Miller wrote:

> Is this a correct way to convert an mjpeg in a .mkv into an mpeg4 file?

"MPEG4" is a bit ambigious, it refers to video codecs as well as a
container format.

>      gst-launch filesrc location="xyz.mkv" ! matroskademux ! ffenc_mpeg4 !
> filesink location="xyz.mpg"

You should really put encoded video into a container format, such as
matroska (matroskamux), MP4/ISO/Quicktime (mp4mux) or, if you absolutely
have to, AVI (avimux).

Also, if your matroska files contain MJPEG, you will need a decoder
between matroskademux and ffenc_mpeg4. Encoders can usually not encode
straight from JPEG format.

Cheers
 -Tim




------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Convert mkv (mjpeg) to mpeg4

Wes Miller
Administrator
Thanks!  This worked.  

     gst-launch  filesrc location=1.mkv ! matroskademux ! videorate ! jpegdec ! ffmpegcolorspace ! ffenc_mpeg4 ! mp4mux ! filesink location=1.mpg

So when i see an MPG file (that i didn't make <grin>) is it likely to be a container file even though the extension seems to say it's raw mp<something>g?  Guess that wouldd explain why the same file extension opens different players.

Again, thanks!

Wes