-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error probing file #14
Comments
My file has a SIDE_DATA tag which is not expected in the code. I update the code and added some logic to ignore the SIDE_DATA for now. p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
Just tried your code as I have the same issue in a project of mine and it did not work for me. It prints "Found side data" and retrieves media information, but I do not get any data for the video/audio streams anymore. This is what my file data looks like: |
You are right. My logic is wrong. All the data after the SIDE_DATA will be ignored. In my case it worked as I was only using data that was "before" the SIDE_DATA. I did not have time to test, or do a proper diff. Give it a try and give me some feedback. Later I will try it on my side. I am not involved in the development of this code, but I will propose a merge if this works fine. Thanks for the feedback. Can you try to move this piece of code below: if(side_data): for line in iter(p.stdout.readline, b''):
|
If modified like below the code seems to work fine. At least for my file I can confirm that all data is now retrieved as it should
|
I'm uploading an iphone created MOV file and getting this exact issue with ffprobe-python, but nothing seems wrong on command line? |
https://github.com/hugomcruz/ffprobe-python I did a fork where I fixed some of those issues about 2 years ago when I created a programme to process my iphone videos. |
Error:
(python-v-env) hcruz@Hugos-MacBook-Pro personal-file-processor % python3 demo.py
Traceback (most recent call last):
File "demo.py", line 38, in
video_creation_datetime("/Users/hcruz/Documents/development/python/personal-file-processor/IMG_0119.MOV")
File "demo.py", line 22, in video_creation_datetime
metadata=FFProbe(filepath)
File "/Users/hcruz/Documents/development/python/python-v-env/lib/python3.8/site-packages/ffprobe/ffprobe.py", line 54, in init
self.streams.append(FFStream(data_lines))
File "/Users/hcruz/Documents/development/python/python-v-env/lib/python3.8/site-packages/ffprobe/ffprobe.py", line 114, in init
self.dict.update({key: value for key, value, *_ in [line.strip().split('=')]})
File "/Users/hcruz/Documents/development/python/python-v-env/lib/python3.8/site-packages/ffprobe/ffprobe.py", line 114, in
self.dict.update({key: value for key, value, *_ in [line.strip().split('=')]})
ValueError: not enough values to unpack (expected at least 2, got 1)
FFPROBE OUTPUT
(python-v-env) hcruz@Hugos-MacBook-Pro personal-file-processor % ffprobe IMG_0119.MOV
ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
built with Apple clang version 12.0.0 (clang-1200.0.32.28)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_9 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'IMG_0119.MOV':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2021-01-11T09:59:47.000000Z
com.apple.quicktime.location.ISO6709: +10.7792+106.7464+000.499/
com.apple.quicktime.make: Apple
com.apple.quicktime.model: iPhone 6
com.apple.quicktime.software: 12.5
com.apple.quicktime.creationdate: 2021-01-11T16:59:47+0700
Duration: 00:00:02.37, start: 0.000000, bitrate: 11021 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 10880 kb/s, 30.02 fps, 30 tbr, 600 tbn, 1200 tbc (default)
Metadata:
rotate : 180
creation_time : 2021-01-11T09:59:47.000000Z
handler_name : Core Media Video
encoder : H.264
Side data:
displaymatrix: rotation of -180.00 degrees
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 90 kb/s (default)
Metadata:
creation_time : 2021-01-11T09:59:47.000000Z
handler_name : Core Media Audio
Stream #0:2(und): Data: none (mebx / 0x7862656D), 23 kb/s (default)
Metadata:
creation_time : 2021-01-11T09:59:47.000000Z
handler_name : Core Media Metadata
Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
Metadata:
creation_time : 2021-01-11T09:59:47.000000Z
handler_name : Core Media Metadata
Unsupported codec with id 0 for input stream 2
Unsupported codec with id 0 for input stream 3
The text was updated successfully, but these errors were encountered: