I compiled ffmpeg for Android. The executable works from the device terminal and I can do normal video operations. I am trying to join 2 mpeg files captured using the camera at the command line on the device.
First I Capture 2 videos using the camera and save to sdcard, one.mpeg and two.mpeg. Then I do:
ffmpeg -i one.mpeg onenew.mpeg
ffmpeg -i twompg.mpeg twonew.mpeg
(if i dont do the above 2 commands then it doesnt work at all)
cat onenew.mpeg twonew.mpeg > joined.mpeg
ffmpeg -i joined.mpeg -acodec copy -vcodec copy final.mpeg
The output (final.mpeg) doesnt play on the device but if i copy to my linux desktop it opens up and plays fine. I tested final.mpeg on a 2.3.3 device and a 2.3.6 device.
Anyone know why the device would fail to play the video file?
UPDATE
My friend tested the video on a device running 3.0, the default player never played the video however ‘moboplayer’ did, I need it to play on the default player though.
http://ffmpeg.mplayerhq.hu/faq.html#How-can-I-concatenate-video-files_003f
read sect 3.14.2 in the above link. Lots of work has been done on concatenating media files in an ffmpeg env on linux and it should not really be any different on your android device.
running ffmpeg in terminal on a phone should be just like running in linux ( just like the samples doing cat in the faq )
Test it on linux
then
the same expressions should run on your android device.
You just need to get a filetype suitable for concatenation then use the F-system to cat the files.