I am currently trying to merge two videos. Both are of .mp4 type and have originally two different resolutions. Now since mp4parser can only merge the same resolutions, I apply a cropping filter using FFMPEG.
This is my ffmpeg command: String[] cmd = {"-i", input_video.getAbsolutePath(), "-vf","crop=640:480", "-acodec", "copy", "-threads", "5", "-preset", "ultrafast" , output_video};
Hey,
I am currently trying to merge two videos. Both are of .mp4 type and have originally two different resolutions. Now since mp4parser can only merge the same resolutions, I apply a cropping filter using FFMPEG.
This is my ffmpeg command:
String[] cmd = {"-i", input_video.getAbsolutePath(), "-vf","crop=640:480", "-acodec", "copy", "-threads", "5", "-preset", "ultrafast" , output_video};
Error:
``
Cannot merge AudioSampleEntry{bytesPerSample=0, bytesPerFrame=0, bytesPerPacket=0, samplesPerPacket=0, packetSize=0, compressionId=0, soundVersion=0, sampleRate=44100, sampleSize=16, channelCount=1, boxes=[com.googlecode.mp4parser.boxes.mp4.ESDescriptorBox@1a3]} and AudioSampleEntry{bytesPerSample=0, bytesPerFrame=0, bytesPerPacket=0, samplesPerPacket=0, packetSize=0, compressionId=0, soundVersion=0, sampleRate=44100, sampleSize=16, channelCount=2, boxes=[com.googlecode.mp4parser.boxes.mp4.ESDescriptorBox@fffff9bc]}`This is the code I use to merge the two videos:
Does anyone have an idea whats going on here? Merging two videos without merging one of them when using the same resolutions works perfectly.
The "-acodec", "copy" part is because I tried to avoid any change in the audio, however this did not help either.
Cheers