Discussion:
[FFmpeg-user] MPEG-TS structure.
Dennis Perov
2010-05-06 18:58:25 UTC
Permalink
Gents,

I'm trying to produce mpegts file with h.264/ac3 so it plays on a STB. I
have few questions regrading it:

How can I specify a frame structure in .ts file like : IBBPBBP... or
IBBBPBBBP...?

How can I change/specify PID value of audio/video track during/after the
encode?

Can I change PCR interval in mpeg-ts file?

Thanks!
atv_ffmpeg
2010-05-07 14:00:41 UTC
Permalink
For the first question, you may set GOPSIZE

2010/5/7 Dennis Perov <mediastream at gmail.com>
Post by Dennis Perov
Gents,
I'm trying to produce mpegts file with h.264/ac3 so it plays on a STB. I
How can I specify a frame structure in .ts file like : IBBPBBP... or
IBBBPBBBP...?
How can I change/specify PID value of audio/video track during/after the
encode?
Can I change PCR interval in mpeg-ts file?
Thanks!
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Mike Scheutzow
2010-05-07 17:33:31 UTC
Permalink
Post by Dennis Perov
Gents,
I'm trying to produce mpegts file with h.264/ac3 so it plays on a STB. I
How can I specify a frame structure in .ts file like : IBBPBBP... or
IBBBPBBBP...?
Yes. -g specifies number of frames in a GOP. -bf specifies number of B
frames.

For a more complete listing, you can use:

ffmpeg -h
Post by Dennis Perov
How can I change/specify PID value of audio/video track during/after the
encode?
You can't specify this on the ffmpeg command line. The FFmpeg mpegts mux
uses a fixed algorithm to select the PID values.
Post by Dennis Perov
Can I change PCR interval in mpeg-ts file?
You can't specify this on the ffmpeg command line. The FFmpeg mpegts mux
uses a fixed interval.

Be aware the the mpegts file output from ffmpeg is not very friendly to
set top boxes. However, software decoders can usually play the .ts
without a problem.


Mike Scheutzow
mike.scheutzow at alcatel-lucent.com
Dennis Perov
2010-05-10 21:00:52 UTC
Permalink
Post by Mike Scheutzow
Post by Dennis Perov
Gents,
I'm trying to produce mpegts file with h.264/ac3 so it plays on a STB. I
How can I specify a frame structure in .ts file like : IBBPBBP... or
IBBBPBBBP...?
Yes. -g specifies number of frames in a GOP. -bf specifies number of B
frames.
? ? ? ?ffmpeg -h
Post by Dennis Perov
How can I change/specify PID value of audio/video track during/after the
encode?
You can't specify this on the ffmpeg command line. The FFmpeg mpegts mux
uses a fixed algorithm to select the PID values.
Post by Dennis Perov
Can I change PCR interval in mpeg-ts file?
You can't specify this on the ffmpeg command line. The FFmpeg mpegts mux
uses a fixed interval.
Be aware the the mpegts file output from ffmpeg is not very friendly to
set top boxes. However, software decoders can usually play the .ts
without a problem.
Thank you for the most coherent answer.

is there an alternative to ffmpeg for MPEG2 operations (CLI and Open Source)?
I need to capture UDP feed, demux it, encode AV tracks, mux it back to
.TS preserving CC PIDs and metadata PID.

What would be a better tool to manipulate ts container demux/mux/edit PID ?

Thanks.
Dennis.
Mike Scheutzow
2010-05-12 15:22:47 UTC
Permalink
Post by Dennis Perov
Thank you for the most coherent answer.
is there an alternative to ffmpeg for MPEG2 operations (CLI and Open Source)?
I need to capture UDP feed, demux it, encode AV tracks, mux it back to
.TS preserving CC PIDs and metadata PID.
What would be a better tool to manipulate ts container demux/mux/edit PID ?
I've recently been working with h264/aac in transport stream, and every
transport stream muxer tool has lacked a critical feature or had
unacceptable bugs or both. I've tried:

FFmpeg, Rhozet, Elecard XMuxerPro (paid version), Smartlabs tsMuxeR GUI
(free version).

The lack of usefullness of the available tools for mpegts is a surprise
to me, because Transport Stream has been around for so long.

So, this means I don't have any good suggestions for existing tools to
accomplish the kind of task you describe.


Mike Scheutzow
Baptiste Coudurier
2010-05-12 19:32:38 UTC
Permalink
Hi Mike,
Post by Mike Scheutzow
Post by Dennis Perov
Thank you for the most coherent answer.
is there an alternative to ffmpeg for MPEG2 operations (CLI and Open Source)?
I need to capture UDP feed, demux it, encode AV tracks, mux it back to
.TS preserving CC PIDs and metadata PID.
What would be a better tool to manipulate ts container demux/mux/edit PID ?
I've recently been working with h264/aac in transport stream, and every
transport stream muxer tool has lacked a critical feature or had
FFmpeg, Rhozet, Elecard XMuxerPro (paid version), Smartlabs tsMuxeR GUI
(free version).
The lack of usefullness of the available tools for mpegts is a surprise
to me, because Transport Stream has been around for so long.
So, this means I don't have any good suggestions for existing tools to
accomplish the kind of task you describe.
I thought you were working to fix this :)
All your patches have been applied AFAIK, if not please ping me.

On the other, latest svn produces TS files containing H264+AAC that
works perfectly on iphone/ipad.
--
Baptiste COUDURIER
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
Continue reading on narkive:
Loading...