Converting video for mobile phone
Taking a bit of a guess here without knowing the phone and its platform, but 3GP videos from ffmpeg typically contain H.264 video. Your phone records MPEG-4 Part II video, which is (more or less) the predecessor to H.264 and therefore "simpler".
Many old phones cannot play H.264 or only a strict subset of it. Given that the original video uses H.264 baseline and your phone won't play it, I guess it's not possible to watch H.264 on it.
Try MPEG-4 and MP3 audio in an AVI container – that's the go-to combination for video on older machines or before H.264 became ubiquitous:
ffmpeg -y -i video.mp4 -c:v mpeg4 -b:v 600k -c:a libmp3lame output.avi
You can also use -qscale:v 3
instead of the bitrate setting for VBR. Here, values range from 1–31 where lower is better. See the Xvid/DivX encoding guide.
If your phone supports H.264 with the baseline profile, which is for mobile targets or platforms with low computational power:
ffmpeg -y -i video.mp4 -c:v libx264 -crf 23 -profile:v baseline \
-c:a aac -strict experimental output.mp4
Change the quality by setting the CRF parameter between 18 and 28, where lower means better.
Notes on your original commands:
-
-b
is ambiguous – specify video or audio bitrate with-b:v
and-b:a
-
libvo_aacenc
offers the worst quality of all AAC encoders in ffmpeg. Use the internalaac
one, or if you can,libfdk_aac
orlibfaac
. See the AAC encoding guide.
Related videos on Youtube
![Alex Caseiro](https://i.stack.imgur.com/sk8jv.jpg?s=256&g=1)
Alex Caseiro
Updated on September 18, 2022Comments
-
Alex Caseiro almost 2 years
I usually download and watch videos from Deutsche Welle to work on my German. Lately, I have been commuting a lot and watching the videos on my mobile phone in the train would be nice.
I have tried to copy+paste the videos to the mobile phone but it was not read.
I have tried to convert it with ffmpeg, but it was not read either.
The command used, within a small cygwin bash script, was:
ffmpeg -y -i video.mp4 -r 14.65 -s 320x240 -b 389k -acodec libvo_aacenc -ac 1 -ar 8000 -ab 12k video.3gp
The characteristics of the original, downloaded, video are:
Metadata:
major_brand : mp42 minor_version : 0 compatible_brands: isom creation_time : 2014-02-10 03:54:28
Duration: 00:01:59.16, start: 0.000000, bitrate: 695 kb/s
Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 598 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc Metadata: creation_time : 2014-02-10 03:54:28 handler_name : MP4 Video Media Handler Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 93 kb/s Metadata: creation_time : 2014-02-10 03:54:28 handler_name : MP4 Sound Media Handler
and the characteristic of a video created by the mobile phone are:
Metadata:
major_brand : isom minor_version : 512 compatible_brands: skm23gp5
Duration: 00:00:27.31, start: 0.000000, bitrate: 405 kb/s
Stream #0:0(und): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, 1 channels, flt, 12 kb/s Metadata: handler_name : soun Stream #0:1(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 389 kb/s, 14.65 fps, 15 tbr, 1k tbn, 15 tbc Metadata: handler_name : vide
hat would be the right line to convert the downloaded video?
many thanks.
-
Alex Caseiro over 10 yearsHi! many thanks for your fast answer. I used your solution, but it still gave the error message "unknown format or transmission speed too high". Having it modified made it ok:
ffmpeg -y -i video.mp4 -s 320x240 -r 14.65 -c:v mpeg4 -b:v 389k -c:a libmp3lame output.mp4
-
Alex Caseiro over 10 yearsWell, not yet. The image is right, but there is no sound. I have set
-b:a 12k
so that it resembles the video made by the phone, but it did not work. -
Alex Caseiro over 10 yearsfixed it, with the second command. thank you.