GNOME Bugzilla – Bug 789309
Easytag corrupts opus files when saving tags
Last modified: 2017-10-22 07:56:27 UTC
Steps to reproduce: 1. Obtain an opus file, e.g. by running youtube-dl -x UJsUpeXK6Jo 2. In easytag, navigate to the file and fill in the Title and Artist fields 3. Click Save changes to selected files The opus file is now corrupted. Using mplayer, the file still plays, but gives a few errors like "[opus @ 0x7f6f8a006000]Error parsing the packet header.". MPD, for example, refuses to play the file now, logging "exception: Failed to decode xyz.opus" and "exception: nested: libopus error: corrupted stream". I don't know enough about this stuff to know what's wrong, but a quick binary diff shows that easytag inserted some stuff where it probably doesn't belong, even within the stream, after the tags. See the attached screenshot. This is easytag 2.4.3 on linux 4.13.7 with opus 1.2.1 installed.
Created attachment 362027 [details] crude vimdiff of the opus file before and after writing tags
And here's what opusinfo has to say about the files. ====== Before Easytag ====== > opusinfo 01\ -\ Remember\ summer\ days.opus Processing file "Vaporwave/Kurdtbada/Mixes/01 - Remember summer days.opus"... New logical stream (#1, serial: 818eaa08): type opus Encoded with Lavf57.83.100 User comments section follows... language=eng encoder=Lavf57.83.100 Opus stream 1: Pre-skip: 312 Playback gain: 0 dB Channels: 2 Original sample rate: 48000Hz Packet duration: 20.0ms (max), 20.0ms (avg), 20.0ms (min) Page duration: 1000.0ms (max), 999.8ms (avg), 200.0ms (min) Total data length: 57125232 bytes (overhead: 0.77%) Playback length: 57m:59.193s Average bitrate: 131.4 kb/s, w/o overhead: 130.3 kb/s Logical stream 1 ended =================== ====== After Easytag ====== > opusinfo 01\ -\ Remember\ summer\ days.opus ~/temp Processing file "01 - Remember summer days.opus"... New logical stream (#1, serial: 818eaa08): type opus Encoded with Lavf57.83.100 User comments section follows... TITLE=Remember Summer Days ARTIST=Kurdtbada WARNING: Invalid packet or misplaced header in stream 1 Negative or zero granulepos (0) on Opus stream outside of headers. This file was created by a buggy encoder WARNING: Invalid packet or misplaced header in stream 1 Negative or zero granulepos (0) on Opus stream outside of headers. This file was created by a buggy encoder WARNING: Sample count behind granule (336000<336360) in stream 1 WARNING: Sample count behind granule (672000<672360) in stream 1 WARNING: Sample count behind granule (1008000<1008360) in stream 1 WARNING: Sample count behind granule (2784000<2784360) in stream 1 WARNING: Sample count behind granule (2832000<2832360) in stream 1 WARNING: Sample count behind granule (2880000<2880360) in stream 1 WARNING: Sample count behind granule (3264000<3264360) in stream 1 WARNING: Sample count behind granule (3312000<3312360) in stream 1 WARNING: Sample count behind granule (3984000<3984360) in stream 1 WARNING: Sample count behind granule (4944000<4944360) in stream 1 WARNING: Sample count behind granule (4992000<4992360) in stream 1 WARNING: Sample count behind granule (5376000<5376360) in stream 1 WARNING: Sample count behind granule (5424000<5424360) in stream 1 WARNING: Sample count behind granule (5808000<5808360) in stream 1 WARNING: Sample count behind granule (5904000<5904360) in stream 1 WARNING: Sample count behind granule (6336000<6336360) in stream 1 WARNING: Sample count behind granule (6912000<6912360) in stream 1 WARNING: Sample count behind granule (8112000<8112360) in stream 1 WARNING: Sample count behind granule (9888000<9888360) in stream 1 WARNING: Sample count behind granule (9936000<9936360) in stream 1 WARNING: Sample count behind granule (9984000<9984360) in stream 1 WARNING: Sample count behind granule (11184000<11184360) in stream 1 WARNING: Sample count behind granule (12144000<12144360) in stream 1 WARNING: Sample count behind granule (12192000<12192360) in stream 1 WARNING: Sample count behind granule (12480000<12480360) in stream 1 WARNING: Sample count behind granule (12960000<12960360) in stream 1 WARNING: Sample count behind granule (15120000<15120360) in stream 1 WARNING: Sample count behind granule (15264000<15264360) in stream 1 WARNING: Sample count behind granule (15792000<15792360) in stream 1 WARNING: Sample count behind granule (16224000<16224360) in stream 1 WARNING: Sample count behind granule (16656000<16656360) in stream 1 WARNING: Sample count behind granule (18000000<18000360) in stream 1 WARNING: Sample count behind granule (19536000<19536360) in stream 1 WARNING: Sample count behind granule (21504000<21504360) in stream 1 WARNING: Sample count behind granule (22176000<22176360) in stream 1 WARNING: Sample count behind granule (24048000<24048360) in stream 1 WARNING: Sample count behind granule (24768000<24768360) in stream 1 WARNING: Sample count behind granule (24960000<24960360) in stream 1 WARNING: Sample count behind granule (25248000<25248360) in stream 1 WARNING: Sample count behind granule (26592000<26592360) in stream 1 WARNING: Sample count behind granule (27360000<27360360) in stream 1 WARNING: Sample count behind granule (28368000<28368360) in stream 1 WARNING: Sample count behind granule (28608000<28608360) in stream 1 WARNING: Sample count behind granule (28896000<28896360) in stream 1 WARNING: Sample count behind granule (30672000<30672360) in stream 1 WARNING: Sample count behind granule (32304000<32304360) in stream 1 WARNING: Sample count behind granule (33312000<33312360) in stream 1 WARNING: Sample count behind granule (34272000<34272360) in stream 1 WARNING: Sample count behind granule (34464000<34464360) in stream 1 WARNING: Sample count behind granule (34704000<34704360) in stream 1 WARNING: Sample count behind granule (34800000<34800360) in stream 1 WARNING: Sample count behind granule (35328000<35328360) in stream 1 WARNING: Sample count behind granule (36384000<36384360) in stream 1 WARNING: Sample count behind granule (36576000<36576360) in stream 1 WARNING: Sample count behind granule (37056000<37056360) in stream 1 WARNING: Sample count behind granule (38112000<38112360) in stream 1 WARNING: Sample count behind granule (38496000<38496360) in stream 1 WARNING: Sample count behind granule (39120000<39120360) in stream 1 WARNING: Sample count behind granule (39792000<39792360) in stream 1 WARNING: Sample count behind granule (40560000<40560360) in stream 1 WARNING: Sample count behind granule (40608000<40608360) in stream 1 WARNING: Sample count behind granule (41616000<41616360) in stream 1 WARNING: Sample count behind granule (43104000<43104360) in stream 1 WARNING: Sample count behind granule (44640000<44640360) in stream 1 WARNING: Sample count behind granule (46128000<46128360) in stream 1 WARNING: Sample count behind granule (46176000<46176360) in stream 1 WARNING: Sample count behind granule (47424000<47424360) in stream 1 WARNING: Sample count behind granule (47712000<47712360) in stream 1 WARNING: Sample count behind granule (48576000<48576360) in stream 1 WARNING: Sample count behind granule (48720000<48720360) in stream 1 WARNING: Sample count behind granule (48768000<48768360) in stream 1 WARNING: Sample count behind granule (49152000<49152360) in stream 1 WARNING: Sample count behind granule (49536000<49536360) in stream 1 WARNING: Sample count behind granule (49920000<49920360) in stream 1 WARNING: Sample count behind granule (50448000<50448360) in stream 1 WARNING: Sample count behind granule (50928000<50928360) in stream 1 WARNING: Sample count behind granule (52416000<52416360) in stream 1 WARNING: Sample count behind granule (52752000<52752360) in stream 1 WARNING: Sample count behind granule (52896000<52896360) in stream 1 WARNING: Sample count behind granule (53760000<53760360) in stream 1 WARNING: Sample count behind granule (55392000<55392360) in stream 1 WARNING: Sample count behind granule (55968000<55968360) in stream 1 WARNING: Sample count behind granule (56544000<56544360) in stream 1 WARNING: Sample count behind granule (56736000<56736360) in stream 1 WARNING: Sample count behind granule (56976000<56976360) in stream 1 WARNING: Sample count behind granule (57168000<57168360) in stream 1 WARNING: Sample count behind granule (58176000<58176360) in stream 1 WARNING: Sample count behind granule (58464000<58464360) in stream 1 WARNING: Sample count behind granule (58704000<58704360) in stream 1 WARNING: Sample count behind granule (59184000<59184360) in stream 1 WARNING: Sample count behind granule (59424000<59424360) in stream 1 WARNING: Sample count behind granule (60624000<60624360) in stream 1 WARNING: Sample count behind granule (61104000<61104360) in stream 1 WARNING: Sample count behind granule (61728000<61728360) in stream 1 WARNING: Sample count behind granule (62496000<62496360) in stream 1 WARNING: Sample count behind granule (62688000<62688360) in stream 1 WARNING: Sample count behind granule (63072000<63072360) in stream 1 WARNING: Sample count behind granule (63408000<63408360) in stream 1 WARNING: Sample count behind granule (64464000<64464360) in stream 1 WARNING: Sample count behind granule (64608000<64608360) in stream 1 WARNING: Sample count behind granule (65088000<65088360) in stream 1 WARNING: Sample count behind granule (65232000<65232360) in stream 1 WARNING: Sample count behind granule (65712000<65712360) in stream 1 WARNING: Sample count behind granule (66192000<66192360) in stream 1 WARNING: Sample count behind granule (66816000<66816360) in stream 1 WARNING: Sample count behind granule (67200000<67200360) in stream 1 WARNING: Sample count behind granule (67488000<67488360) in stream 1 WARNING: Sample count behind granule (68064000<68064360) in stream 1 WARNING: Sample count behind granule (68592000<68592360) in stream 1 WARNING: Sample count behind granule (68736000<68736360) in stream 1 WARNING: Sample count behind granule (69456000<69456360) in stream 1 WARNING: Sample count behind granule (70128000<70128360) in stream 1 WARNING: Sample count behind granule (70320000<70320360) in stream 1 WARNING: Sample count behind granule (70560000<70560360) in stream 1 WARNING: Sample count behind granule (70752000<70752360) in stream 1 WARNING: Sample count behind granule (72096000<72096360) in stream 1 WARNING: Sample count behind granule (73008000<73008360) in stream 1 WARNING: Sample count behind granule (73728000<73728360) in stream 1 WARNING: Sample count behind granule (75168000<75168360) in stream 1 WARNING: Sample count behind granule (75792000<75792360) in stream 1 WARNING: Sample count behind granule (76128000<76128360) in stream 1 WARNING: Sample count behind granule (76944000<76944360) in stream 1 WARNING: Sample count behind granule (77568000<77568360) in stream 1 WARNING: Sample count behind granule (77760000<77760360) in stream 1 WARNING: Sample count behind granule (77904000<77904360) in stream 1 WARNING: Sample count behind granule (78048000<78048360) in stream 1 WARNING: Sample count behind granule (78336000<78336360) in stream 1 WARNING: Sample count behind granule (79776000<79776360) in stream 1 WARNING: Sample count behind granule (81504000<81504360) in stream 1 WARNING: Sample count behind granule (84480000<84480360) in stream 1 WARNING: Sample count behind granule (86112000<86112360) in stream 1 WARNING: Sample count behind granule (86448000<86448360) in stream 1 WARNING: Sample count behind granule (86496000<86496360) in stream 1 WARNING: Sample count behind granule (88560000<88560360) in stream 1 WARNING: Sample count behind granule (88944000<88944360) in stream 1 WARNING: Sample count behind granule (89568000<89568360) in stream 1 WARNING: Sample count behind granule (90000000<90000360) in stream 1 WARNING: Sample count behind granule (90144000<90144360) in stream 1 WARNING: Sample count behind granule (91920000<91920360) in stream 1 WARNING: Sample count behind granule (92736000<92736360) in stream 1 WARNING: Sample count behind granule (93024000<93024360) in stream 1 WARNING: Sample count behind granule (93120000<93120360) in stream 1 WARNING: Sample count behind granule (94032000<94032360) in stream 1 WARNING: Sample count behind granule (94176000<94176360) in stream 1 WARNING: Sample count behind granule (94896000<94896360) in stream 1 WARNING: Sample count behind granule (95952000<95952360) in stream 1 WARNING: Sample count behind granule (96144000<96144360) in stream 1 WARNING: Sample count behind granule (98448000<98448360) in stream 1 WARNING: Sample count behind granule (98736000<98736360) in stream 1 WARNING: Sample count behind granule (99648000<99648360) in stream 1 WARNING: Sample count behind granule (99888000<99888360) in stream 1 WARNING: Sample count behind granule (100032000<100032360) in stream 1 WARNING: Sample count behind granule (100464000<100464360) in stream 1 WARNING: Sample count behind granule (101088000<101088360) in stream 1 WARNING: Sample count behind granule (102576000<102576360) in stream 1 WARNING: Sample count behind granule (103344000<103344360) in stream 1 WARNING: Sample count behind granule (104208000<104208360) in stream 1 WARNING: Sample count behind granule (104688000<104688360) in stream 1 WARNING: Sample count behind granule (105312000<105312360) in stream 1 WARNING: Sample count behind granule (105360000<105360360) in stream 1 WARNING: Sample count behind granule (107664000<107664360) in stream 1 WARNING: Sample count behind granule (107856000<107856360) in stream 1 WARNING: Sample count behind granule (108240000<108240360) in stream 1 WARNING: Sample count behind granule (108288000<108288360) in stream 1 WARNING: Sample count behind granule (109632000<109632360) in stream 1 WARNING: Sample count behind granule (109824000<109824360) in stream 1 WARNING: Sample count behind granule (109872000<109872360) in stream 1 WARNING: Sample count behind granule (110208000<110208360) in stream 1 WARNING: Sample count behind granule (110784000<110784360) in stream 1 WARNING: Sample count behind granule (111696000<111696360) in stream 1 WARNING: Sample count behind granule (111984000<111984360) in stream 1 WARNING: Sample count behind granule (112416000<112416360) in stream 1 WARNING: Sample count behind granule (112704000<112704360) in stream 1 WARNING: Sample count behind granule (113472000<113472360) in stream 1 WARNING: Sample count behind granule (113904000<113904360) in stream 1 WARNING: Sample count behind granule (114000000<114000360) in stream 1 WARNING: Sample count behind granule (114432000<114432360) in stream 1 WARNING: Sample count behind granule (114672000<114672360) in stream 1 WARNING: Sample count behind granule (115248000<115248360) in stream 1 WARNING: Sample count behind granule (117408000<117408360) in stream 1 WARNING: Sample count behind granule (118608000<118608360) in stream 1 WARNING: Sample count behind granule (118944000<118944360) in stream 1 WARNING: Sample count behind granule (119232000<119232360) in stream 1 WARNING: Sample count behind granule (121056000<121056360) in stream 1 WARNING: Sample count behind granule (122112000<122112360) in stream 1 WARNING: Sample count behind granule (123072000<123072360) in stream 1 WARNING: Sample count behind granule (124704000<124704360) in stream 1 WARNING: Sample count behind granule (125952000<125952360) in stream 1 WARNING: Sample count behind granule (126000000<126000360) in stream 1 WARNING: Sample count behind granule (126144000<126144360) in stream 1 WARNING: Sample count behind granule (127440000<127440360) in stream 1 WARNING: Sample count behind granule (127488000<127488360) in stream 1 WARNING: Sample count behind granule (128064000<128064360) in stream 1 WARNING: Sample count behind granule (129072000<129072360) in stream 1 WARNING: Sample count behind granule (129696000<129696360) in stream 1 WARNING: Sample count behind granule (129744000<129744360) in stream 1 WARNING: Sample count behind granule (130272000<130272360) in stream 1 WARNING: Sample count behind granule (130608000<130608360) in stream 1 WARNING: Sample count behind granule (130992000<130992360) in stream 1 WARNING: Sample count behind granule (131280000<131280360) in stream 1 WARNING: Sample count behind granule (133488000<133488360) in stream 1 WARNING: Sample count behind granule (133536000<133536360) in stream 1 WARNING: Sample count behind granule (135456000<135456360) in stream 1 WARNING: Sample count behind granule (136944000<136944360) in stream 1 WARNING: Sample count behind granule (138048000<138048360) in stream 1 WARNING: Sample count behind granule (138336000<138336360) in stream 1 WARNING: Sample count behind granule (138768000<138768360) in stream 1 WARNING: Sample count behind granule (139296000<139296360) in stream 1 WARNING: Sample count behind granule (139440000<139440360) in stream 1 WARNING: Sample count behind granule (139488000<139488360) in stream 1 WARNING: Sample count behind granule (139872000<139872360) in stream 1 WARNING: Sample count behind granule (140160000<140160360) in stream 1 WARNING: Sample count behind granule (140400000<140400360) in stream 1 WARNING: Sample count behind granule (140880000<140880360) in stream 1 WARNING: Sample count behind granule (141168000<141168360) in stream 1 WARNING: Sample count behind granule (141360000<141360360) in stream 1 WARNING: Sample count behind granule (141600000<141600360) in stream 1 WARNING: Sample count behind granule (141888000<141888360) in stream 1 WARNING: Sample count behind granule (142272000<142272360) in stream 1 WARNING: Sample count behind granule (144144000<144144360) in stream 1 WARNING: Sample count behind granule (144192000<144192360) in stream 1 WARNING: Sample count behind granule (144480000<144480360) in stream 1 WARNING: Sample count behind granule (144528000<144528360) in stream 1 WARNING: Sample count behind granule (145872000<145872360) in stream 1 WARNING: Sample count behind granule (146352000<146352360) in stream 1 WARNING: Sample count behind granule (146928000<146928360) in stream 1 WARNING: Sample count behind granule (147408000<147408360) in stream 1 WARNING: Sample count behind granule (148032000<148032360) in stream 1 WARNING: Sample count behind granule (149136000<149136360) in stream 1 WARNING: Sample count behind granule (149328000<149328360) in stream 1 WARNING: Sample count behind granule (150624000<150624360) in stream 1 WARNING: Sample count behind granule (152976000<152976360) in stream 1 WARNING: Sample count behind granule (153024000<153024360) in stream 1 WARNING: Sample count behind granule (153120000<153120360) in stream 1 WARNING: Sample count behind granule (153264000<153264360) in stream 1 WARNING: Sample count behind granule (153744000<153744360) in stream 1 WARNING: Sample count behind granule (154560000<154560360) in stream 1 WARNING: Sample count behind granule (156576000<156576360) in stream 1 WARNING: Sample count behind granule (156720000<156720360) in stream 1 WARNING: Sample count behind granule (157632000<157632360) in stream 1 WARNING: Sample count behind granule (158256000<158256360) in stream 1 WARNING: Sample count behind granule (158400000<158400360) in stream 1 WARNING: Sample count behind granule (158688000<158688360) in stream 1 WARNING: Sample count behind granule (159648000<159648360) in stream 1 WARNING: Sample count behind granule (160128000<160128360) in stream 1 WARNING: Sample count behind granule (160704000<160704360) in stream 1 WARNING: Sample count behind granule (160848000<160848360) in stream 1 WARNING: Sample count behind granule (161184000<161184360) in stream 1 WARNING: Sample count behind granule (161376000<161376360) in stream 1 WARNING: Sample count behind granule (161520000<161520360) in stream 1 WARNING: Sample count behind granule (162384000<162384360) in stream 1 WARNING: Sample count behind granule (163056000<163056360) in stream 1 WARNING: Sample count behind granule (163248000<163248360) in stream 1 WARNING: Sample count behind granule (166080000<166080360) in stream 1 WARNING: Sample count behind granule (166656000<166656360) in stream 1 WARNING: Sample count behind granule (167001600<167001960) in stream 1 Opus stream 1: Pre-skip: 312 Playback gain: 0 dB Channels: 2 Original sample rate: 48000Hz Packet duration: 20.0ms (max), 20.0ms (avg), 20.0ms (min) Page duration: 2420.0ms (max), 261.7ms (avg), 0.0ms (min) Total data length: 57390284 bytes (overhead: 1.23%) Playback length: 57m:59.201s Average bitrate: 132 kb/s, w/o overhead: 130.3 kb/s Logical stream 1 ended ===================
*** This bug has been marked as a duplicate of bug 776110 ***