I have a file that ends in .ts (e.g., here are the first 10 MB). I would like to convert it to a more main stream format (e.g., mp4, MPEG2-PS...), in a lossless way if possible (i.e., remuxing).
I have read the How do I convert .ts files into something useful? question. I tried avidemux
with the settings "copy" for the video and audio streams, and the "PS" container format for MPEG. That failed with the error message "Incompatible audio / For DVD, audio must be 48 kHz MP2 (stereo), AC3, DTS or LPCM (stereo)".
I also tried the suggested CLI command.
avconv -i 10MB.ts -vcodec copy -acodec copy 10MB.mpg
The output file has the right video, but no sound, at least when played with VLC. This is quite puzzling, because avconv
seems to have correctly detected the audio stream.
Input #0, mpegts, from '10MB.ts':
Duration: 00:00:06.36, start: 51523.824800, bitrate: 12563 kb/s
Program 37888
Stream #0.0[0x100]: Video: mpeg2video (Main), yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 20000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x110]: Audio: aac, 0 channels, fltp, 144 kb/s
Stream #0.2[0x130]: Data: [6][0][0][0] / 0x0006
Stream #0.3[0x138]: Data: [6][0][0][0] / 0x0006
Stream #0.4[0x140]: Data: [13][0][0][0] / 0x000D
Stream #0.5[0x160]: Data: [13][0][0][0] / 0x000D
Stream #0.6[0x161]: Data: [13][0][0][0] / 0x000D
Stream #0.7[0x162]: Data: [13][0][0][0] / 0x000D
Stream #0.8[0x170]: Data: [13][0][0][0] / 0x000D
Stream #0.9[0x171]: Data: [13][0][0][0] / 0x000D
Stream #0.10[0x172]: Data: [13][0][0][0] / 0x000D
Output #0, mpeg, to '10MB.mpg':
Metadata:
encoder : Lavf54.20.4
Stream #0.0: Video: mpeg2video, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], q=2-31, 20000 kb/s, 90k tbn, 90k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
I also tried the CLI command suggested in the comments of another question.
avconv -i 10MB.ts -c:v copy -c:a libfaac 10MB.mp4
Again, no sound in the output file.
EDIT: I tried VLC as suggested by @Daniel. It was almost perfect. It was fast and user friendly. I just had to click on "Convert / Save", add the input file, select the MP4 profile, configure Video codec and Audio codec to "Keep original video / audio track", choose a destination file, and click on "Start". The video looked perfect, but the audio was somehow slightly corrupted, but it might be caused by something quite exotic in the audio stream of my video.
ffmpeg
.