I'm trying to edit a TS-file which I fetched from my VU+ set top box.
First I tried to rename it from .ts to .mpeg, then I tried to read it into Avidemux.
The first question was if I want to index the file, which I did.
After a while (near the end of file) I got the following error message:
"Crash

Assert failed :i==nbAudioStream
at line 188, file /build/build-avidemux_2.5.6-1~getdeb2-amd64-ZGvDMc/avidemux-2.5.6/avidemux/ADM_inputs/ADM_mpegdemuxer/dmx_audio.cppADM_backTrack
dmxAudioStream::open(char const)
dmxHeader::open(char const
)
ADM_Composer::addFile(char const*, unsigned char, fileType)
ADM_Composer::addFile(char const*, unsigned char, fileType)
avidemux2_gtk() [0x4538f7]
FileSel_ReadWrite(void ()(char const), int, char const*, char const)
avidemux2_gtk() [0x52bc15]
HandleAction(Action)
guiCallback(_GtkMenuItem
, void*)

g_signal_emit_valist
g_signal_emit_by_name

g_signal_emit_valist
g_signal_emit

g_closure_invoke

g_signal_emit_valist
"

How can I solve this problem ?

Dani AI

Generated

The Avidemux assert shown by (failure in the MPEG demuxer complaining about audio-stream indexing) is a demuxer/container problem rather than a codec problem. Renaming the file does not change container contents (as hinted). The simplest, non-destructive fix is to inspect and then remux the transport stream into a more tolerant container so the demuxer sees consistent stream tables.

Quick diagnostics (list streams and container info):

ffprobe -v error -show_entries format:stream -print_format json input.ts
# or, where avprobe is available:
avprobe -v error -show_streams input.ts

Safe remux (no re-encode) to rebuild headers and PMT/stream tables:

ffmpeg -probesize 50M -analyzeduration 50M -i input.ts -c copy -map 0 output.mkv
# or with avconv:
avconv -probesize 50M -analyzeduration 50M -i input.ts -c copy -map 0 output.mkv

If Avidemux still fails, extract video and audio streams explicitly and repackage them (this forces fresh stream numbering):

ffmpeg -i input.ts -map 0:v:0 -c copy video.h264
ffmpeg -i input.ts -map 0:a:0 -c copy audio.ac3
ffmpeg -i video.h264 -i audio.ac3 -c copy output.mkv

Notes and troubleshooting tips: increase -probesize/-analyzeduration for poorly signalled TS files, use -map 0 to keep all streams, and remuxing to MKV is usually safer than forcing a program-MPEG .mpg. If streams are badly mangled at PID/PMT level the above will still help in most cases; if not, rebuilding with a single audio track (re-encode audio) or using a newer Avidemux build is the next step. ’s suggestion to use ffmpeg/avconv for container fixes is on the right track — remuxing almost always resolves demuxer assertions caused by container inconsistencies.

Recommended Answers

All 4 Replies

I'm not familiar with TS or VU+ formats but, in general, you can not simply rename files and expect that they will be interpreted differently.

Is Avidemux capable of handling TS files?

Well, it should - but when I try to read the "raw" ts-file into Avidemx I get the same error message as given above..

.ts is the same as "MPEG transport stream" and is a common format used by satelite decoders when recording tv-shows.....

Are you sure it isn't DRM-encumbered? It may be encrypted on the box, so that you can't just download it and play with other stuff...

In any case, the current version of ffmpeg should be able to transcode .ts files to others. Do you have ffmpeg installed on your system? If not, download and install it.

There are examples in the ffmpeg manpage that show how it can be done.

ffmpeg is no longer available in my Ubuntu repository. It is replaced by avconv.
The file is NOT DRM-encumbered or encrypted in any way. I usually use VLC media player to play these files on my Ubuntu system (or on my Samsung Galaxy S2 as well).

I have used avconv version 0.8.5-6:0.8.5-1 to convert from .ts to .mpg. Then I'm able to load the file into OpenShot Video Editor, but Avidemux does not show anything even if it loads the file...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.