Encode to OGG is producing poor quality video

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Sep 3 12:14:16 PDT 2013


On Thu, 2013-08-29 at 08:00 -0700, Diego wrote:

Hi Diego,

> I'm using the following command to convert an flv file to ogg:
> 
> gst-launch-0.10 filesrc location=$1 ! decodebin2 name=dec ! queue !
> videorate ! videoscale ! theoraenc bitrate=400 ! oggmux name=mux ! filesink
> location=$2 dec. ! queue ! audioconvert ! audioresample ! vorbisenc
> bitrate=160000 ! mux.
> 
> $1 is the path to the input file and $2 is the path for the output file.
> 
> This command is working without any errors. However, when the output ogg
> file is played by HTML5 tag on Firefox, the audio and video streams are not
> synchronized. It seems the audio is always behind the video. The audio seems
> to be choppy and it breaks all the time. When I play it using Totem Movie
> Player 2.28.6, I see the same behavior: audio and video are not synchronized
> and they seem to be stopping all the time. I have already played with the
> quality option for both theoraenc and vorbisenc. I have set to min and max
> values to make sure I have been testing the extremes. But no luck yet.
> 
> This command is running on a Intel(R) Xeon(R) CPU E7- 8870 @ 2.40GHz with
> 8GB of RAM.

The processing power of the machine should not affect the result in this
case, since it will simply transcode as fast as it can.

Try adding an 'audiorate' element before vorbisenc. Both theoraenc and
vorbisenc want a perfect stream as input, esp. when muxing into ogg.

It might be less of a problem with other container formats (e.g.
matroska, quicktime).

 Cheers
  -Tim

> There is another command running on the same machine to convert an flv file
> to mp4:
> 
> gst-launch-0.10 filesrc location=$1 ! decodebin2 name=dec ! queue !
> audioconvert ! audioresample ! flumcaacenc header-type=0 ! ffmux_mp4
> name=mux ! filesink location=$2 dec. ! queue ! videorate ! videoscale !
> flumch264enc max-bitrate=400000 bitrate-mode=2 ! mux.
> 
> Here I'm using Fluendo codecs for h264 and aac. The command also runs
> without any errors and the mp4 output file can be played fine on HTML5 tag
> and on Totem.
> 
> What do you think might be happening in this case? Maybe the processor is
> not enough for theoraenc/vorbisenc? Am I missing any tunning parameter?
> 
> Appreciate your feedback.
> 
> 
> 
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Encode-to-OGG-is-producing-poor-quality-video-tp4661775.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list