
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (61)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (7845)
-
Video encoding task not working with Django Celery Redis FFMPEG and GraphQL
18 juin 2023, par phanioI'm having a hard time trying to understand how is this FFMPEG encoding works while using Django, Celery, Redis, GraphQL and Docker too.


I have this video / courses platform project and want I'm trying to do using FFMPEG, Celery and Redis is to create different video resolutions so I can display them the way Youtube does inside the videoplayer ( the videoplayer is handled in frontend by Nextjs and Apollo Client ), now on the backend I've just learned that in order to use properly the FFMPEG to resize the oridinal video size, I need to use Celery and Redis to perform asyncronus tasks. I've found a few older posts here on stackoverflow and google, but is not quite enough info for someone who is using the ffmpeg and clery and redis for the first time ( I've started already step by step and created that example that adds two numbers together with celery, that works well ). Now I'm not sure what is wrong with my code, because first of all I'm not really sure where should I trigger the task from, I mean from which file, because at the end of the task I want to send the data through api using GrapQL Strawberry.


This is what I've tried by now :


So first things first my project structure looks like this


- backend #root directory
 --- backend
 -- __init__.py
 -- celery.py
 -- settings.py
 -- urls.py
 etc..

 --- static
 -- videos

 --- video
 -- models.py
 -- schema.py
 -- tasks.py
 -- types.py
 etc..

 --- .env

 --- db.sqlite3

 --- docker-compose.yml

 --- Dockerfile

 --- manage.py

 --- requirements.txt



here is my settings.py file :


from pathlib import Path
import os

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

DEBUG = True

ALLOWED_HOSTS=["localhost", "0.0.0.0", "127.0.0.1"]

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'


# Application definition

INSTALLED_APPS = [
 "corsheaders",
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',

 "strawberry.django",
 "video"
]

etc...

STATIC_URL = '/static/'
MEDIA_URL = '/videos/'

STATICFILES_DIRS = [
 BASE_DIR / 'static',
 # BASE_DIR / 'frontend/build/static',
]

MEDIA_ROOT = BASE_DIR / 'static/videos'

STATIC_ROOT = BASE_DIR / 'staticfiles'

STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'

CORS_ALLOW_ALL_ORIGINS = True


CELERY_BEAT_SCHEDULER = 'django_celery_beat.schedulers:DatabaseScheduler'

# REDIS CACHE
CACHES = {
 "default": {
 "BACKEND": "django_redis.cache.RedisCache",
 "LOCATION": f"redis://127.0.0.1:6379/1",
 "OPTIONS": {
 "CLIENT_CLASS": "django_redis.client.DefaultClient",
 },
 }
}

# Docker
CELERY_BROKER_URL = os.environ.get("CELERY_BROKER", "redis://redis:6379/0")
CELERY_RESULT_BACKEND = os.environ.get("CELERY_BROKER", "redis://redis:6379/0")



This is my main urls.py file :


from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from django.urls import path
from django.urls.conf import include
from strawberry.django.views import GraphQLView

from video.schema import schema

urlpatterns = [
 path('admin/', admin.site.urls),
 path("graphql", GraphQLView.as_view(schema=schema)),
]

if settings.DEBUG:
 urlpatterns += static(settings.MEDIA_URL,
 document_root=settings.MEDIA_ROOT)
 urlpatterns += static(settings.STATIC_URL,
 document_root=settings.STATIC_ROOT)



This is my celery.py file :


from __future__ import absolute_import, unicode_literals
import os
from celery import Celery
from django.conf import settings

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')

backend = Celery('backend')

backend.config_from_object('django.conf:settings', namespace="CELERY")

backend.autodiscover_tasks()

@backend.task(bind=True)
def debug_task(self):
 print('Request: {0!r}'.format(self.request))



This is my init.py file :


from .celery import backend as celery_backend

__all__ = ('celery_backend',)



This is my Dockerfile :


FROM python:3
ENV PYTHONUNBUFFERED=1

WORKDIR /usr/src/backend

RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get install -y ffmpeg

COPY requirements.txt ./
RUN pip install -r requirements.txt



This is my docker-compose.yml file :


version: "3.8"

services:
 django:
 build: .
 container_name: django
 command: python manage.py runserver 0.0.0.0:8000
 volumes:
 - .:/usr/src/backend/
 ports:
 - "8000:8000"
 environment:
 - DEBUG=1
 - DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
 - CELERY_BROKER=redis://redis:6379/0
 - CELERY_BACKEND=redis://redis:6379/0
 depends_on:
 - pgdb
 - redis

 celery:
 build: .
 command: celery -A backend worker -l INFO
 volumes:
 - .:/usr/src/backend
 depends_on:
 - django
 - redis

 pgdb:
 image: postgres
 container_name: pgdb
 environment:
 - POSTGRES_DB=postgres
 - POSTGRES_USER=postgres
 - POSTGRES_PASSWORD=postgres
 volumes:
 - pgdata:/var/lib/postgresql/data/

 redis:
 image: "redis:alpine"

volumes:
 pgdata:



And now inside my video app folder :


My models.py file :


- 

- here I've created separated fields for all resolution sizes, from video_file_2k to video_file_144, I was thinking that maybe after the process of the encoding this will populate those fields..




from django.db import models
from django.urls import reverse


class Video(models.Model):
 video_id = models.AutoField(primary_key=True, editable=False)
 slug = models.SlugField(max_length=255)
 title = models.CharField(max_length=150, blank=True, null=True)
 description = models.TextField(blank=True, null=True)
 video_file = models.FileField(null=False, blank=False)
 video_file_2k = models.FileField(null=True, blank=True)
 video_file_fullhd = models.FileField(null=True, blank=True)
 video_file_hd = models.FileField(null=True, blank=True)
 video_file_480 = models.FileField(null=True, blank=True)
 video_file_360 = models.FileField(null=True, blank=True)
 video_file_240 = models.FileField(null=True, blank=True)
 video_file_144 = models.FileField(null=True, blank=True)
 category = models.CharField(max_length=64, blank=False, null=False)
 created_at = models.DateTimeField(
 ("Created at"), auto_now_add=True, editable=False)
 updated_at = models.DateTimeField(("Updated at"), auto_now=True)

 class Meta:
 ordering = ("-created_at",)
 verbose_name = ("Video")
 verbose_name_plural = ("Videos")

 def get_absolute_url(self):
 return reverse("store:video_detail", args=[self.slug])

 def __str__(self):
 return self.title



This is my schema.py file :


import strawberry
from strawberry.file_uploads import Upload
from typing import List
from .types import VideoType
from .models import Video
from .tasks import task_video_encoding_1080p, task_video_encoding_720p


@strawberry.type
class Query:
 @strawberry.field
 def videos(self, category: str = None) -> List[VideoType]:
 if category:
 videos = Video.objects.filter(category=category)
 return videos
 return Video.objects.all()

 @strawberry.field
 def video(self, slug: str) -> VideoType:
 if slug == slug:
 video = Video.objects.get(slug=slug)
 return video

 @strawberry.field
 def video_by_id(self, video_id: int) -> VideoType:
 if video_id == video_id:
 video = Video.objects.get(pk=video_id)

 # Here I've tried to trigger my tasks, when I visited 0.0.0.0:8000/graphql url
 # and I was querying for a video by it's id , then I've got the error from celery 
 task_video_encoding_1080p.delay(video_id)
 task_video_encoding_720p.delay(video_id)

 return video


@strawberry.type
class Mutation:
 @strawberry.field
 def create_video(self, slug: str, title: str, description: str, video_file: Upload, video_file_2k: str, video_file_fullhd: str, video_file_hd: str, video_file_480: str, video_file_360: str, video_file_240: str, video_file_144: str, category: str) -> VideoType:

 video = Video(slug=slug, title=title, description=description,
 video_file=video_file, video_file_2k=video_file_2k, video_file_fullhd=video_file_fullhd, video_file_hd=video_file_hd, video_file_480=video_file_480, video_file_360=video_file_360, video_file_240=video_file_240, video_file_144=video_file_144,category=category)
 
 video.save()
 return video

 @strawberry.field
 def update_video(self, video_id: int, slug: str, title: str, description: str, video_file: str, category: str) -> VideoType:
 video = Video.objects.get(video_id=video_id)
 video.slug = slug
 video.title = title
 video.description = description
 video.video_file = video_file
 video.category = category
 video.save()
 return video

 @strawberry.field
 def delete_video(self, video_id: int) -> bool:
 video = Video.objects.get(video_id=video_id)
 video.delete
 return True


schema = strawberry.Schema(query=Query, mutation=Mutation)



This is my types.py file ( strawberry graphql related ) :


import strawberry

from .models import Video


@strawberry.django.type(Video)
class VideoType:
 video_id: int
 slug: str
 title: str
 description: str
 video_file: str
 video_file_2k: str
 video_file_fullhd: str
 video_file_hd: str
 video_file_480: str
 video_file_360: str
 video_file_240: str
 video_file_144: str
 category: str



And this is my tasks.py file :


from __future__ import absolute_import, unicode_literals
import os, subprocess
from django.conf import settings
from django.core.exceptions import ValidationError
from celery import shared_task
from celery.utils.log import get_task_logger
from .models import Video
FFMPEG_PATH = os.environ["IMAGEIO_FFMPEG_EXE"] = "/opt/homebrew/Cellar/ffmpeg/6.0/bin/ffmpeg"

logger = get_task_logger(__name__)


# CELERY TASKS
@shared_task
def add(x,y):
 return x + y


@shared_task
def task_video_encoding_720p(video_id):
 logger.info('Video Processing started')
 try:
 video = Video.objects.get(video_id=video_id)
 input_file_path = video.video_file.path
 input_file_url = video.video_file.url
 input_file_name = video.video_file.name

 # get the filename (without extension)
 filename = os.path.basename(input_file_url)

 # path to the new file, change it according to where you want to put it
 output_file_name = os.path.join('videos', 'mp4', '{}.mp4'.format(filename))
 output_file_path = os.path.join(settings.MEDIA_ROOT, output_file_name)

 # 2-pass encoding
 for i in range(1):
 new_video_720p = subprocess.call([FFMPEG_PATH, '-i', input_file_path, '-s', '1280x720', '-vcodec', 'mpeg4', '-acodec', 'libvo_aacenc', '-b', '10000k', '-pass', i, '-r', '30', output_file_path])
 # new_video_720p = subprocess.call([FFMPEG_PATH, '-i', input_file_path, '-s', '{}x{}'.format(height * 16/9, height), '-vcodec', 'mpeg4', '-acodec', 'libvo_aacenc', '-b', '10000k', '-pass', i, '-r', '30', output_file_path])

 if new_video_720p == 0:
 # save the new file in the database
 # video.video_file_hd.name = output_file_name
 video.save(update_fields=['video_file_hd'])
 logger.info('Video Processing Finished')
 return video

 else:
 logger.info('Proceesing Failed.') # Just for now

 except:
 raise ValidationError('Something went wrong')


@shared_task
# def task_video_encoding_1080p(video_id, height):
def task_video_encoding_1080p(video_id):
 logger.info('Video Processing started')
 try:
 video = Video.objects.get(video_id=video_id)
 input_file_path = video.video_file.url
 input_file_name = video.video_file.name

 # get the filename (without extension)
 filename = os.path.basename(input_file_path)

 # path to the new file, change it according to where you want to put it
 output_file_name = os.path.join('videos', 'mp4', '{}.mp4'.format(filename))
 output_file_path = os.path.join(settings.MEDIA_ROOT, output_file_name)

 for i in range(1):
 new_video_1080p = subprocess.call([FFMPEG_PATH, '-i', input_file_path, '-s', '1920x1080', '-vcodec', 'mpeg4', '-acodec', 'libvo_aacenc', '-b', '10000k', '-pass', i, '-r', '30', output_file_path])

 if new_video_1080p == 0:
 # save the new file in the database
 # video.video_file_hd.name = output_file_name
 video.save(update_fields=['video_file_fullhd'])
 logger.info('Video Processing Finished')
 return video
 else:
 logger.info('Proceesing Failed.') # Just for now

 except:
 raise ValidationError('Something went wrong')



In my first attempt I wasn't triggering the tasks no where, then I've tried to trigger the task from the schema.py file from graphql inside the video_by_id, but there I've got this error :


backend-celery-1 | django.core.exceptions.ValidationError: ['Something went wrong']
backend-celery-1 | [2023-06-18 16:38:52,859: ERROR/ForkPoolWorker-4] Task video.tasks.task_video_encoding_1080p[d33b1a42-5914-467c-ad5c-00565bc8be6f] raised unexpected: ValidationError(['Something went wrong'])
backend-celery-1 | Traceback (most recent call last):
backend-celery-1 | File "/usr/src/backend/video/tasks.py", line 81, in task_video_encoding_1080p
backend-celery-1 | new_video_1080p = subprocess.call([FFMPEG_PATH, '-i', input_file_path, '-s', '1920x1080', '-vcodec', 'mpeg4', '-acodec', 'libvo_aacenc', '-b', '10000k', '-pass', i, '-r', '30', output_file_path])
backend-celery-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-celery-1 | File "/usr/local/lib/python3.11/subprocess.py", line 389, in call
backend-celery-1 | with Popen(*popenargs, **kwargs) as p:
backend-celery-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-celery-1 | File "/usr/local/lib/python3.11/subprocess.py", line 1026, in __init__
backend-celery-1 | self._execute_child(args, executable, preexec_fn, close_fds,
backend-celery-1 | File "/usr/local/lib/python3.11/subprocess.py", line 1883, in _execute_child
backend-celery-1 | self.pid = _fork_exec(
backend-celery-1 | ^^^^^^^^^^^
backend-celery-1 | TypeError: expected str, bytes or os.PathLike object, not int
backend-celery-1 | 
backend-celery-1 | During handling of the above exception, another exception occurred:
backend-celery-1 | 
backend-celery-1 | Traceback (most recent call last):
backend-celery-1 | File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
backend-celery-1 | R = retval = fun(*args, **kwargs)
backend-celery-1 | ^^^^^^^^^^^^^^^^^^^^
backend-celery-1 | File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 760, in __protected_call__
backend-celery-1 | return self.run(*args, **kwargs)
backend-celery-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
backend-celery-1 | File "/usr/src/backend/video/tasks.py", line 93, in task_video_encoding_1080p
backend-celery-1 | raise ValidationError('Something went wrong')
backend-celery-1 | django.core.exceptions.ValidationError: ['Something went wrong']



If anyone has done this kind of project or something like this please any suggestion or help is much appreciated.


Thank you in advance !


-
Google Optimize vs Matomo A/B Testing : Everything You Need to Know
17 mars 2023, par Erin — Analytics Tips -
dyld[16458] : Library not loaded : @rpath/libavcodec.framework/libavcodec while running my flutter app on iOS
31 janvier 2023, par Stéphane de LucaCompilation is successful. But When I run the code, I get this.


Here is the full trace.


Any idea ?


dyld[16458]: Library not loaded: @rpath/libavcodec.framework/libavcodec
 Referenced from: <3500F5CF-B1D2-30EC-8D7F-1C29BD45D05E> /private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Runner
 Reason: tried: '/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2), '/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2), '/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/private/preboot/Cryptexes/OS@rpath/libavcodec.framework/libavcodec' (errno=2), '/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2), '/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2), '/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/System/Library/Frameworks/libavcodec.framework/libavcodec' (errno=2, not in dyld cache)
Library not loaded: @rpath/libavcodec.framework/libavcodec
 Referenced from: <3500F5CF-B1D2-30EC-8D7F-1C29BD45D05E> /private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Runner
 Reason: tried: '/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2), '/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/private/var/containers/Bundle/Application/984D87E5-818C-49A9-9CB5-F0CC3160D2FF/Runner.app/Frameworks/libavcodec.framework/libavcodec' (errno=2), '/usr/lib/swif
dyld config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/usr/lib/libBacktraceRecording.dylib:/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
(lldb) 



The pod is as follows :


# Uncomment this line to define a global platform for your project
platform :ios, '14.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
 'Debug' => :debug,
 'Profile' => :release,
 'Release' => :release,
}

def flutter_root
 generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
 unless File.exist?(generated_xcode_build_settings_path)
 raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
 end

 File.foreach(generated_xcode_build_settings_path) do |line|
 matches = line.match(/FLUTTER_ROOT\=(.*)/)
 return matches[1].strip if matches
 end
 raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
 use_frameworks!
 use_modular_headers!

 flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
 installer.pods_project.targets.each do |target|
 flutter_additional_ios_build_settings(target)
 end
end



The yaml :



environment:
 sdk: '>=2.18.2 <3.0.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
 flutter:
 sdk: flutter
 flutter_localizations:
 sdk: flutter
 # The following adds the Cupertino Icons font to your application.
 # Use with the CupertinoIcons class for iOS style icons.
 cupertino_icons: ^1.0.2
 video_editor: ^1.5.2
 image_picker: ^0.8.6
 helpers: ^1.2.0
 intl: ^0.17.0
 i18n_extension: ^5.0.1
 optimized_cached_image: ^3.0.1
 youtube_player_flutter: ^8.1.1
 flutter_launcher_icons: ^0.11.0
 flutter_lorem: ^2.0.0
 advance_image_picker: ^0.1.7+1
 wechat_assets_picker: ^8.1.4
 lecle_flutter_absolute_path: ^0.0.2+1
 #ffmpeg_kit_flutter: 5.1.0-LTS
 path_provider: ^2.0.11
 video_thumbnail: ^0.5.3
 flutter_document_picker: ^5.1.0
 flutter_login: ^4.1.1
 #flutter_absolute_path: ^1.0.6
 # flutter_absolute_path:
 # git:
 # url: https://github.com/ValeriusGC/flutter_absolute_path.git
 uuid: ^3.0.6
 flutter_form_builder: ^7.7.0
 form_builder_validators: ^8.4.0
 state_persistence: ^0.1.0
 shared_preferences: ^2.0.15
 firebase_core: ^2.4.0
 firebase_storage: ^11.0.8
 video_compress: ^3.1.2
 connectivity_plus: ^3.0.2
 internet_connection_checker: ^1.0.0+1
 cached_video_player: ^2.0.3
 visibility_detector: ^0.3.3
 firebase_database: ^10.0.7
 firebase_auth: ^4.2.1
 firebase_dynamic_links: ^5.0.9
 cloud_firestore: ^4.2.0
 cloud_functions: ^4.0.6
 cached_network_image: ^3.2.3
 ffmpeg_kit_flutter_min_gpl: ^5.1.0
 video_player: ^2.4.10
 provider: ^6.0.5
 camera: ^0.9.8+1
 share_plus: ^6.3.0
 package_info_plus: ^3.0.2

dependency_overrides:
 ffmpeg_kit_flutter_min_gpl: ^5.1.0-LTS

dev_dependencies:
 flutter_test:
 sdk: flutter


 # The "flutter_lints" package below contains a set of recommended lints to
 # encourage good coding practices. The lint set provided by the package is
 # activated in the `analysis_options.yaml` file located at the root of your
 # package. See that file for information about deactivating specific lint
 # rules and activating additional ones.
 flutter_lints: ^2.0.0

``