Mensajes de error/advertencia de conversión y muxing de audio ffmpeg

Mensajes de error/advertencia de conversión y muxing de audio ffmpeg

Tengo una gran colección de BluRay y quiero incluirla en mi biblioteca de iTunes para reproducirla en AppleTV.

Necesito convertir las diferentes transmisiones de audio a un formato adecuado.

Pero hay varios mensajes de error/advertencia que debo manejar.

Aquí hay algunos fragmentos de código de ejemplo:

mkvmerge -i german_dd_to_alac__english_truehd_to_alac.mkv
mkvextract tracks german_dd_to_alac__english_truehd_to_alac.mkv 0:video.h264 1:audio1.ac3 2:audio2.truehd 3:audio2_core.ac3 4:sub1.srt
ffmpeg -i german_dd_to_alac__english_truehd_to_alac.mkv -f ffmetadata chapters
ffmpeg -i audio1.ac3 -acodec alac audio1.m4a
[ac3 @ 0000000000502b40] Estimating duration from bitrate, this may be inaccurate
[alac @ 000000000050cc40] encoding as 24 bits-per-sample
ffmpeg -i audio2.truehd -acodec alac -af "aformat=channel_layouts=7.1(wide)" audio2.m4a
[out_0_0 @ 000000000046bc40] 100 buffers queued in out_0_0, something may be wrong.

ffmpeg^
 -probesize 2147483648 -i video.h264 -i audio1_alac.m4a -i audio2_alac.m4a -i sub1.srt -i chapters^
 -map 0:0 -map 1:0 -map 2:0 -map 3:0^
 -metadata:s:a:0 language=ger -metadata:s:a:0 handler="Dolby Digital"^
 -metadata:s:a:1 language=eng -metadata:s:a:1 handler="Dolby TrueHD"^
 -metadata:s:s:0 language=ger -metadata:s:s:0 handler="Deutsch"^
 -movflags disable_chpl^
 -c:s mov_text -c:v copy -c:a copy^
 german_dd_to_alac__english_truehd_to_alac.m4v 2>> ffmpeg.log
[ipod @ 000000000338c040] track 1: codec frame size is not set
[ipod @ 000000000338c040] track 2: codec frame size is not set
[ipod @ 000000000338c040] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[ipod @ 000000000338c040] pts has no value

_

mkvmerge -i german_dts_to_alac__english_dtshdma_to_alac.mkv
mkvextract tracks german_dts_to_alac__english_dtshdma_to_alac.mkv 0:video.h264 1:audio1.dts 2:audio2.dtshdma 3:sub1.srt
ffmpeg -i german_dts_to_alac__english_dtshdma_to_alac.mkv -f ffmetadata chapters
ffmpeg -i audio1.dts -acodec alac audio1.m4a
[dts @ 0000000000332a80] Estimating duration from bitrate, this may be inaccurate
[alac @ 0000000000339d80] encoding as 24 bits-per-sample
ffmpeg -i audio2.dtshdma -acodec alac audio2.m4a

ffmpeg^
 -probesize 2147483648 -i video.h264 -i audio1_alac.m4a -i audio2_alac.m4a -i sub1.srt -i chapters^
 -map 0:0 -map 1:0 -map 2:0 -map 3:0^
 -metadata:s:a:0 language=ger -metadata:s:a:0 handler="DTS"^
 -metadata:s:a:1 language=eng -metadata:s:a:1 handler="DTS-HD Master Audio"^
 -metadata:s:s:0 language=ger -metadata:s:s:0 handler="Deutsch"^
 -movflags disable_chpl^
 -c:s mov_text -c:v copy -c:a copy^
 german_dts_to_alac__english_dtshdma_to_alac.m4v 2>> ffmpeg.log
[ipod @ 0000000002afe740] track 1: codec frame size is not set
[ipod @ 0000000002afe740] track 2: codec frame size is not set
[ipod @ 0000000002afe740] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[ipod @ 0000000002afe740] pts has no value

_

mkvmerge -i german_dtshr_to_alac__english_dtshdma_to_alac.mkv
mkvextract tracks german_dtshr_to_alac__english_dtshdma_to_alac.mkv 0:video.h264 1:audio1.dtshr 2:audio2.dtshdma
ffmpeg -i german_dtshr_to_alac__english_dtshdma_to_alac.mkv -f ffmetadata chapters
ffmpeg -i audio1.dtshr -acodec alac audio1.m4a
[alac @ 00000000005a4dc0] encoding as 24 bits-per-sample
ffmpeg -i audio2.dtshdma -acodec alac -af "aformat=channel_layouts=7.1(wide)" audio2.m4a

ffmpeg^
 -probesize 2147483648 -i video.h264 -i audio1_alac.m4a -i audio2_alac.m4a -i chapters^
 -map 0:0 -map 1:0 -map 2:0^
 -metadata:s:a:0 language=ger -metadata:s:a:0 handler="DTS-HD High Resolution"^
 -metadata:s:a:1 language=eng -metadata:s:a:1 handler="DTS-HD Master Audio"^
 -movflags disable_chpl^
 -c:v copy -c:a copy^
 german_dtshr_to_alac__english_dtshdma_to_alac.m4v 2>> ffmpeg.log
[ipod @ 00000000004f3780] track 1: codec frame size is not set
[ipod @ 00000000004f3780] track 2: codec frame size is not set
[ipod @ 00000000004f3780] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[ipod @ 00000000004f3780] pts has no value

_

[ac3 @ 0000000000502b40] Estimating duration from bitrate, this may be inaccurate

Solo aparece cuando intento convertir los siguientes formatos con pérdida: ac3, dts y eac3. Con dts con pérdida (como DTS-HD de alta resolución) estoy bien.

[out_0_0 @ 000000000046bc40] 100 buffers queued in out_0_0, something may be wrong.

Solo aparece cuando intento convertir TrueHD sin pérdidas, DTS-HD Master Audio sin pérdidas está bien.

[ipod @ 000000000338c040] track 1: codec frame size is not set
[ipod @ 000000000338c040] track 2: codec frame size is not set
[ipod @ 000000000338c040] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[ipod @ 000000000338c040] pts has no value

Esos mensajes siempre están presentes cuando intento mezclar todas las transmisiones.

¿Desaparecerán cuando coloque marcas de tiempo en formato pts en el contenedor? Puedo extraerlos de mkv (mkvextract timecodes_v2 input.mkv 0:video.timecodes.txt 1:audio1.timecodes.txt 2:audio2.timecodes.txt 3:sub1.timecodes.txt 4:sub2.timecodes.txt 5:sub3 .timecodes.txt 6:sub4.timecodes.txt) pero solo en formato timecodes_v2. ¿Puedo convertir timecodes_v2 en pts y colocarlos en el contenedor para evitar esos mensajes?

Atentamente,

Félix

EDITAR: Registros para el primer fragmento:https://pastebin.com/xWq9U2sN

Respuesta1

Finalmente lo resolví.

Simplemente llevo la transmisión de video directamente de un contenedor a otro:

ffmpeg -i german_dd_to_alac__english_truehd_to_alac.mkv -map 0:0 -c copy german_dd_to_alac__english_truehd_to_alac.m4v

Y luego haz lo mío:

ffmpeg^
 -i german_dd_to_alac__english_truehd_to_alac.m4v -i audio1.m4a -i audio2.m4a -i sub1.srt^  -map 0:0 -map 1:0 -map 2:0 -map 3:0^
 -metadata:s:a:0 language=ger -metadata:s:a:0 handler="Dolby Digital"^
 -metadata:s:a:1 language=eng -metadata:s:a:1 handler="Dolby TrueHD"^
 -metadata:s:s:0 language=ger -metadata:s:s:0 handler="Deutsch"^  -movflags disable_chpl^  -c:s mov_text -c:v copy -c:a alac^  final.m4v

Funciona de maravilla. Sin puntos ni errores de marca de tiempo. Resolví el error de tamaño de fotograma no establecido especificando el códec de audio -c:a alac. No sé por qué pero funciona.

El error "100 buffers en cola en out_0_0, es posible que algo esté mal" sigue presente. Sería genial si pudiera resolver eso también.

EDITAR: No debería haber ningún problema:https://trac.ffmpeg.org/ticket/7703

información relacionada