Skip to content
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

FFprobeKit.execute is returning logs from the previous command #571

Closed
francescov1 opened this issue Sep 18, 2022 · 4 comments
Closed

FFprobeKit.execute is returning logs from the previous command #571

francescov1 opened this issue Sep 18, 2022 · 4 comments
Assignees
Labels
all-platforms bug Something isn't working fixed-in-v5.1 v4.5.1 Affects v4.5.1 release

Comments

@francescov1
Copy link

Description
When I run the following code, the logs from the first ffprobe command are returned for the second command as well. It seems that FFprobeKit.execute is either returning the previous session, or running the previous command.

  let session1 = FFprobeKit.execute("-loglevel error -count_packets -show_entries stream:format \"\(inputFilePath)\"")
  let logs1 = session1?.getAllLogsAsString()
  print("LOGS 1: \(logs1)")
  
  let session2 = FFprobeKit.execute("-loglevel error \"\(inputFilePath)\"")
  let logs2 = session2?.getAllLogsAsString()
  print("LOGS 2: \(logs2)") // This prints the same as logs1, even though it should be completely different

This occurs whether I use getAllLogsAsString, getLogsAsString or getOutput. If I remove -show_entries stream:format from the first command, the issue does not occur anymore.

Expected behavior
The proper logs are returned

Current behavior
Logs from the previous ffprobe command are returned instead

To Reproduce
Run the code above

Screenshots
If applicable, add screenshots to help explain your problem.

Logs

These are the logs from the code shown above. The second command should only return an empty string (or an error) but instead it returns the stream information fetched from the first command.

LOGS 1: Optional("[STREAM]\nindex=0\ncodec_name=h264\ncodec_long_name=unknown\nprofile=77\ncodec_type=video\ncodec_tag_string=avc1\ncodec_tag=0x31637661\nwidth=3360\nheight=2100\ncoded_width=3360\ncoded_height=2100\nclosed_captions=0\nhas_b_frames=1\nsample_aspect_ratio=1:1\ndisplay_aspect_ratio=8:5\npix_fmt=yuv420p\nlevel=52\ncolor_range=tv\ncolor_space=bt709\ncolor_transfer=bt709\ncolor_primaries=bt709\nchroma_location=bottom\nfield_order=progressive\nrefs=1\nis_avc=true\nnal_length_size=4\nid=0x1\nr_frame_rate=60/1\navg_frame_rate=5325/146\ntime_base=1/12000\nstart_pts=0\nstart_time=0.000000\nduration_ts=116600\nduration=9.716667\nbit_rate=19186307\nmax_bit_rate=N/A\nbits_per_raw_sample=8\nnb_frames=355\nnb_read_frames=N/A\nnb_read_packets=355\nDISPOSITION:default=1\nDISPOSITION:dub=0\nDISPOSITION:original=0\nDISPOSITION:comment=0\nDISPOSITION:lyrics=0\nDISPOSITION:karaoke=0\nDISPOSITION:forced=0\nDISPOSITION:hearing_impaired=0\nDISPOSITION:visual_impaired=0\nDISPOSITION:clean_effects=0\nDISPOSITION:attached_pic=0\nDISPOSITION:timed_thumbnails=0\nDISPOSITION:captions=0\nDISPOSITION:descriptions=0\nDISPOSITION:metadata=0\nDISPOSITION:dependent=0\nDISPOSITION:still_image=0\nTAG:language=und\nTAG:handler_name=Core Media Video\nTAG:vendor_id=[0][0][0][0]\n[/STREAM]\n[FORMAT]\nfilename=/Users/francescovirga/Desktop/QuickTime x264 NativeScreen (No Audio).mp4\nnb_streams=1\nnb_programs=0\nformat_name=mov,mp4,m4a,3gp,3g2,mj2\nformat_long_name=unknown\nstart_time=0.000000\nduration=9.717000\nsize=23310630\nbit_rate=19191627\nprobe_score=100\nTAG:major_brand=isom\nTAG:minor_version=512\nTAG:compatible_brands=isomiso2avc1mp41\nTAG:encoder=Lavf59.10.100\n[/FORMAT]\n")

LOGS 2: Optional("[STREAM]\nindex=0\ncodec_name=h264\ncodec_long_name=unknown\nprofile=77\ncodec_type=video\ncodec_tag_string=avc1\ncodec_tag=0x31637661\nwidth=3360\nheight=2100\ncoded_width=3360\ncoded_height=2100\nclosed_captions=0\nhas_b_frames=1\nsample_aspect_ratio=1:1\ndisplay_aspect_ratio=8:5\npix_fmt=yuv420p\nlevel=52\ncolor_range=tv\ncolor_space=bt709\ncolor_transfer=bt709\ncolor_primaries=bt709\nchroma_location=bottom\nfield_order=progressive\nrefs=1\nis_avc=true\nnal_length_size=4\nid=0x1\nr_frame_rate=60/1\navg_frame_rate=5325/146\ntime_base=1/12000\nstart_pts=0\nstart_time=0.000000\nduration_ts=116600\nduration=9.716667\nbit_rate=19186307\nmax_bit_rate=N/A\nbits_per_raw_sample=8\nnb_frames=355\nnb_read_frames=N/A\nnb_read_packets=N/A\nDISPOSITION:default=1\nDISPOSITION:dub=0\nDISPOSITION:original=0\nDISPOSITION:comment=0\nDISPOSITION:lyrics=0\nDISPOSITION:karaoke=0\nDISPOSITION:forced=0\nDISPOSITION:hearing_impaired=0\nDISPOSITION:visual_impaired=0\nDISPOSITION:clean_effects=0\nDISPOSITION:attached_pic=0\nDISPOSITION:timed_thumbnails=0\nDISPOSITION:captions=0\nDISPOSITION:descriptions=0\nDISPOSITION:metadata=0\nDISPOSITION:dependent=0\nDISPOSITION:still_image=0\nTAG:language=und\nTAG:handler_name=Core Media Video\nTAG:vendor_id=[0][0][0][0]\n[/STREAM]\n[FORMAT]\nfilename=/Users/francescovirga/Desktop/QuickTime x264 NativeScreen (No Audio).mp4\nnb_streams=1\nnb_programs=0\nformat_name=mov,mp4,m4a,3gp,3g2,mj2\nformat_long_name=unknown\nstart_time=0.000000\nduration=9.717000\nsize=23310630\nbit_rate=19191627\nprobe_score=100\nTAG:major_brand=isom\nTAG:minor_version=512\nTAG:compatible_brands=isomiso2avc1mp41\nTAG:encoder=Lavf59.10.100\n[/FORMAT]\n")

Environment

  • Platform: macOS
  • Architecture: x86_64
  • Version: ffmpeg-kit-macos-full-gpl 4.5.1
  • Source branch: main
  • Xcode version: 13.4.1
  • Cocoapods version: 1.11.3

Other
Add any other context about the problem here.

@tanersener
Copy link
Collaborator

As far as I remember, this is fixed on the development branch. Can you try the fix we have there? You need to build ffmpeg-kit yourself for that.

@tanersener tanersener added the duplicate This issue or pull request already exists label Sep 19, 2022
@francescov1
Copy link
Author

Hi @tanersener,

I tried building ffmpeg-kit manually on the development branch but the issue is still occurring. Any particular options I should be using to build it? Anything else I can try? Would like to get this resolved ASAP to get our next release out.

@tanersener
Copy link
Collaborator

tanersener commented Sep 19, 2022

People who are not interested in sponsoring open-source projects, but expecting maintainers to fix issues ASAP is the reason why this project will die one day! Thanks for reminding us how worthless our effort and time is.

Locking the conversation. Check the labels periodically to track the progress.

@arthenica arthenica locked and limited conversation to collaborators Sep 19, 2022
@arthenica arthenica unlocked this conversation Sep 19, 2022
@arthenica arthenica locked as too heated and limited conversation to collaborators Sep 19, 2022
@tanersener tanersener self-assigned this Sep 20, 2022
@tanersener tanersener added bug Something isn't working all-platforms v4.5.1 Affects v4.5.1 release fixed-on-development Fixed on the development branch. Not released yet. and removed duplicate This issue or pull request already exists labels Sep 20, 2022
@tanersener
Copy link
Collaborator

Fixed on the development branch.

@arthenica arthenica unlocked this conversation Sep 20, 2022
@tanersener tanersener added fixed-in-v5.1 and removed fixed-on-development Fixed on the development branch. Not released yet. labels Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
all-platforms bug Something isn't working fixed-in-v5.1 v4.5.1 Affects v4.5.1 release
Projects
None yet
Development

No branches or pull requests

2 participants