Hi there,
may i have help to convert a .ts (camcorder) file into a .mp4?
I am trying to use this script:
for i in *.ts; do ORIGINAL=`basename $i .ts`; NEWNAME=${ORIGINAL}.mp4; ffmpeg -i $i -sameq -ar 44100 -ab 128k -ac 2 $NEWNAME; done
or:
for i in *.ts; do ORIGINAL=`basename $i .ts`; NEWNAME=${ORIGINAL}.mp4; ffmpeg -i $i -s 864x480 -b 360k -bt 416k -aspect 16:9 -r 25 -vcodec libx264 -ac 2 -ar 44100 -ab 96k -threads 4 $NEWNAME; done
Video is correct more or less... but audio is missing.
Anyone can help me?
Thank you!
Filippo
convert ts to mp4
Re: convert ts to mp4
Moving to Tiki Bar as this is not a HandBrake question.
-
- Posts: 39
- Joined: Wed Nov 02, 2011 9:21 am
Re: convert ts to mp4
That's the answer:
for i in *.ts; do newname=`basename $i .ts`.mp4; ffmpeg -map 0.0:0.0 -map 0.1:0.1 -map 0.2:0.2 -i $i -vcodec copy -acodec copy $newname -acodec copy -newaudio; done
for i in *.ts; do newname=`basename $i .ts`.mp4; ffmpeg -map 0.0:0.0 -map 0.1:0.1 -map 0.2:0.2 -i $i -vcodec copy -acodec copy $newname -acodec copy -newaudio; done
-
- Posts: 24
- Joined: Sat Nov 05, 2011 10:22 pm
Re: convert ts to mp4
That isn't the answer he just moved your post to the tiki bar because your question doesn't seem like a handbrake question. What I assume are encode settings that you posted don't look like x.264 settings to me but I could be wrong Im not a developer or anyone particularly smart but if your audio is missing but the video is coming out right for you maybe you can try muxing the audio from the ts into the mp4.