[FFmpeg-user] Transport Stream (.ts) with ac3 audio

Andy Furniss adf.lists at gmail.com
Thu Feb 13 16:48:34 CET 2014


Michael Thaler wrote:
> if I check the .ts files with FFprobe, I get this for the ac3
> stream:
>
> Created by FFmpeg: codec_tag_string=[129][0][0][0] codec_tag=0x0081
>
>
> Created by others: codec_tag_string=[6][0][0][0] codec_tag=0x0006
>
>
> My question is, can I set codec_tag and codec_tag_string by FFmpeg
> with -metadata  ?

If this is just to test for personal use you can effectively do the same
by building your own ffmpeg with this diff applied (or just edit by
hand). Result of one test I did = still plays with mplayer - you may not
be so lucky with hardware or other sowtware ...

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 9b42e48..b6cf1f9 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -309,7 +309,7 @@ static void mpegts_write_pmt(AVFormatContext *s, 
MpegTSService *service)
              stream_type = STREAM_TYPE_AUDIO_AAC_LATM;
              break;
          case AV_CODEC_ID_AC3:
-            stream_type = STREAM_TYPE_AUDIO_AC3;
+            stream_type = STREAM_TYPE_PRIVATE_DATA;
              break;
          default:
              stream_type = STREAM_TYPE_PRIVATE_DATA;


More information about the ffmpeg-user mailing list