Video is shown as audio after upload on server
I recorded a video (Ocam, Windows10) and tested it.
It works fine but when I upload it, it only shows an audio file on the server. When I convert it with Windows Movie Maker, it works fine. Here are both files for a very short 2 second example.
Here are the links to the files:
Before conversion - audio only, video after download https://neurodermitis-gesund.de/test/test.mp4
After conversion https://neurodermitis-gesund.de/test/test_converted.mp4
I am interested in why this works after the conversion and not before as video format frames per second etc. are the same for both files.
I asked this question on webmasters already and they closed it and recommended me to ask it on SuperUsers
Solution 1:
I am interested in why this works after the conversion and not before as video format frames per second etc. are the same for both files.
It's likely important to remember that .mp4
is a container format for different sets of data streams (video and audio). And those streams aren't guaranteed to work across all software, services or devices (i.e. whatever is interpreting the file may not fully understand it).
Expanding on my original comment, the codecs/audio formats between your original Ocam recording and your converted recording are different. You can see this with a tool such as ffprobe (available with e.g. Windows builds of ffmpeg). Setting aside more minor differences, these two videos clearly use different video and audio streams:
-
test.mp4:
Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D) Audio: mp3 (mp4a / 0x6134706D)
-
test_conversion.mp4
Video: h264 (High) (avc1 / 0x31637661) Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz
It works fine but when I upload it, it only shows an audio file on the server.
In personal testing, an Android 10 (*nix-based) device was able to play the audio (.mp3
) stream (but not the video stream) for test.mp4
. However, Windows 10 played both files perfectly well.
At a guess, if the server is *nix-based, it seems plausible that the server may be able to read the .mp3
audio stream of test.mp4
but not the video stream. So it treats it as the part it can read (i.e. as an audio file).