
The next example will re-encode both video and audio: ffmpeg -i input.ts -c:v libx264 -c:a aac output.mp4 This will re-encode the video to H.264 and stream copy the audio: ffmpeg -i input.ts -c:v libx264 -c:a copy output.mp4 If in doubt re-encode to H.264 + AAC as shown below.Your player/device may not support all arbitrary, less common, or legacy formats even if they are supported by MP4.If your inputs formats are not compatible with MP4 you will get an error.This will stream copy (re-mux) all streams: ffmpeg -i input -map 0 -c copy output.mp4 Since Matroska can handle most arbitrary streams I included -map 0. Otherwise it will use the default stream selection behavior which would only result in one stream per stream type being selected. The -map 0 option is used to include all streams. This will stream copy (re-mux) all streams: ffmpeg -i input -map 0 -c copy output.mkv 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. 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". avconv -i 10MB.ts -c:v copy -c:a libfaac 10MB.mp4ĮDIT: I tried VLC as suggested by It was almost perfect. I also tried the CLI command suggested in the comments of another question. Stream #0.1: Audio: aac, 0 channels, fltp, 144 kb/s

This is quite puzzling, because avconv seems to have correctly detected the audio stream. The output file has the right video, but no sound, at least when played with VLC. avconv -i 10MB.ts -vcodec copy -acodec copy 10MB.mpg That failed with the error message "Incompatible audio / For DVD, audio must be 48 kHz MP2 (stereo), AC3, DTS or LPCM (stereo)".


I tried avidemux with the settings "copy" for the video and audio streams, and the "PS" container format for MPEG.

ts files into something useful? question. 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).
