Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libavformat/mpegtsenc: allow to set service_type in sdt #109

Closed
wants to merge 1 commit into from
Closed

libavformat/mpegtsenc: allow to set service_type in sdt #109

wants to merge 1 commit into from

Conversation

dhead666
Copy link
Contributor

@dhead666 dhead666 commented Feb 1, 2015

This adds an option to set the service type in mpegts as define in ETSI 300 468.
I've been using this to pipe internet radio stream (originally as HLS/m3u8) from ffmpeg to tvheadend, when the service type set right tvheadend recognize the mpegts stream as a radio channel.
This have been test against master.
linuxstb from the hts freenode channel originally written the patch and allowed me to push it upstream.

@@ -1434,6 +1435,9 @@ static const AVOption options[] = {
{ "mpegts_service_id", "Set service_id field.",
offsetof(MpegTSWrite, service_id), AV_OPT_TYPE_INT,
{ .i64 = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM },
{ "mpegts_service_type", "Set service_type field.",
offsetof(MpegTSWrite, service_type), AV_OPT_TYPE_INT,
{ .i64 = 0x0001 }, 0x00, 0xff, AV_OPT_FLAG_ENCODING_PARAM },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be 0x01 to be consistent with the min/max.

@dhead666
Copy link
Contributor Author

dhead666 commented Feb 1, 2015

fixed and rebased.
I forgot to add this fix https://trac.ffmpeg.org/ticket/4118

@TimothyGu
Copy link
Member

@dhead666 It would be cool if you can send the patch to the ffmpeg developers' mailing list as not many people are following our GitHub pull requests.

  1. Subscribe to the mailing list: http://lists.ffmpeg.org/mailman/listinfo/ffmpeg-devel

  2. Check out the branch, and

    git format-patch -1
    
  3. Send your patch as an attachment to ffmpeg-devel@ffmpeg.org.

Also if you know how to use git format-patch that would be even better.

Thanks.

@dhead666
Copy link
Contributor Author

dhead666 commented Feb 1, 2015

@TimothyGu

Thanks, I sent the patch with git send-mail (well without description, first time using this method) so I'm closing the PR here.

@dhead666 dhead666 closed this Feb 1, 2015
@TimothyGu
Copy link
Member

The description in git send-email is the commit message, and when the maintainer uses git am < patch.patch the commit message will automatically be committed.

If you would like to attach something that is not to go into the commit message, do it like this: (with git send-email -1 --annotate)

From 2d59c1ede5885664561b40ca78ae3b8f8f8987c0 Mon Sep 17 00:00:00 2001
From: your name <emai@example.com>
Date: Wed, 28 Jan 2015 19:19:03 -0800
Subject: [PATCH] My patch

COmmitt message herrrre.
---

Message that won't be committed.

 doc/muxers.texi         | 3 +++
 libavformat/mpegtsenc.c | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 7ca6409..52a9cd4 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -690,6 +690,9 @@ Set the transport_stream_id (default 0x0001). This identifies a
 transponder in DVB.
 @item -mpegts_service_id @var{number}
 Set the service_id (default 0x0001) also known as program in DVB.
+@item -mpegts_service_type @var{number}
+Set the program service_type (default 0x01 - TV).  For the list of valid
+values see ETSI 300 468.
 @item -mpegts_pmt_start_pid @var{number}
 Set the first PID for PMT (default 0x1000, max 0x1f00).
 @item -mpegts_start_pid @var{number}

@dhead666
Copy link
Contributor Author

dhead666 commented Feb 1, 2015

@TimothyGu thanks you very much for your help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants