Copy to new container first
Posted: Mon Sep 08, 2014 6:00 pm
I have some pesky MPEG-TS files that need to be converted to h.264, ideally in an automated way. When they come in we have found that the first step needs to be to extract the files out of the MPEG-TS container and then place them in to an MP4 container. From there we can run the encode and we'll get the whole file. However, I can't seem to figure out how to process these files using FFAStran. Here is the command we would run:
If I create a simple encoder in FFAStran that takes the original input and converts it to h.264, we'll drop the encode the first moment there is a container error. This means that we'll sometimes miss most of the video. If I try and create a custom encoder with a codec of 'copy' the software just comes back with a 'no video or audio found in media' error.
Wondering if there is a simple way to basically automate the above two commands on a folder we watch?
Code: Select all
ffmpeg -i original.ts -vcodec copy -an tmp.mp4
ffmpeg -i tmp.mp4 -vcodec libx264 -an final.mp4
Wondering if there is a simple way to basically automate the above two commands on a folder we watch?