Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#6382 closed defect (invalid)

sample rate not set for mp3 audio track when using hls

Reported by: krs_vital Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

[root@stream-1 config]# /usr/local/bin/ffmpeg -copytb 1 -fflags nobuffer -overrun_nonfatal 1 -i udp://239.192.7.59:1234 -sn -dn -c copy -ar 44100 -hls_allow_cache 0 -hls_base_url /ts/Sarafan/ -hls_list_size 5 -hls_time 5 -hls_flags delete_segments+omit_endlist+split_by_time -map 0 -ignore_unknown -g 1 -r 50 -strict -2 -avoid_negative_ts 0 -use_localtime 1 -hls_segment_filename /hls/ts/Sarafan/stream_%s.ts /hls/pl/Sarafan.m3u8
ffmpeg version N-84010-ge2adbcb Copyright (c) 2000-2017 the FFmpeg developers

built with gcc 5.4.0 (GCC)
configuration: --libdir=/usr/lib64
libavutil 55. 48.100 / 55. 48.100
libavcodec 57. 83.100 / 57. 83.100
libavformat 57. 66.104 / 57. 66.104
libavdevice 57. 3.100 / 57. 3.100
libavfilter 6. 76.100 / 6. 76.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100

[mpeg2video @ 0x3ebc860] Invalid frame dimensions 0x0.

Last message repeated 13 times

[mpegts @ 0x3e97a60] Could not find codec parameters for stream 1 (Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'udp://239.192.7.59:1234':

Duration: N/A, start: 51101.803978, bitrate: 3150 kb/s
Program 5

Stream #0:0[0xcd]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 16:15 DAR 4:3], 3150 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x131](rus): Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, s16p

[hls @ 0x3eb7360] sample rate not set
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Stream mapping:

Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)

Last message repeated 1 times

Change History (5)

comment:1 follow-up: Changed 3 months ago by stevenliu

Can you output to mpegts with this stream?

comment:2 Changed 3 months ago by cehoyos

  • Version changed from unspecified to git-master

Please record the udp stream (not with FFmpeg) and provide the resulting input stream.

comment:3 in reply to: ↑ 1 Changed 3 months ago by krs_vital

Replying to stevenliu:

Can you output to mpegts with this stream?

No, i can't, i get the same problem
Link to file https://mycloud.g-service.ru/owncloud/index.php/s/64pR2iAGS8MNDo1

/usr/local/bin/ffmpeg -copytb 1 -fflags nobuffer -overrun_nonfatal 1 -i udp://239.192.7.59:1234 -sn -dn -c copy -map 0 -ignore_unknown -g 1 -r 50 -strict -2 -avoid_negative_ts 0 -f mpegts /var/tmp/test.ts
ffmpeg version N-84010-ge2adbcb Copyright (c) 2000-2017 the FFmpeg developers

built with gcc 5.4.0 (GCC)
configuration: --libdir=/usr/lib64
libavutil 55. 48.100 / 55. 48.100
libavcodec 57. 83.100 / 57. 83.100
libavformat 57. 66.104 / 57. 66.104
libavdevice 57. 3.100 / 57. 3.100
libavfilter 6. 76.100 / 6. 76.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100

[mpegts @ 0x22f4740] Could not find codec parameters for stream 1 (Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'udp://239.192.7.59:1234':

Duration: N/A, start: 59572.163978, bitrate: 3150 kb/s
Program 5

Stream #0:0[0xcd]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 16:15 DAR 4:3], 3150 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x131](rus): Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, s16p

[mpegts @ 0x2323100] sample rate not set
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Stream mapping:

Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)

Last message repeated 1 times

comment:4 Changed 3 months ago by cehoyos

  • Resolution set to invalid
  • Status changed from new to closed

Afaict, the audio stream of the file you provided does not contain any data, the error message seems correct to me.

comment:5 Changed 3 months ago by krs_vital

Note: See TracTickets for help on using tickets.