Dumped opus streams have incorrect "Durations"., [TOS #6: moved from Scientific Discussion] |
Dumped opus streams have incorrect "Durations"., [TOS #6: moved from Scientific Discussion] |
Jan 24 2013, 23:19
Post
#1
|
|
![]() Group: Members Posts: 10 Joined: 7-January 13 Member No.: 105656 |
Hi
I've tried dumping some opus streams to file, but the results are strange. Dumped files have incorrect "Durations". This makes confusion when the files are played with VLC or SMPlayer etc. What causes opus streams to create files with incorrect "Durations"? And how can I fix it? For example, a 30 second sample:- CODE timeout 30 ffmpeg -y -i http://radioserver1.delfa.net/64.opus -c copy SmoothJazz1.opus MediaInfo shows incorrect Duration 4mn 17s. QUOTE General Complete name : SmoothJazz1.opus Format : OGG File size : 258 KiB Duration : 4mn 17s Overall bit rate : 8 227 bps Writing application : Lavf54.61.102 Audio ID : 36710742 (0x2302956) Format : Opus Duration : 4mn 17s Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 44.1 KHz Compression mode : Lossy Writing library : Lavf54.61.102 Similar results using MPlayer CODE rm -f fifo && mkfifo fifo; \ timeout 30 \ mplayer -nocache -noconsolecontrols -dumpstream -dumpfile fifo \ "http://radioserver1.delfa.net/64.opus" -demuxer lavf \ & ffmpeg -y -i fifo -c copy SmoothJazz2.opus \ && rm -f fifo MediaInfo shows incorrect Duration 2mn 18s. QUOTE General
Complete name : SmoothJazz2.opus Format : OGG File size : 254 KiB Duration : 2mn 18s Overall bit rate : 15.0 Kbps Writing application : Lavf54.61.102 Audio ID : 2098600889 (0x7D161BB9) Format : Opus Duration : 2mn 18s Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 44.1 KHz Compression mode : Lossy Writing library : Lavf54.61.102 This post has been edited by bat_guano: Jan 24 2013, 23:32 |
|
|
|
![]() |
Jan 25 2013, 23:47
Post
#2
|
|
|
Group: Members Posts: 47 Joined: 7-February 12 Member No.: 96993 |
1st of all, those are Ogg-encapsulated Opus files.
Generally speaking, life streams are implemented in a way that clients can connect at arbitrary offsets. In this case, the duration you see is correct! It's just the stream does not start from 0! You can see that instantly if you play the saved file in mplayer, or if you run opusinfo: CODE WARNING: sequence number gap in stream 1. Got page 257 when expecting page 2. Indicates missing data. (normal for live streams)
WARNING: discontinuity in stream (1) WARNING: EOS not set on stream 1 (normal for live streams) |
|
|
|
Feb 4 2013, 19:54
Post
#3
|
|
![]() Group: Developer Posts: 192 Joined: 8-July 03 Member No.: 7653 |
In this case, the duration you see is correct! It's just the stream does not start from 0! I don't think thats correct— unless there is some special mplayer convention it should be reporting the real duration of the provided file. There is no requirement that the times start at zero in a stream— I could, if I wanted, make opusenc choose random start times and I wouldn't expect it to break anything. |
|
|
|
bat_guano Dumped opus streams have incorrect "Durations". Jan 24 2013, 23:19
Dynamic These sound like raw streams, not Ogg-encapsulated... Jan 25 2013, 02:51
bat_guano QUOTE (Dynamic @ Jan 25 2013, 02:51) ... ... Jan 25 2013, 10:57
bat_guano QUOTE (2012 @ Jan 25 2013, 23:47) In this... Jan 26 2013, 02:45

bat_guano QUOTE (bat_guano @ Jan 26 2013, 03:45) Bu... Feb 2 2013, 20:32
bat_guano Hi
I've just tried this command again with a n... May 14 2013, 01:17![]() ![]() |
|
Lo-Fi Version | Time is now: 19th June 2013 - 04:26 |