vidify / old-audiosync

First implementation of the audio synchronization feature for Vidify, now obsolete
GNU Lesser General Public License v3.0
17 stars 3 forks source link

double free or corruption (!prev) #14

Closed marioortizmanero closed 4 years ago

marioortizmanero commented 4 years ago

Very occasional bug. This may have been fixed accidentally in a commit.

log:

~/Programming/vidify audiosync*
vidify ❯ py -m vidify --audiosync --debug
[22:58:28.297] INFO: Using vlc as the player
[22:58:28.297] INFO: Using MPRIS_LINUX as the API
[22:58:29.273] INFO: Connection attempt 1
[22:58:29.275] INFO: Looking for players
[22:58:29.280] INFO: Using org.mpris.MediaPlayer2.spotify
[22:58:29.283] INFO: Succesfully connected to the API
[22:58:29.284] INFO: Starting the audiosync thread
[22:58:29.287] INFO: Starting the youtube-dl thread
audiosync: Starting to read the capture pipe
ffmpeg version n4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[youtube:search] query "AC/DC - Back In Black Official Video": Downloading page 1
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, pulse, from 'default':
  Duration: N/A, start: 1578088709.753363, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_f64le (native))
Press [q] to stop, [?] for help
Output #0, f64le, to 'pipe:1':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0: Audio: pcm_f64le, 48000 Hz, mono, dbl, 3072 kb/s
    Metadata:
      encoder         : Lavc58.54.100 pcm_f64le
[download] Downloading playlist: AC/DC - Back In Black Official Video
[youtube:search] playlist AC/DC - Back In Black Official Video: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[youtube] pAgnJDJN4VA: Downloading webpage
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 58665 >= 58556
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 71486 >= 71399
[youtube] pAgnJDJN4VA: Downloading video info webpage
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 157258 >= 157018
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 160324 >= 159608
[download] Finished downloading playlist: AC/DC - Back In Black Official Video
[22:58:32.140] INFO: Starting new video
[22:58:32.143] INFO: Playing/Pausing video
[22:58:32.144] DEBUG: Starting new HTTPS connection (1): lyrics.wikia.com:443
audiosync: obtained youtube-dl URL
ffmpeg version n4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[00007f10202300f0] mp4 demux warning: elst box found
[00007f10202300f0] mp4 demux warning: no chunk defined
[00007f10202300f0] mp4 demux warning: STTS table of 0 entries
[22:58:32.264] DEBUG: https://lyrics.wikia.com:443 "GET /wiki/Ac/Dc:Back_In_Black HTTP/1.1" 301 20
[00007f10202300f0] mp4 demux: Fragment sequence discontinuity detected 1 != 0
[22:58:32.267] DEBUG: Starting new HTTPS connection (1): lyrics.fandom.com:443
mesa: for the   --simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the   --global-isel-abort option: may only occur zero or one times!
[00007f0ffc0022d0] glconv_vaapi_x11 gl error: vaDeriveImage: operation failed
[00007f1004047270] main video output error: video output creation failed
[00007f10202f4950] main decoder error: failed to create video output
[22:58:32.360] DEBUG: https://lyrics.fandom.com:443 "GET /wiki/AC/DC:Back_In_Black HTTP/1.1" 200 81055
Input #0, matroska,webm, from 'https://r2---sn-w511uxa-h5qk.googlevideo.com/videoplayback?expire=1578110376&ei=SLkPXpz8LsqumLAPhuqa4Ao&ip=87.222.27.37&id=o-AKG7lNwsUMZh75ywkmJLJojNHVLzz7Qd_lGtWITvccOI&itag=251&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-w511uxa-h5qk%2Csn-25ge7nsd&ms=au%2Conr&mv=m&mvi=1&pcm2cms=yes&pl=22&gcr=es&initcwndbps=1108750&mime=audio%2Fwebm&gir=yes&clen=4100517&dur=254.501&lmt=1575000738852058&mt=1578088658&fvip=2&keepalive=yes&fexp=23842630%2C23860862&c=WEB&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AHylml4wRAIgfTaC9DH5zUOde6M2qw7Zt6uLFnFvDdwKK5fqQrd76soCIEM73rPdK3k9eRYapYGhyHvAlyMmsAgyatgoHNWVyIVp&sig=ALgxI2wwRAIgVFcgI_Lse47gIo6ZBO0ZAP7TcG8LTRH_R4Pk65AfI8cCIHINm_-wQQj1FRoK78yCRqk70vWnvW7psc8QiKqOBAZY&ratebypass=yes':
  Metadata:
    encoder         : google/video-file
  Duration: 00:04:14.50, start: -0.007000, bitrate: 128 kb/s
    Stream #0:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
Stream mapping:
  Stream #0:0 -> #0:0 (opus (native) -> pcm_f64le (native))
Press [q] to stop, [?] for help
Output #0, f64le, to 'pipe:1':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0(eng): Audio: pcm_f64le, 48000 Hz, mono, dbl, 3072 kb/s (default)
    Metadata:
      encoder         : Lavc58.54.100 pcm_f64le
mesa: for the   --simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the   --global-isel-abort option: may only occur zero or one times!
[00007f10202f4950] avcodec decoder: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding
AC/DC - Back In Black
Back in black
I hit the sack
I've been too long, I'm glad to be back
Yes, I'm let loose
From the noose
That's kept me hanging around

I been lookin' at the sky
'Cause it's gettin' me high
Forget the hearse 'cause I'll never die
I got nine lives
Cat's eyes
Abusin' every one of them and running wild

'Cause I'm back
Yes, I'm back
Well, I'm back
Yes, I'm back
Well, I'm

Back
Back
Well, I'm back in black
Yes, I'm back in black, yow

Back in the back of a Cadillac
Number one with a bullet
I'm a power pack
Yes, I'm in a band with a gang
They've got to catch me if they want me to hang

'Cause I'm back on the track
And I'm beatin' the flack
Nobody's gonna get me on another rap
So look at me now
I'm just makin' my play
Don't try to push your luck
Just get out of my way

'Cause I'm back
Yes, I'm back
Well, I'm back
Yes, I'm back
Well I'm

Back
Back
Well, I'm back in black
Yes, I'm back in black

Well, I'm back
Yes, I'm back
Well, I'm back
Yes, I'm back
Well, I'm

Back
Back
Well, I'm back in black
Yes, I'm back in black, ow

Oh, yeah
Oh, yeah
Yes, I am
Hey, yeah
Yeah
Oh, yeah
Back in now

Well, I'm
Back (I'm back)
Back (I'm back)
Back (I'm back)
Back (I'm back)
Back (I'm back)
Back (I'm back)
Back in black
Yes, I'm back in black

Out of sight

audiosync: Next interval (0): cap=144018 down=511400/s speed=1.43x    
audiosync: -3125 frames of delay with a confidence of -0.035255
size=   11250kB time=00:00:30.00 bitrate=3071.3kbits/s speed=45.4x    
video:0kB audio:11250kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 196874 >= 195721
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 196874 >= 196472
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 196874 >= 196048
audiosync: Next interval (1): cap=288006 down=1440000s speed=1.14x    
audiosync: 100359 frames of delay with a confidence of 0.113911
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 443754 >= 443751
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 446008 >= 445993
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 456201 >= 456199
audiosync: Next interval (2): cap=480007 down=1440000s speed=1.08x    
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 527323 >= 527316
audiosync: 164220 frames of delay with a confidence of 0.063730
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 605321 >= 605315
[22:58:41.385] INFO: New video detected
[22:58:41.385] INFO: Starting the audiosync thread
[22:58:41.385] INFO: Starting the youtube-dl thread
audiosync: Starting to read the capture pipe
[youtube:search] query "Arcade Fire - Ready to Start Official Video": Downloading page 1
ffmpeg version n4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 606079 >= 605930
[f64le @ 0x561d4c349b40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 606079 >= 605858
[download] Downloading playlist: Arcade Fire - Ready to Start Official Video
[youtube:search] playlist Arcade Fire - Ready to Start Official Video: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[youtube] 9oI27uSzxNQ: Downloading webpage
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, pulse, from 'default':
  Duration: N/A, start: 1578088722.238474, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_f64le (native))
Press [q] to stop, [?] for help
Output #0, f64le, to 'pipe:1':52 bitrate=2898.2kbits/s speed=1.09x    
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0: Audio: pcm_f64le, 48000 Hz, mono, dbl, 3072 kb/s
    Metadata:
      encoder         : Lavc58.54.100 pcm_f64le
[youtube] 9oI27uSzxNQ: Downloading video info webpage
[f64le @ 0x5638dc68aac0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 64547 >= 63738
[f64le @ 0x5638dc68aac0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 125005 >= 124010
[download] Finished downloading playlist: Arcade Fire - Ready to Start Official Video
[22:58:43.510] INFO: Starting new video
[00007f1020215210] main tls client error: connection error: Resource temporarily unavailable
[00007f1020215210] gnutls tls client error: TLS handshake error: Error in the push function.
[00007f1020215210] main tls client error: TLS session handshake error
[00007f1020215210] main tls client error: connection error: Network is unreachable
[22:58:43.586] INFO: Playing/Pausing video
[22:58:43.588] DEBUG: Starting new HTTPS connection (1): lyrics.wikia.com:443
[00007f1020260750] mp4 demux warning: elst box found
[00007f1020260750] mp4 demux warning: no chunk defined
[00007f1020260750] mp4 demux warning: STTS table of 0 entries
[00007f1020260750] mp4 demux: Fragment sequence discontinuity detected 1 != 0
[00007f0ffc214950] glconv_vaapi_x11 gl error: vaDeriveImage: operation failed
[00005576a5199810] main generic warning: cannot reuse provided vout
[00007f1010001700] glconv_vaapi_x11 gl error: vaDeriveImage: operation failed
[00007f100004d940] main video output error: video output creation failed
[00007f102085a900] main decoder error: failed to create video output
[22:58:43.859] DEBUG: https://lyrics.wikia.com:443 "GET /wiki/Arcade_Fire:Ready_To_Start HTTP/1.1" 301 20
[22:58:43.861] DEBUG: Starting new HTTPS connection (1): lyrics.fandom.com:443
[00007f102085a900] avcodec decoder: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding
[22:58:44.153] DEBUG: https://lyrics.fandom.com:443 "GET /wiki/Arcade_Fire:Ready_To_Start HTTP/1.1" 200 79867
Arcade Fire - Ready to Start
If the businessmen drink my blood
Like the kids in art school said they would
Then I guess I'll just begin again
You say, "Can we still be friends?"

If I was scared, I would
And if I was bored, you know I would
And if I was yours, but I'm not

All the kids have always known
That the emperor wears no clothes
But they bow down to him anyway
It's better than being alone

If I was scared, I would
And if I was bored, you know I would
And if I was yours, but I'm not

Now you're knocking at my door
Saying, "Please come out with us tonight"
But I would rather be alone
Than pretend I feel alright

If the businessmen drink my blood
Like the kids in art school said they would
Then I guess I'll just begin again
You say, "Can we still be friends?"

If I was scared, I would
And if I was pure, you know I would
And if I was yours, but I'm not
Now I'm ready to start

If I was scared, I would
And if I was pure, you know I would
And if I was yours, but I'm not
Now I'm ready to start
Now I'm ready to start

I would rather be wrong
Than live in the shadows of your sun
My mind is open wide and now I'm ready to start
Now I'm ready to start
My mind is open wide and now I'm ready to start
You're not sure you open the door and step out into the dark
Now I'm ready

audiosync: obtained youtube-dl URL
ffmpeg version n4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[f64le @ 0x5638dc68aac0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 162958 >= 162037
Input #0, matroska,webm, from 'https://r2---sn-w511uxa-h5qk.googlevideo.com/videoplayback?e
xpire=1578110389&ei=VLkPXrX6OoGjVe_tvZAG&ip=87.222.27.37&id=o-AGB3sQeSrdHip5TjmID5wVLnP7TBI5rDdO5nG37jaJSj&itag=251&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-w511uxa-h5qk%2Csn-25ge7nsd&ms=au%2Conr&mv=m&mvi=1&pcm2cms=yes&pl=22&gcr=es&initcwndbps=1108750&mime=audio%2Fwebm&gir=yes&clen=3919311&dur=256.681&lmt=1540762253359418&mt=1578088658&fvip=2&keepalive=yes&fexp=23842630&c=WEB&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AHylml4wRgIhAND4eY62mrruPbKKjCkDfDlPescliAk8yqVU6JARB3KUAiEA5aOgvyxVAt6TdGC6KotTKMsYX6JihNq1Se-3-0pAhfw%3D&sig=ALgxI2wwRQIgAs6QSDUbdHC1s9_--bWhHfvOpKNSi8Ex1pypeQsBwgICIQDPP66CLYooHQ5PsF9Hiv4xk73dXn5P84gPuGG8KHEA0g==&ratebypass=yes':
  Metadata:
    encoder         : google/video-file
  Duration: 00:04:16.68, start: -0.007000, bitrate: 122 kb/s
    Stream #0:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
Stream mapping:
  Stream #0:0 -> #0:0 (opus (native) -> pcm_f64le (native))
Press [q] to stop, [?] for help
Output #0, f64le, to 'pipe:1':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0(eng): Audio: pcm_f64le, 48000 Hz, mono, dbl, 3072 kb/s (default)
    Metadata:
      encoder         : Lavc58.54.100 pcm_f64le
[f64le @ 0x5638dc68aac0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 165033 >= 164963
audiosync: Next interval (3): cap=720053 down=1440000s speed=1.44x    
audiosync: Next interval (0): cap=144019 down=1127474
size=   11250kB time=00:00:30.00 bitrate=3071.3kbits/s speed=44.9x    
video:0kB audio:11250kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
double free or corruption (!prev)
[f64le @ 0x5638dc68aac0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 195684 >= 194632
[f64le @ 0x5638dc68aac0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 195684 >= 194365
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:1: Broken pipe
size=    1192kB time=00:00:04.15 bitrate=2350.1kbits/s speed=0.958x    
video:0kB audio:1209kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
zsh: abort (core dumped)  python3 -m vidify --audiosync --debug
Conversion failed!
marioortizmanero commented 4 years ago

I haven't seen this in a while, it's probably been fixed with the latest changes