Closed Veldrovive closed 2 years ago
The invalid character
issue was with docker on mac, not with ffmpeg.js
. I needed to give docker more memory to build.
I am still having issues with getting the built version to work with my ts files. I feel like I am shooting in the dark and I cannot find resources on building with support for certain file types. What I know is that my ts file is actually just a MPEG with a different file extension. My computer says that the codes are AAC, H.264
. Based on this, it seems that the basic build should work since it already has decoder support for both of these.
I am not sure what I'm missing here.
Update:
A comment on my stack overflow post let me solve this.
Are you re-encoding (ffmpeg -i input.ts output.mp4) or only re-muxing/stream copying (ffmpeg -i input.ts -c copy output.ts)?
This meant the problem was with the muxer. Specifically, I had put mpegts
under the decoders section as I misunderstood the difference. Moving it to the demuxer section fixed that issue.
There was a second problem as well. FFmpeg.js
builds with the --disable-all
option which means that it also disables a lot of other stuff.
--enable-bsf=aac_adtstoasc
to the configure call.--enable-parser=h264
and --enable-parser=aac
for the video to mux correctly (Source).--enable-protocol=concat
.@Veldrovive Could you link your stack overflow post?
Here is the link: https://stackoverflow.com/questions/69842795/ffmpeg-custom-build-support-for-converting-ts-to-mp4-files
Thanks you @Veldrovive for investigation! Greatly appreciated. Also Upvoted your stackoverflow question && answer.
I am able to transcode
mkv
files tomp4
, but I am not sure how to build withts
file support. For the sake of clarity, attempting to transcode ats
file results insample.ts: Invalid data found when processing input
.Since the only thing I changed was the file type, I assume this is because default versions were not built with support for
ts
.Based on a quick search, I believe
ts
files useMPEG2-TS
for encoding, but I really don't understand enough about video types and how a codec relates to a file extension to be certain of that.I am also not sure how to add support for that encoding type. Based on random guessing, I would assume that you would add
MPEG2-TS
to the lineCOMMON_DECODERS = vp8 h264 vorbis opus mp3 aac pcm_s16le mjpeg png
in the make file, but I would like verification on that.I would just verify it myself by building, but when I run the build script in the docker container, I get the error
error waiting for container: invalid character 'u' looking for beginning of value
. Since I exactly followed the steps outlined in the README and used a docker container, I am not sure what caused this. It also seems to crash the docker daemon as runningdocker ps
after yieldsError response from daemon: Bad response from Docker engine
until I restart docker entirely.Full output of build process here: https://pastebin.com/2syUH7ph