[FFmpeg-user] MPEG-DASH / HLS Audio Video Sync
Bryn Larsen
bryn.larsen at live.com
Sat Apr 20 00:53:19 EEST 2019
Ok, I removed -hide_banner and -f live_flv. I was not able to switch to file input because the test file I’m using is too large for the machine I’m running ffmpeg on. Here is what ffmpeg is reporting about the incoming rtmp stream.
ffmpeg -i rtmp://localhost/myapp/test01
ffmpeg version N-93562-g3e10223385 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
configuration: --enable-gpl --enable-libx264 --enable-nonfree --enable-openssl --disable-doc
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 50.100 / 58. 50.100
libavformat 58. 27.102 / 58. 27.102
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
Input #0, flv, from 'rtmp://localhost/myapp/test01':
Metadata:
Server : NGINX RTMP (github.com/arut/nginx-rtmp-module)
displayWidth : 1920
displayHeight : 1080
fps : 59
profile :
level :
Duration: 00:00:00.00, start: 4036.169000, bitrate: N/A
Stream #0:0: Data: none
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 163 kb/s
Stream #0:2: Video: h264 (Main), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 6144 kb/s, 59 fps, 59.94 tbr, 1k tbn, 119.88 tbc
I’m still seeing A/V sync issues.
________________________________
From: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> on behalf of Carl Eugen Hoyos <ceffmpeg at gmail.com>
Sent: Friday, April 12, 2019 11:48:42 AM
To: FFmpeg user questions
Subject: Re: [FFmpeg-user] MPEG-DASH / HLS Audio Video Sync
2019-04-12 20:36 GMT+02:00, Bryn Larsen <bryn.larsen at live.com>:
> Hi,
>
> I’m trying to take an incoming rtmp stream (via nginx-rtmp) and transmux /
> transcode it into an mpeg-dash / hls stream. I’m having trouble keeping the
> audio and video in sync. If I re-encode the audio instead of copying it, the
> trancoded bitrate stays in sync but the transmuxed video still drifts out of
> sync. Here is the command I am running:
>
> ffmpeg \
> -hide_banner \
Please remove hide_banner an provide the command
line you tested together with the complete, uncut console
output if you need help here.
> -f live_flv \
You should normally not force the input format.
> -i "rtmp://localhost/myapp/test01" \
> -map 0:v -c:v:0 libx264 -bf 0 -refs 3 -preset veryfast -tune zerolatency
> -sc_threshold 0 -g 120 -b:v:0 1600k -s 640x360 \
> -map 0:v -c:v:1 copy \
> -map 0:a -c:a:0 copy \
> -f dash \
> -streaming 1 \
> -seg_duration 2 \
> -use_timeline 0 \
> -use_template 1 \
> -window_size 5 \
> -extra_window_size 10 \
> -index_correction 1 \
> -remove_at_exit 1 \
> -media_seg_name 'chunk-stream-$RepresentationID$-$Number%05d$.m4s' \
> -init_seg_name 'init-stream1-$RepresentationID$.m4s' \
> -adaptation_sets "id=0,streams=v id=1,streams=a" \
> -method PUT \
> -strict experimental \
> -lhls 1 \
> -http_persistent 1 \
> -hls_playlist 1 \
> -ignore_io_errors 1 \
> https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2F127.0.0.1%2Fvideo%2Fmanifest.mpd&data=02%7C01%7C%7C5707da1b467f4f1fca8108d6bf778469%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636906917373230097&sdata=n09jCsoTvCjDLsr1xcQfLDjfaGgVFHRcB7Bd44Ajxbs%3D&reserved=0
Do I understand correctly that you only have problems with
the copied video stream? It is most likely not cfr.
The issue would be easier to test if you dump the input
stream and use file input instead of network input.
Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Fffmpeg-user&data=02%7C01%7C%7C5707da1b467f4f1fca8108d6bf778469%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636906917373230097&sdata=YQwKYl%2Fa%2Fvd7Nj0iwC7uawIjZNW%2Fo5DH32fMIEsBXN4%3D&reserved=0
To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list