14
11
So i have users saying H264 videos MP4's dont play audio on Apple's IPad and i struggle to get MP4 videos to play properly on Android too.
There are two different command lines what command line is the one that i should be using.
-profile:v baseline -level 3.0
And :
-vpre baseline
What one should i use that will make it work accross all devices ?
I have also read it could be the audio bitrate my current audio bitrate is
-ab 192k
Perhaps i should lower it to
-ab 160k
Command line used to encode MP3 audio into MP4 files.
"C:/server/ffmpeg/bin/ffmpeg.exe" -y -i Z:/server/websites/ps/public_www/media/com_hwdmediashare/files/55/ac/fb/54bbf30bb11a0f6b9dc832114c26fd29.mp4 -strict experimental -acodec libmp3lame -ar 44100 -ac 2 -ab 192k -s 480x360 -aspect 16:9 -r 24000/1001 -vcodec libx264 -b:v 1000k -minrate 800k -maxrate 1000k -bufsize 800K -crf 18 -preset veryslow -f mp4 -threads 0 -movflags +faststart Z:/server/websites/ps/public_www/media/com_hwdmediashare/files/55/ac/fb/98382d43d31d4ff91ea44cb2aa1bbc49.mp4 2>&1
1Thanks for such a detailed answer i keep re-reading it :) Also i encode with -acodec libmp3lame -ab 160k and users using ipad apple devices are saying they could watch the video but not hear sound so i assume it was something to do with the audio codec or bitrate. Android and Windows Users say it is fine and they have audio to the video stream so i am unsure why using libmp3lame instead of aac would cause apple users to have no audio to the video. – C0nw0nk – 2014-12-31T22:32:03.587
I've rarely seen MP3 audio used in MP4 containers. Perhaps AAC is the safer choice. – slhck – 2014-12-31T23:34:24.737
Well i am only using MP3 because i kept getting bit_rate, width height errors with aac i switched to libmp3lame and all those errors stop and then apple users say they have no audio but yet everyone else can watch the same file and it is fine with sound on all other devices, Perhaps i found a bug who knows :( And according to apple MP3 should be fine https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html#//apple_ref/doc/uid/TP40008332-CH102-SW8
– C0nw0nk – 2014-12-31T23:42:42.697@user2068371 That link refers to MPEG-2 transport stream, not MP4 container format. – llogan – 2015-01-01T02:39:45.270
I use http://mediaelementjs.com/ as my media player and perhaps this might be something to do with it i dont know http://helpx.adobe.com/flash/kb/supported-codecs-flash-player.html But mediaelement is a javascript built html5 player so i dont think it would be using flash player. Another user who encounterd this same problem. http://stackoverflow.com/questions/26311077/encode-ios-compatible-h264-audio-stream-with-ffmpeg?answertab=active#tab-top
– C0nw0nk – 2015-01-01T10:04:32.2031
@user2068371 I've never had problems with MediaElementjs. H.264 and MP3 is not supported in all browsers. For HTML5 video specifically, always use H.264/AAC and possibly VP8/Vorbis as a fallback. If you have problems with an AAC conversion, please ask a new question about that and make sure to include the full command line output as well.
– slhck – 2015-01-01T10:14:14.427This does not work on iOS for me. It just shows a play button and when I click it nothing happens – clocksmith – 2015-05-18T21:44:15.763
@clocksmith Do you have a sample? Encoding log? – slhck – 2015-05-18T22:23:36.093