No, i’m not an encoder. And it’s apparent. Not to mention i’m using linux, so it’s not even as simple as grabbing a random Free MPEG-2 To H264 (30 days trial) (not malware) (confirmed download) and hope it works.

Problem is that when i record Phi Brain, sometimes there’s this weird show before it, and i end up recording a few minutes of that as well because of the safety margin. However, that show is aired in 4:3 instead of 16:9 and i think even the audio encoding might be different, not to mention the switch messes up all the headers possible, so no players are willing to open it (the only one that could open it was actually WMP and honestly, i’d prefer not having to reboot to Windows or using a virtual machine).

So i wanted to reencode the transport stream into some more usable format. Encoding the video is the easy part: just run x264 with some basic settings and there i go. But the audio…

Just identifying the correct stream in tsinfo took effort (since apparently that show before has dual audio of an English and Japanese stream, stuffed in under the same PID), then exporting it with ts2es, then transcoding it with ffmpeg, and hoping it would work at all, then hoping again it would work if i muxed it together with the video…

But at least it worked then. A pain in the ass.