Make exact mp4 (H264) format for uploading to youtube
Posted
by
WHITECOLOR
on Super User
See other posts from Super User
or by WHITECOLOR
Published on 2012-10-04T06:12:28Z
Indexed on
2012/10/04
9:41 UTC
Read the original article
Hit count: 249
With ffmpeg I'm converting video from mp3 and picture to upload it to youtube. After upload, conversion fails. Reasons are unknown. I believe the problem is in format. By the way If I'm uploading file 5 minutes length, it fails if I upload 30 seconds of this file it succeeds.
I have donwload mp4 file from youtube. Then I uploaded it, it is done very fast. So a nice solution would be to convert videos to the same format that is done by google.
I got the following output by mpeg:
ffmpeg version N-44264-g070b0e1 Copyright (c) 2000-2012 the FFmpeg developers
built on Sep 7 2012 17:38:57 with gcc 4.7.1 (GCC)
configuration: --enable-gpl --enable-version3 --disable-pthreads --enable-runt
ime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass -
-enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-l
ibfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenj
peg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheo
ra --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-li
bvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --ena
ble-zlib
libavutil 51. 72.100 / 51. 72.100
libavcodec 54. 55.100 / 54. 55.100
libavformat 54. 25.105 / 54. 25.105
libavdevice 54. 2.100 / 54. 2.100
libavfilter 3. 16.100 / 3. 16.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'youtubetrack0.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2012-10-02 22:58:57
Duration: 00:06:46.66, start: 0.000000, bitrate: 176 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yu
v420p, 450x360, 78 kb/s, 6 fps, 6 tbr, 12 tbn, 12 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 95
kb/s
Metadata:
creation_time : 2012-10-02 22:58:57
handler_name : IsoMedia File Produced by Google, 5-11-2011
Is it possible to construct ffmpeg parameters so that that would give the same format that google internally does? Is the information above sufficient?
I couldn't construct needed params.
For example I don't understand how to set tbn and what 95 kb/s mean in "Stream #0:1(und): Audio:".
Now I just do: ffmpeg -i videoimage.jpg -i audio.mp3 video.mp4
Info I've got:
ffmpeg version N-44998-gdf82454 Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 2 2012 23:03:12 with gcc 4.7.1 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3
--disable-pthreads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib
--enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --en
able-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enab
le-libxavs --enable-libxvid --enable-zlib
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 63.100 / 54. 63.100
libavformat 54. 29.105 / 54. 29.105
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 19.102 / 3. 19.102
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.25.105
Duration: 00:06:46.81, start: 0.000000, bitrate: 129 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p, 450x360,
3392 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 127
kb/s
Metadata:
handler_name : SoundHandler
This video fails the conversion on youtube.
I also tried to use other vcode parmam and extensions of output file (mp4, wmv, avi) but failed too.
Would be greatful for help.
© Super User or respective owner