VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 35
Thread
  1. I have a TS file below with 5 streams (1 video and 4 audio). I want to demux the video stream and only one audio stream. What the best soft I will have to use?

    Code:
    General
    ID                                       : 1222 (0x4C6)
    Complete name                            : C:\000\3. Lib.ts
    Format                                   : BDAV
    Format/Info                              : Blu-ray Video
    File size                                : 259 MiB
    Duration                                 : 2mn 10s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 16.7 Mbps
    
    Video
    ID                                       : 273 (0x111)
    Menu ID                                  : 39104 (0x98C0)
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4.0
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 2 frames
    Format settings, GOP                     : M=3, N=15
    Codec ID                                 : 27
    Duration                                 : 2mn 10s
    Bit rate mode                            : Variable
    Maximum bit rate                         : 24.0 Mbps
    Width                                    : 1 920 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 29.970 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Interlaced
    Scan order                               : Top Field First
    Color primaries                          : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
    Transfer characteristics                 : BT.709-5, BT.1361
    Matrix coefficients                      : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177
    
    Audio #1
    ID                                       : 274 (0x112)
    Menu ID                                  : 39104 (0x98C0)
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : HE-AAC / LC
    Muxing mode                              : LATM
    Codec ID                                 : 17
    Duration                                 : 2mn 10s
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 48.0 KHz / 24.0 KHz
    Compression mode                         : Lossy
    Delay relative to video                  : -328ms
    Language                                 : Portuguese
    
    Audio #2
    ID                                       : 275 (0x113)
    Menu ID                                  : 39104 (0x98C0)
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : HE-AAC / LC
    Muxing mode                              : LATM
    Codec ID                                 : 17
    Duration                                 : 2mn 10s
    Channel(s)                               : 6 channels
    Channel positions                        : Front: L C R, Side: L R, LFE
    Sampling rate                            : 48.0 KHz / 24.0 KHz
    Compression mode                         : Lossy
    Delay relative to video                  : -340ms
    Language                                 : Portuguese
    
    Audio #3
    ID                                       : 276 (0x114)
    Menu ID                                  : 39104 (0x98C0)
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : HE-AAC / LC
    Muxing mode                              : LATM
    Codec ID                                 : 17
    Duration                                 : 2mn 10s
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 48.0 KHz / 24.0 KHz
    Compression mode                         : Lossy
    Delay relative to video                  : -310ms
    Language                                 : Portuguese
    
    Audio #4
    ID                                       : 277 (0x115)
    Menu ID                                  : 39104 (0x98C0)
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : HE-AAC / LC
    Muxing mode                              : LATM
    Codec ID                                 : 17
    Duration                                 : 2mn 10s
    Channel(s)                               : 6 channels
    Channel positions                        : Front: L C R, Side: L R, LFE
    Sampling rate                            : 48.0 KHz / 24.0 KHz
    Compression mode                         : Lossy
    Delay relative to video                  : -364ms
    Language                                 : Portuguese
    
    Menu
    ID                                       : 257 (0x101)
    Menu ID                                  : 39104 (0x98C0)
    List                                     : 273 (0x111) (AVC) / 274 (0x112) (AAC, Portuguese) / 275 (0x113) (AAC, Portuguese) / 276 (0x114) (AAC, Portuguese) / 277 (0x115) (AAC, Portuguese) / 278 (0x116) ()
    Language                                 :  / Portuguese / Portuguese / Portuguese / Portuguese
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Tsmuxer
    Quote Quote  
  3. When I use tsRemux choosing only the audio file (see the attached file), the extracted stream is in MPEG Audio format, It is different for the original in TS file, that was AAC.

    Specs. of the extracted audio:

    Code:
    General
    ID                                       : 1 (0x1)
    Complete name                            : C:\000\audio19.aac
    Format                                   : BDAV
    Format/Info                              : Blu-ray Video
    File size                                : 5.27 MiB
    Duration                                 : 2mn 10s
    Overall bit rate                         : 339 Kbps
    Maximum Overall bit rate                 : 35.5 Mbps
    
    Audio
    ID                                       : 4352 (0x1100)
    Menu ID                                  : 1 (0x1)
    Format                                   : MPEG Audio
    Codec ID                                 : 4
    Duration                                 : 2mn 10s
    Compression mode                         : Lossy
    Image Attached Thumbnails Click image for larger version

Name:	tsRemux.jpg
Views:	7692
Size:	60.6 KB
ID:	18529  

    Quote Quote  
  4. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Quote Quote  
  5. Baldrick already replied about demuxing.

    When I use tsRemux choosing only the audio file (see the attached file), the extracted stream is in MPEG Audio format, It is different for the original in TS file, that was AAC.
    There is something odd here.

    Video
    Format : BDAV Format/Info : Blu-ray Video

    Audio Format : AAC Format/Info : Advanced Audio Codec Format profile : HE-AAC / LC

    This TS is not from BluRay.
    When did AAC get divorced with MP4? It looks like MP4 container renamed to TS - A fox under lion skin. or muxed into a wrong container. It would not be a fault of tsRemux looking for lions and not recognizing a fox underneath.
    Last edited by enim; 26th Jun 2013 at 09:51.
    Quote Quote  
  6. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by enim View Post
    When did AAC get divorced with MP4? It looks like MP4 container renamed to TS - A fox under lion skin. or muxed into a wrong container.
    Incorrect. AAC has never been married to MP4 , to begin with.
    Especially because it was actually born in the "MPEG-2 World"

    https://forum.videohelp.com/threads/329917-MPC-HC-with-a-MPEG-4-TS-file?p=2196284&viewf...=1#post2196284
    Quote Quote  
  7. Incorrect. AAC has never been married to MP4
    I have tons of MP4+AAC babies over internet streaming, seen not a single baby MP4+DTS7.1.
    May be the all babies without marriage?
    Quote Quote  
  8. Originally Posted by Baldrick View Post
    When I use tsMuxer It returns the message: "Some tracks not recognized. This tracks was ignored."
    See the attached file.
    Image Attached Thumbnails Click image for larger version

Name:	tsMuxer.jpg
Views:	6810
Size:	65.7 KB
ID:	18530  

    Quote Quote  
  9. When I use tsMuxer It returns the message: "Some tracks not recognized.
    tsMuxer did recognize at least the Lion Skin.

    just try
    rename ts to mp4 and try mp4box to demux.
    Last edited by enim; 26th Jun 2013 at 10:21.
    Quote Quote  
  10. Originally Posted by enim View Post
    just try
    rename ts to mp4 and try mp4box to demux.
    Renaming the file to .mp4 and using MP4Box, this error occurs:
    Image Attached Thumbnails Click image for larger version

Name:	mp4box.jpg
Views:	7430
Size:	58.9 KB
ID:	18531  

    Quote Quote  
  11. there are too many MP4Box versions floating around, some are buggy, some are too buggy and a few works.
    in your case i would rather say TS improperly muxed. As error says IsoMedia file is truncated, I guess screwed up headers.

    Try converting your TSfile using some freebies - editors or convertors that offers you Video stream copy and convert only audio stream(s) (selected with stream id) to either DTS or AC3. If you have to... have to convert video stream to try to maintain same as your source: Maximum bit rate : 24.0 Mbps Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 29.970 fps.
    Last edited by enim; 26th Jun 2013 at 10:37.
    Quote Quote  
  12. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    You can also try mkvtoolnix (mkvmergegui), open the ts, disable the audio tracks, make a new mkv.
    Quote Quote  
  13. Originally Posted by enim View Post
    there are too many MP4Box versions floating around, some are buggy, some are too buggy and a few works.
    in your case i would rather say TS improperly muxed. As error says IsoMedia file is truncated, I guess screwed up headers.

    Try converting your TSfile using some freebies - editors or convertors that offers you Video stream copy and convert only audio stream(s) (selected with stream id) to either DTS or AC3. If you have to... have to convert video stream to try to maintain same as your source: Maximum bit rate : 24.0 Mbps Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 29.970 fps.
    This .TS file was generated by a HDTV receiver model ZBT-650n.
    Quote Quote  
  14. This .TS file was generated by a HDTV receiver model ZBT-650n.
    Hardware encoded. Oooh!

    Bladrick suggestion for Moritz Bunkus - mkvmerge GUI (mmg) looks appealing as it can do more than muxing.
    Hopefully you can select Video and selected Audio (AAC) - as is to re-mux into MKV.
    mkvmerge --identify-verbose "C:\000\3. Lib.ts", for more information.
    mkvextract tracks "C:\000\3. Lib.ts" --raw 1:video.h264 2:audio2.aac 3:audio3.aac 4:audio4.aac
    Where, the track IDs must be the same as the ones output by mkvmerge --identify option.

    Roglopes, I would like you to post your inputs and feedback once you solve this puzzle.
    Last edited by enim; 26th Jun 2013 at 13:21.
    Quote Quote  
  15. Renegade gll99's Avatar
    Join Date
    May 2002
    Location
    Canadian Tundra
    Search Comp PM
    Originally Posted by roglopes View Post
    Originally Posted by Baldrick View Post
    When I use tsMuxer It returns the message: "Some tracks not recognized. This tracks was ignored."
    See the attached file.
    I got that same error in tsMuxer when I had an m2ts file with the extension .ts. After I renamed it to .m2ts tsMuxer handled it fine. That may not be the exact extent of your file but I too believe it's probably as simple as a misidentified extent.
    There's not much to do but then I can't do much anyway.
    Quote Quote  
  16. Originally Posted by enim View Post
    This .TS file was generated by a HDTV receiver model ZBT-650n.
    Hardware encoded. Oooh!

    Bladrick suggestion for Moritz Bunkus - mkvmerge GUI (mmg) looks appealing as it can do more than muxing.
    Hopefully you can select Video and selected Audio (AAC) - as is to re-mux into MKV.
    mkvmerge --identify-verbose "C:\000\3. Lib.ts", for more information.
    mkvextract tracks "C:\000\3. Lib.ts" --raw 1:video.h264 2:audio2.aac 3:audio3.aac 4:audio4.aac
    Where, the track IDs must be the same as the ones output by mkvmerge --identify option.

    Roglopes, I would like you to post your inputs and feedback once you solve this puzzle.
    Enin, here the result of mkvmerge:
    Image Attached Thumbnails Click image for larger version

Name:	mkvmerge01.jpg
Views:	6490
Size:	25.8 KB
ID:	18535  

    Quote Quote  
  17. Originally Posted by gll99 View Post
    Originally Posted by roglopes View Post
    Originally Posted by Baldrick View Post
    When I use tsMuxer It returns the message: "Some tracks not recognized. This tracks was ignored."
    See the attached file.
    I got that same error in tsMuxer when I had an m2ts file with the extension .ts. After I renamed it to .m2ts tsMuxer handled it fine. That may not be the exact extent of your file but I too believe it's probably as simple as a misidentified extent.
    Even renaming to m2ts, tsMuxer keeps returning the message. "Some tracks not recognized. This tracks was ignored."
    Quote Quote  
  18. ffmpeg -i input.ts -map 0:4 -acodec copy output.aac

    make sure input file has no spaces (rename it)
    Quote Quote  
  19. Originally Posted by Baldrick View Post
    You can also try mkvtoolnix (mkvmergegui), open the ts, disable the audio tracks, make a new mkv.
    I want the audio too !!
    The problem is with the audio streams, the video stream the tsMuxer can demux.
    Quote Quote  
  20. ffmpeg -i input.ts -map 0:4 -acodec copy output.aac
    In -map 0:4 option, which audio stream will be the output, 0 or 4?
    Try converting your TSfile using some freebies - editors or convertors that offers you Video stream copy and convert only audio stream(s) (selected with stream id) to either DTS or AC3. If you have to... have to convert video stream to try to maintain same as your source: Maximum bit rate : 24.0 Mbps Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 29.970 fps.

    Quote Quote  
  21. Originally Posted by enim View Post
    ffmpeg -i input.ts -map 0:4 -acodec copy output.aac
    In -map 0:4 option, which audio stream will be the output, 0 or 4?

    4th audio stream

    0.0 is usually 1st video stream
    0.1 is usually 1st audio stream
    0.2 is usually 2nd audio stream
    .
    .

    You can use ffmpeg -i input.ext and it will print the stream information for that specific file, according to ffmpeg (other programs might use different numbering schemes for track id or numbers)
    Quote Quote  
  22. Originally Posted by enim View Post
    ffmpeg -i input.ts -map 0:4 -acodec copy output.aac
    In -map 0:4 option, which audio stream will be the output, 0 or 4?
    Try converting your TSfile using some freebies - editors or convertors that offers you Video stream copy and convert only audio stream(s) (selected with stream id) to either DTS or AC3. If you have to... have to convert video stream to try to maintain same as your source: Maximum bit rate : 24.0 Mbps Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 29.970 fps.

    Using ffmpeg I can extract the audio, but the It isn't playable. It doesn't have any specification.
    Image Attached Thumbnails Click image for larger version

Name:	mediaInfo.jpg
Views:	7373
Size:	22.6 KB
ID:	18536  

    Quote Quote  
  23. Originally Posted by roglopes View Post

    Using ffmpeg I can extract the audio, but the It isn't playable. It doesn't have any specification.

    What software did you try playing it with ? Try VLC, or SMPlayer

    You can also try wrapping it in mp4 container if it's a software playback problem

    ffmpeg -i input.ts -map 0:4 -acodec copy output.mp4
    Quote Quote  
  24. thanks poisondeathrey,
    I have absolute zero experience with ffmpeg, trying to read ffmpeg documentaion.

    reglopes,
    Are You able to play sourceVideo.TS file in any media player?
    try something like this : ffmpeg -i input.ts -map 0:4 -acodec copy -vcodec copy -formats mkv (or mp4) output.mkv (or output.mp4)

    the last resource:
    Try converting your TSfile using some freebies - editors or convertors that offers you Video stream copy and convert only audio stream(s) (selected with stream id) to either DTS or AC3. If you have to... have to convert video stream to try to maintain same as your source: Maximum bit rate : 24.0 Mbps Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 29.970 fps.
    Last edited by enim; 26th Jun 2013 at 14:32.
    Quote Quote  
  25. If you can't get ffmpeg to demux it properly (sometimes it doesn't write the proper header information) , try demuxing with eac3to

    eac3to input.ts -demux

    This will demux all tracks, to get individual tracks you have to use the stream id (it sometimes different than ffmpeg's numbering, it might be 4 or 5 for example , you have to look at the info given by eac3to for the precise track numbering)

    Code:
    eac3to input.ts 4:output.aac
    Quote Quote  
  26. Originally Posted by poisondeathray View Post
    If you can't get ffmpeg to demux it properly (sometimes it doesn't write the proper header information) , try demuxing with eac3to

    eac3to input.ts -demux

    This will demux all tracks, to get individual tracks you have to use the stream id (it sometimes different than ffmpeg's numbering, it might be 4 or 5 for example , you have to look at the info given by eac3to for the precise track numbering)

    Code:
    eac3to input.ts 4:output.aac
    It works, using eac3to I can extract the audio stream.
    The problem now is when I'll create a mkv file, the video was accepted by the audio not.

    mkvMerge:
    Code:
    Command line used:
    
    "C:\Program Files (x86)\MKVToolNix\mkvmerge.exe" --output-charset UTF-8 --identify-for-mmg "C:\000\output001 DELAY -613ms.aac"
    
    Output:
    
    Error: File C:\000\output001 DELAY -613ms.aac has unknown type. Please have a look at the supported file types ('mkvmerge --list-types') and contact the author Moritz Bunkus <moritz@bunkus.org> if your file type is supported but not recognized properly.
    Quote Quote  
  27. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Those AACs don't use ADTS, they use LATM, maybe Mr. DeathRay knows how to convert them to ADTS through ffmpeg
    Last edited by El Heggunte; 26th Jun 2013 at 15:34. Reason: edit
    Quote Quote  
  28. Because your audio is he-aac, I think you need to include the --aac-is-sbr 1 flag in mkvmerge

    You asked how to demux it, not how to put in mkv container, but it's probably easier to do with ffmpeg in 1 step

    ffmpeg -i input.ts -map 0:0 -vcodec copy -map 0:4 -acodec copy output.mkv
    Quote Quote  
  29. Originally Posted by poisondeathray View Post
    but it's probably easier to do with ffmpeg in 1 step

    ffmpeg -i input.ts -map 0:0 -vcodec copy -map 0:4 -acodec copy output.mkv
    or he can video stream copy and use proper audio encoder (codec) available like dts or ac3 in ffmpeg and get a valid mkv with proper valid audio stream. something like ffmpeg -i input.ts -map 0:0 -vcodec copy -map 0:4 -acodec dts (or ac3) [audio encoder parameters] output.mkv

    But, OP never said anything about
    Are You able to play sourceVideo.TS file in any media player?
    Is he able to decode source audio stream successfully?
    Quote Quote  
  30. Originally Posted by El Heggunte View Post
    Those AACs don't use ADTS, they use LATM, maybe Mr. DeathRay knows how to convert them to ADTS through ffmpeg
    good point, I think it's this ? or the other way ?

    -absf aac_adts2asc
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!