Page MenuHomePhabricator

Multiple .flac files on Wikimedia Commons have zero reported duration despite not having them with other tools
Closed, InvalidPublicBUG REPORT

Description

They seem to be fine and ffmpeg processes them correctly. I even re-muxed them using ffmpeg and reuploaded them, but they are still reported with zero duration. An exhaustive list based on recent dump:

https://commons.wikimedia.org/wiki/File:01_-_Gute_Nacht_(CK_2946-2,_ES_383).flac
https://commons.wikimedia.org/wiki/File:02_-_Die_Wetterfahne_(CK_2947-2,_ES_383).flac
https://commons.wikimedia.org/wiki/File:03_-_Gefrorene_Tränen_(CK_2948-1,_ER_270).flac
https://commons.wikimedia.org/wiki/File:04_-_Erstarrung_(CK_2949-1,_ER_270).flac
https://commons.wikimedia.org/wiki/File:05_-_Der_Lindenbaum_(CK_2950-2,_ES_384).flac
https://commons.wikimedia.org/wiki/File:06_-_Wasserfluth_(CK_2951-2,_ES_384).flac
https://commons.wikimedia.org/wiki/File:07_-_Auf_dem_Flusse_(CK_2952-2,_ES_385).flac
https://commons.wikimedia.org/wiki/File:08_-_Rückblick_(CK_2953-1,_ES_385).flac
https://commons.wikimedia.org/wiki/File:09_-_Irrlicht_(BK_2954-2,_ES_271).flac
https://commons.wikimedia.org/wiki/File:10_-_Rast_(BK_2955-2,_ER_271).flac
https://commons.wikimedia.org/wiki/File:11_-_Frühlingstraum_(CK_2956-1,_ES_386).flac
https://commons.wikimedia.org/wiki/File:12_-_Einsamkeit_(CK_2957-2,_ES_386).flac
https://commons.wikimedia.org/wiki/File:13_-_Die_Post_(CK_2958-2,_ER_272).flac
https://commons.wikimedia.org/wiki/File:14_-_Der_greise_Kopf_(BK_2959-2,_ER_272).flac
https://commons.wikimedia.org/wiki/File:15_-_Die_Krähe_(CK_2960-2,_ER_274).flac
https://commons.wikimedia.org/wiki/File:16_-_Letzte_Hoffnung_(CL_4400-2,_ES_392).flac
https://commons.wikimedia.org/wiki/File:17_-_Im_Dorfe_(CL_4399-1,_ES_392).flac
https://commons.wikimedia.org/wiki/File:18_-_Der_stürmische_Morgen_(BK_2963-1,_ER_274).flac
https://commons.wikimedia.org/wiki/File:19_-_Täuschung_(BL_4398-2,_ER_275).flac
https://commons.wikimedia.org/wiki/File:1_de_memoir_av_w_mnem_RECORD20210615163541.flac
https://commons.wikimedia.org/wiki/File:20_-_Der_Wegweiser_(CL_4402-1,_ES_393).flac
https://commons.wikimedia.org/wiki/File:21_-_Das_Wirtshaus_(CL_4403-1,_ES_393).flac
https://commons.wikimedia.org/wiki/File:22_-_Mut_(BK_2967-1,_ER_275).flac
https://commons.wikimedia.org/wiki/File:23_-_Die_Nebensonnen_(BL_4401-1,_ER_276).flac
https://commons.wikimedia.org/wiki/File:24_-_Der_Leiermann_(BK_2969-1,_ER_276).flac
https://commons.wikimedia.org/wiki/File:2_2nd_essai_apres_survol_du_dessin_RECORD20210615164455.flac
https://commons.wikimedia.org/wiki/File:3_De_memoire_apres_observation_des_dessins_RECORD20210615164604.flac
https://commons.wikimedia.org/wiki/File:4_Depuis_le_dessin_rappel_du_texte_RECORD20210615165246.flac
https://commons.wikimedia.org/wiki/File:5_Questions20210615165721_RECORD20210615165721.flac
https://commons.wikimedia.org/wiki/File:Bradyporus_dasypus_male.flac
https://commons.wikimedia.org/wiki/File:Canada2021Election-policies_and_politics_of_Iraninans_in_exile.flac
https://commons.wikimedia.org/wiki/File:Chaughara_darbar.flac
https://commons.wikimedia.org/wiki/File:Harmonica_sings_Tourdion.flac
https://commons.wikimedia.org/wiki/File:Harmonica_sings_Uti_vår_hage.flac
https://commons.wikimedia.org/wiki/File:Kolberg_-_German_pronounciation.flac
https://commons.wikimedia.org/wiki/File:Lachmoeweisma20052019.flac
https://commons.wikimedia.org/wiki/File:Lautäußerung_Kaninchen.flac
https://commons.wikimedia.org/wiki/File:Nightingale_Recording_-_Pines_of_Rome.flac
https://commons.wikimedia.org/wiki/File:Pabuteo.flac
https://commons.wikimedia.org/wiki/File:Rethinking-progress.flac
https://commons.wikimedia.org/wiki/File:Schadenfreude-native-german.flac
https://commons.wikimedia.org/wiki/File:Schönheide_Glockenweihe_Januar_2013.flac
https://commons.wikimedia.org/wiki/File:Sounds_of_a_rollicking_House_Rabbit.flac
https://commons.wikimedia.org/wiki/File:Very_close_thunder_cracks.flac
https://commons.wikimedia.org/wiki/File:حقوق_و_آزادی‌ها_پس_از_تمرکززدایی-مهدی_الهاشمی.flac
https://commons.wikimedia.org/wiki/File:Interview_with_AbuSharif_and_Faisal_-_View_of_the_Ahwazi_Democratic_Popular_Front_about_Human_Rights_and_Fundamental_Freedoms.flac
https://commons.wikimedia.org/wiki/File:گفتگو_با_کاوه_آهنگری-_نَقَدِه_و_مدیریت_دموکراتیک_در_شهرهای_چندفرهنگه.flac
https://commons.wikimedia.org/wiki/File:HPR-h4ck3rm1k3-2013-09-22-Whatsinmybag2.flac

Another user has a similar problem where the duration is set correctly locally – T376137

Event Timeline

Aklapper closed this task as Invalid.EditedFeb 15 2022, 1:58 PM

Same locally (ffmpeg-4.4.1), thus not a bug in Wikimedia code:

$:acko\> ffprobe 01_-_Gute_Nacht_\(CK_2946-2\,_ES_383\).flac 2>&1 | grep "Duration"
  Duration: N/A, start: 0.000000, bitrate: N/A

Interesting that even remuxing does not fix this. I will try recoding, given that flac is lossless.

Prototyperspective subscribed.

@Mitar how did you fix the files?

Here: https://commons.wikimedia.org/wiki/File:Raspberrymusic_-_Aliens_(trailer_music;_cinematic_epic_electronic_classical_music).flac and in the other FLAC files by raspberrymusic the duration is 0:00 until clicking play and also bitrate is shown as 0 bps for the two transcoded files (the files themselves are fine; maybe change the issue title accordingly).

Aklapper I checked with ffprobe and both the file before I uploaded as well as the file after downloading the file from WMC have Duration: 00:02:30.02, start: 0.000000, bitrate: 955 kb/s
Maybe it's easy to fix but it's a lowest importance issue and probably some bug at WMC (if not please identify where else).

I fixed them by running:

ffmpeg -i 01_-_Gute_Nacht_\(CK_2946-2\,_ES_383\).flac -map 0 -codec flac output.flac

Just copying the stream didn't help. But flac is lossless, so it is OK to recode.

For one file I had to do:

ffmpeg -i HPR-h4ck3rm1k3-2013-09-22-Whatsinmybag2.flac -err_detect +ignore_err -map 0 -codec flac output.flac

Okay that's just a workaround then. Maybe it doesn't even fix it since the duration is already set properly locally. Moreover, it would not fix this with bulk imports or imports via video2commons once and if such becomes possible.

No, duration is not set correct locally. For files I fixed above the following did not work:

ffmpeg -i 01_-_Gute_Nacht_\(CK_2946-2\,_ES_383\).flac -map 0 -codec copy output.flac

So this just remuxes the file. But the result was still 0 length. I had to recode them. So I do not think "locally" works. Maybe for some tools. But not for all. And it seems not for libraries used by Mediawiki.

I was talking about the link I posted. Let me know if I should rather open a new issue about it. ffmpeg and all other tools show the proper duration locally. I'll add the link and the info to the issue description in case people don't see the comment.

Yes, https://commons.wikimedia.org/wiki/File:Raspberrymusic_-_Aliens_(trailer_music;_cinematic_epic_electronic_classical_music).flac seems like a different problem. So maybe another issue would be better. Because that one is 0:0 in Commons but is not in ffmpeg. The files I fixed were 0:0 in ffmpeg as well.

Here is a file with wrong duration (much longer than actual). Maybe it's a related problem, e.g. it may improperly read the duration from some metadata.

@Prototyperspective Please do not reopen tasks for no reason - thanks.