Ho una serie di brevi video (<3sec) mp4 (alcuni con audio, altri senza audio) che funzionano bene in tutti i client. 15 fps, audio AAC. Quando uso ffmpeg concat, il file risultante viene riprodotto correttamente in vlc, tuttavia in winmedia ignora qualsiasi silenzio nella traccia audio. In breve tempo riproduce tutto il video, riproduce solo il primo audio. Sento che ha qualcosa a che fare con la sincronizzazione di video e audio, ma sono nuovo con ffmpeg. Se prendo l'output e lo ricodifico con il freno a mano, crea un file che funziona.
exec ("ffmpeg -f concat -i files.txt -c copy finalvideo.mp4");
e poi faccio questo:
exec ("ffmpeg -i finalvideo.mp4 -c:v copy -c:a libfaac -r 24 output.mp4");
Revisionato con nuovi output dopo aver verificato che entrambi i sorgenti audio abbiano la stessa codifica (penso)
Informazioni dal nuovo file di pausa
/home/fresh/public_html/ffmpeg/output$ ffmpeg -i /home/fresh/public_html/ffmpeg/output/ENP22122.mp4
ffmpeg version N-61053-gab5d46d-syslint Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 3 2014 13:27:18 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable- libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable- libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/fresh/public_html/ffmpeg/output/ENP22122.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.33.100
Duration: 00:00:04.07, start: 0.000000, bitrate: 63 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 480x360 [SAR 1:1 DAR 4:3], 5 kb/s, 15 fps, 15 tbr, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, mono, s16p, 96 kb/s (default)
Metadata:
handler_name : SoundHandler
Informazioni dal nuovo file audio
/home/fresh/public_html/ffmpeg/output$ ffmpeg -i /home/fresh/public_html/ffmpeg/output/ENT22122.mp4
ffmpeg version N-61053-gab5d46d-syslint Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 3 2014 13:27:18 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable- libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/fresh/public_html/ffmpeg/output/ENT22122.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.33.100
Duration: 00:00:03.07, start: 0.000000, bitrate: 56 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 480x360 [SAR 1:1 DAR 4:3], 6 kb/s, 15 fps, 15 tbr, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, mono, s16p, 96 kb/s (default)
Metadata:
handler_name : SoundHandler
Uscita dal comando concat
/home/fresh/public_html/ffmpeg/output$ ffmpeg -f concat -i /home/fresh/public_html /ffmpeg/filesnotime.txt -c copy /home/fresh/public_html/ffmpeg/finalvideo.mp4
ffmpeg version N-61053-gab5d46d-syslint Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 3 2014 13:27:18 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
[concat @ 0x14a2900] Estimating duration from bitrate, this may be inaccurate
Input #0, concat, from '/home/fresh/public_html/ffmpeg/filesnotime.txt':
Duration: 00:00:00.08, start: 0.000000, bitrate: 102 kb/s
Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 480x360 [SAR 1:1 DAR 4:3], 6 kb/s, 15 fps, 15 tbr, 15360 tbn, 30 tbc
Stream #0:1: Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, mono, s16p, 96 kb/s
Output #0, mp4, to '/home/fresh/public_html/ffmpeg/finalvideo.mp4':
Metadata:
encoder : Lavf55.33.100
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 480x360 [SAR 1:1 DAR 4:3], q=2-31, 6 kb/s, 15 fps, 15360 tbn, 15360 tbc
Stream #0:1: Audio: mp3 (i[0][0][0] / 0x0069), 44100 Hz, mono, 96 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
frame= 828 fps=0.0 q=-1.0 Lsize= 392kB time=00:00:55.00 bitrate= 58.4kbits/s
video:81kB audio:289kB subtitle:0 data:0 global headers:0kB muxing overhead 6.031527%
public_html
e /ffmpeg
. 2. Qual è il problema con l'output ora, poiché entrambi i file hanno audio? E il tuo duartion (finale) indica che stai aggiungendo più file.
ffmpeg -i <inputfile>
per ciascuno? Inoltre, fornire l'output del comando e della consoleffmpeg
quando si esegue il comando.