[FFmpeg-user] Adding audio track to MP4 seems to override the video stream
Cyle Hunter
cylehunter at tactica.ca
Fri Jan 12 00:00:02 EET 2018
Here’s some output from ffmprobe. It looks like it’s setting the video stream to 1 frame for some reason judging by the nb_read_frames=1
https://pastebin.com/tvhxZc0n
> On Jan 11, 2018, at 3:03 PM, Cyle Hunter <cylehunter at tactica.ca> wrote:
>
> Hi, I built a new binary using the git head as per your suggestion. It seems to run a lot faster now, however, I’m running into the same issue.
>
> Here’s the mp4 file without audio that I’m testing with:
> https://file.io/nV9UTQ
>
> And here’s what the output looks like after the I apply the sound:
> https://file.io/4ls6Is
>
> Here’s the sound file I’ve been testing with:
> https://file.io/vF69i2
>
> And here’s the log output on the latest version:
>
> ffmpeg version N-89775-gef21033 Copyright (c) 2000-2018 the FFmpeg developers
> built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
> configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs=-lpthread --extra-libs=-lm --bindir=/root/bin --enable-gpl --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --disable-shared --enable-static
> libavutil 56. 7.100 / 56. 7.100
> libavcodec 58. 9.100 / 58. 9.100
> libavformat 58. 3.100 / 58. 3.100
> libavdevice 58. 0.100 / 58. 0.100
> libavfilter 7. 11.101 / 7. 11.101
> libswscale 5. 0.101 / 5. 0.101
> libswresample 3. 0.101 / 3. 0.101
> libpostproc 55. 0.100 / 55. 0.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/62a5980d-b45c-40cb-a52d-0b308fed3b18.mp4':
> Metadata:
> major_brand : isom
> minor_version : 512
> compatible_brands: isomiso2avc1mp41
> encoder : Lavf58.3.100
> Duration: 00:00:46.00, start: 0.000000, bitrate: 3181 kb/s
> Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 3180 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
> Metadata:
> handler_name : VideoHandler
> [aac @ 0x45cb4c0] Estimating duration from bitrate, this may be inaccurate
> Input #1, aac, from '/var/task/assets/elvis.aac':
> Duration: 00:00:48.88, bitrate: 136 kb/s
> Stream #1:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 136 kb/s
> Stream mapping:
> Stream #0:0 -> #0:0 (copy)
> Stream #1:0 -> #0:1 (aac (native) -> aac (native))
> Press [q] to stop, [?] for help
> Output #0, mp4, to '/tmp/62a5980d-b45c-40cb-a52d-0b308fed3b18.jpeg.zip.mp4':
> Metadata:
> major_brand : isom
> minor_version : 512
> compatible_brands: isomiso2avc1mp41
> encoder : Lavf58.3.100
> Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 3180 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default)
> Metadata:
> handler_name : VideoHandler
> Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 256 kb/s
> Metadata:
> encoder : Lavc58.9.100 aac
> frame= 1 fps=0.0 q=-1.0 Lsize= 229kB time=00:00:00.02 bitrate=80761.8kbits/s speed=1.73x
> video:227kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.584858%
> [aac @ 0x45bec80] Qavg: 51662.707
>
>
>> On Jan 10, 2018, at 8:19 AM, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>>
>> 2018-01-10 7:37 GMT+01:00 Cyle Hunter <cylehunter at tactica.ca>:
>>
>>> I’m trying to add an audio track to an existing MP4 video. It
>>> seems when I add the new audio stream the video stream gets
>>> corrupted.
>>
>> Please test current FFmpeg git head, if the issue is reproducible
>> please provide an input sample.
>>
>> Carl Eugen
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-user
mailing list