[gstreamer-bugs] [Bug 628548] New: [mpegtsmux][PATCH]Initialize PES packet before getting the header size
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Sep 1 13:37:09 PDT 2010
https://bugzilla.gnome.org/show_bug.cgi?id=628548
GStreamer | gst-plugins-bad | git
Summary: [mpegtsmux][PATCH]Initialize PES packet before getting
the header size
Classification: Desktop
Product: GStreamer
Version: git
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-bad
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: ylatuya at gmail.com
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME target: ---
GNOME version: ---
Created an attachment (id=169291)
View: https://bugzilla.gnome.org/attachment.cgi?id=169291
Review: https://bugzilla.gnome.org/review?bug=628548&attachment=169291
Initialize PES packet before getting the header size
The PES header length is calculated before setting the dynamic flags, returning
a wrong value. Small frames (audio ones) that should be sent in a single TS
packet are spawned to a new packet because of that error. For audio streams
where a single frame can cope in one TS packet it introduces a huge overhead.
In tsmux_write_stream_packet(), for a 100B packet, we prepare a TS packet with
a payload of(100+9)B. Then, we write the TS header using this value in
tsmux_write_ts_header(), and we call tsmux_stream_get_data(). The dynamic flags
where not set yet (get_data() does it), and now
tsmux_stream_pes_header_length() returns 14B instead of 9B. The payload of the
TS packet is 114B, 5B more than what was calculated. 109B are sent in a first
packet and the remaining 5B are sent in another one.
Using the following pipeline :
gst-launch audiotestsrc num-buffers=1000 ! ffenc_aac bitrate=30000 ! mpegtsmux
! filesink location=test.ts
:~gstreamer/head/gst-plugins-bad (mpegts)$ ls -al ts*
-rw-r--r-- 1 andoni andoni 263952 2010-09-01 22:01 /home/andoni/tspost.ts
-rw-r--r-- 1 andoni andoni 451764 2010-09-01 22:00 /home/andoni/tspre.ts
This is 58% less bandwith use, from 155kbps to 91kbps
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list