Re: [FFmpeg-user] Can't concat Garmin DashCam videos with telemetry (GPS data)

2021-07-28 Thread Micael Silva
On Wed, Jul 28, 2021 at 7:15 PM Suporte JM  wrote:

> Hi,
>
> I have a Garmin 66W dashcam for my work (street mapping surveyor) which
> produces several 1min. MP4 videos of my journey (60 min. = 60 videos). All
> these videos have telemetry data on it as metadata (GPS location, speed,
> etc...).
>
> I want to concatenate every 5 files excluding the audio but preserving the
> video and the telemetry in the metadata.
>
> What I have tried so far:
>
>
>- Export GPS information as GPX file (result: successful)
>
> *exiftool -p gpx.fmt -ee X:\video_place\videos_1m\GRMN0005.mp4 >
> GRMN0005.gpx*
>
>
>- Merge MP4 videos as a single MP4 video (result: partially successful)
>
> *ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c copy
> X:\video_place\videos_1m\GRMN0005to0011.mp4*
>
> When I use the above command on ffmpeg *I lose all my telemetry data*.
>
> I tried in several different ways for days, searching on several forums, I
> even tried to export all GPS data from each single 1min. file merge them,
> and then merge the videos and put the telemetry back.
>
> The ffprobe output of my 1min. video is as following:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Metadata:major_brand : avc1minor_version : 0compatible_brands:
> avc1isomcreation_time : 2021-07-26T17:08:23.00ZDuration: 00:01:00.06,
> start: 0.00, bitrate: 19553 kb/sStream #0:0(eng): Video: h264 (Main)
> (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 19182 kb/s, 29.97 fps,
> 29.97 tbr, 30k tbn (default)Metadata:creation_time :
> 2021-07-26T17:08:23.00Zhandler_name : Ambarella AVCvendor_id :
> [0][0][0][0]encoder : Ambarella AVC encoderStream #0:1(eng): Audio: aac
> (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 128 kb/s
> (default)Metadata:creation_time : 2021-07-26T17:08:23.00Zhandler_name :
> Ambarella AACvendor_id : [0][0][0][0]Stream #0:2(eng): Subtitle: mov_text
> (text / 0x74786574), 0 kb/s (default)Metadata:creation_time :
> 2021-07-26T17:08:23.00Zhandler_name : Ambarella EXT*
>
> I have tried as well with following code, but none of them seems to work:
>
>
> *ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c copy
> -scodec copy X:\video_place\videos_1m\GRMN0005to0011_scodec.mp4*
>
>
> *ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c:s copy
> -c:v copy X:\video_place\videos_1m\GRMN0005to0011.mp4*
>
> *ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c copy
> -c:s mov_text X:\video_place\videos_1m\GRMN0005to0011.mp4*
>
> What am I missing?
>
> Thanks.
> Rodrigo
>

MP4 files are not concatenable by nature by the concat DEMUXER. You can use
the concat FILTER or demux them to MPEG-TS and then use the concat demuxer.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] Can't concat Garmin DashCam videos with telemetry (GPS data)

2021-07-28 Thread Suporte JM
Hi,

I have a Garmin 66W dashcam for my work (street mapping surveyor) which
produces several 1min. MP4 videos of my journey (60 min. = 60 videos). All
these videos have telemetry data on it as metadata (GPS location, speed,
etc...).

I want to concatenate every 5 files excluding the audio but preserving the
video and the telemetry in the metadata.

What I have tried so far:


   - Export GPS information as GPX file (result: successful)

*exiftool -p gpx.fmt -ee X:\video_place\videos_1m\GRMN0005.mp4 >
GRMN0005.gpx*


   - Merge MP4 videos as a single MP4 video (result: partially successful)

*ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c copy
X:\video_place\videos_1m\GRMN0005to0011.mp4*

When I use the above command on ffmpeg *I lose all my telemetry data*.

I tried in several different ways for days, searching on several forums, I
even tried to export all GPS data from each single 1min. file merge them,
and then merge the videos and put the telemetry back.

The ffprobe output of my 1min. video is as following:





















*Metadata:major_brand : avc1minor_version : 0compatible_brands:
avc1isomcreation_time : 2021-07-26T17:08:23.00ZDuration: 00:01:00.06,
start: 0.00, bitrate: 19553 kb/sStream #0:0(eng): Video: h264 (Main)
(avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 19182 kb/s, 29.97 fps,
29.97 tbr, 30k tbn (default)Metadata:creation_time :
2021-07-26T17:08:23.00Zhandler_name : Ambarella AVCvendor_id :
[0][0][0][0]encoder : Ambarella AVC encoderStream #0:1(eng): Audio: aac
(LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 128 kb/s
(default)Metadata:creation_time : 2021-07-26T17:08:23.00Zhandler_name :
Ambarella AACvendor_id : [0][0][0][0]Stream #0:2(eng): Subtitle: mov_text
(text / 0x74786574), 0 kb/s (default)Metadata:creation_time :
2021-07-26T17:08:23.00Zhandler_name : Ambarella EXT*

I have tried as well with following code, but none of them seems to work:


*ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c copy
-scodec copy X:\video_place\videos_1m\GRMN0005to0011_scodec.mp4*


*ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c:s copy
-c:v copy X:\video_place\videos_1m\GRMN0005to0011.mp4*

*ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c copy
-c:s mov_text X:\video_place\videos_1m\GRMN0005to0011.mp4*

What am I missing?

Thanks.
Rodrigo
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Increased latency from filter_complex

2021-07-28 Thread technik+ffmpeg

Hi Paul,
thanks for your answer.


3 loudnorm calls and 2 dynaudnorm calls?
for ducking there is sidechaincompress filter


We tried sidechain of course, but will try this again.
Our problem is, that the resulting audio from the sidechaincompress never 
reached the same quality. The audio from the primary channel also never got 
down to a level, where the secondary audio could be understood without problems.
If you have any parameters or tips how to achieve this, please share. Thank you.

But regarding the central difficulty, the increasing latency from - what we 
suspect serial instead of parallel processing of the audio channels - this does 
not help.
Or is sidechaincompress being handled differently?

Thank you for your time.

Philipp
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] SAR/DAR changes are not preserved with H264 in MP4 container

2021-07-28 Thread Marcus Wichelmann

Hi,

I'm using ffmpeg to encode a H264 HLS stream with fMP4 segments. Because 
my input is a DVB stream, the pixel aspect ratio of the video changes 
sometimes, for example when an old 4:3 movie is interrupted by a 
commercial. But these changes in the SAR/DAR values are not included in 
the resulting fMP4 files which causes the playback to be squeezed or 
stretched sometimes.


To reproduce this in a more simple setup, I recorded a short test clip 
which contains two aspect ratio changes:

- SAR: 16/15, DAR: 4/3 ==> SAR: 64/45, DAR: 16/9
- SAR: 64/45, DAR: 16/9 ==> SAR: 16/15, DAR: 4/3
The resolution is 720x576. You can download it here: 
https://drive.wichelmann.cloud/s/eE2oc9XikZDBzy2 



When playing this .ts file with ffplay or VLC, the aspect ratio change 
works fine.


When re-encoding the file with libx264 or nvenc_h264 to a new .ts file, 
everything is still fine and the aspect ratio change works when playing 
transcoded.ts:


   ffmpeg -loglevel debug -i test.ts -c:v libx264 -b:v 3M transcoded.ts


Also, the libx264 and nvenc encoder logs show that the aspect ratio 
change was detected and handled:


   ...
   [mpeg2video @ 0x3f8bfc0] Format yuv420p chosen by get_format().
   [nvenc_h264 @ 0x4013ec0] aspect ratio change (DAR): 4:3 -> 16:9
   [mpeg2video @ 0x3f8bfc0] Format yuv420p chosen by get_format().
   [nvenc_h264 @ 0x4013ec0] aspect ratio change (DAR): 16:9 -> 4:3
   ...

So obviously, the encoders are not the issue here, because they have 
support for these aspect ratio changes: 
https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/nvenc.c#l2189


But when re-encoding the file to the MP4 format instead, things look 
different:


   ffmpeg -loglevel debug -i test.ts -c:v libx264 -b:v 3M transcoded.mp4

Now, when playing this transcoded.mp4 in ffplay or VLC, the 16:9 
commercial is squeezed to 4:3 when the aspect ratio changes mid-stream, 
because the SAR/DAR information is not preserved.

Same happens with vcodec copy.

Do you have an idea what might be causing this? Is this not supported 
with MP4 containers or is it just a bug in ffmpeg? (My ffmpeg is 
compiled from latest master.)


Thank you!


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] SAR/DAR changes are not preserved with H264 in MP4 container

2021-07-28 Thread Marcus Wichelmann

Hi,

I'm using ffmpeg to encode a H264 HLS stream with fMP4 segments. Because 
my input is a DVB stream, the pixel aspect ratio of the video changes 
sometimes, for example when an old 4:3 movie is interrupted by a 
commercial. But these changes in the SAR/DAR values are not included in 
the resulting fMP4 files which causes the playback to be squeezed or 
stretched sometimes.


To reproduce this in a more simple setup, I recorded a short test clip 
which contains two aspect ratio changes:

- SAR: 16/15, DAR: 4/3 ==> SAR: 64/45, DAR: 16/9
- SAR: 64/45, DAR: 16/9 ==> SAR: 16/15, DAR: 4/3
The resolution is 720x576. You can download it here: 
https://drive.wichelmann.cloud/s/eE2oc9XikZDBzy2 



When playing this .ts file with ffplay or VLC, the aspect ratio change 
works fine.


When re-encoding the file with libx264 or nvenc_h264 to a new .ts file, 
everything is still fine and the aspect ratio change works when playing 
transcoded.ts:


   ffmpeg -loglevel debug -i test.ts -c:v libx264 -b:v 3M transcoded.ts


Also, the libx264 and nvenc encoder logs show that the aspect ratio 
change was detected and handled:


   ...
   [mpeg2video @ 0x3f8bfc0] Format yuv420p chosen by get_format().
   [nvenc_h264 @ 0x4013ec0] aspect ratio change (DAR): 4:3 -> 16:9
   [mpeg2video @ 0x3f8bfc0] Format yuv420p chosen by get_format().
   [nvenc_h264 @ 0x4013ec0] aspect ratio change (DAR): 16:9 -> 4:3
   ...

So obviously, the encoders are not the issue here, because they have 
support for these aspect ratio changes: 
https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/nvenc.c#l2189


But when re-encoding the file to the MP4 format instead, things look 
different:


   ffmpeg -loglevel debug -i test.ts -c:v libx264 -b:v 3M transcoded.mp4

Now, when playing this transcoded.mp4 in ffplay or VLC, the 16:9 
commercial is squeezed to 4:3 when the aspect ratio changes mid-stream, 
because the SAR/DAR information is not preserved.

Same happens with vcodec copy.

Do you have an idea what might be causing this? Is this not supported 
with MP4 containers or is it just a bug in ffmpeg? (My ffmpeg is 
compiled from latest master.)


Thank you!


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".