Estou tentando converter .flv para .mp4 no CentOS. Eu usei ffmpeg -i test.flv test.mp4
, que funcionou bem no Windows, mas no Linux o resultado não tem vídeo, apenas áudio.
Eu instalei o ffmpeg 3.0 usando o yum.
Saída do comando
ffmpeg:
ffmpeg version 3.0
Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-55)
configuration:
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
O que há de errado com o meu ffmpeg? Obrigado em conselhos.
UPDATE
ffmpeg -i test.flv test.mp4
saída:
ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-55)
configuration:
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
Input #0, flv, from 'test.flv':
Duration: 00:09:18.71, start: 0.000000, bitrate: 3120 kb/s
Stream #0:0: Video: flv1, yuv420p, 1000x562, 3000 kb/s, 24 fps, 24 tbr, 1k tbn, 1k tbc
Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
Output #0, mp4, to 'test.mp4':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1000x562, q=2-31, 200 kb/s, 24 fps, 12288 tbn, 24 tbc
Metadata:
encoder : Lavc57.24.102 mpeg4
Side data:
unknown side data type 10 (24 bytes)
Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc57.24.102 aac
Stream mapping:
Stream #0:0 -> #0:0 (flv1 (flv) -> mpeg4 (native))
Stream #0:1 -> #0:1 (mp3 (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 98 fps=0.0 q=31.0 size= 391kB time=00:00:04.08 bitrate= 784.3kbits/s speed=8.13x
frame= 177 fps=175 q=31.0 size= 662kB time=00:00:07.37 bitrate= 735.0kbits/s speed=7.31x
frame= 260 fps=172 q=31.0 size= 937kB time=00:00:10.83 bitrate= 708.5kbits/s speed=7.18x
frame= 353 fps=176 q=31.0 size= 1248kB time=00:00:14.70 bitrate= 694.9kbits/s speed=7.32x
...
frame=13303 fps=221 q=31.0 size= 48550kB time=00:09:14.29 bitrate= 717.5kbits/s speed=9.21x
frame=13410 fps=222 q=31.0 Lsize= 49125kB time=00:09:18.75 bitrate= 720.2kbits/s speed=9.24x
video:39978kB audio:8825kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.659448%
[aac @ 0xa1ba040] Qavg: 824.654
Quando o reproduz no meu navegador da Web, ele reproduz apenas áudio.
Mas se eu copiá-lo para o Windows, ele funciona bem no media player.