
Recherche avancée
Autres articles (105)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site -
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)
Sur d’autres sites (10560)
-
youtube-dl, is there a way to extract the "specific format" video URL ? [closed]
29 juillet 2020, par karmaFollowing my question before in this link,

It seems that the copied version is from the highest resolution format, as the resulting video portion is 1920x1080 resolution.

The available format :


C:\Standalone Program\YoutubeDL>youtube-dl -F https://www.youtube.com/watch?v=kGDgGsrA78s
[youtube] kGDgGsrA78s: Downloading webpage
[info] Available formats for kGDgGsrA78s:
format code extension resolution note
249 webm audio only tiny 52k , opus @ 50k (48000Hz), 7.49MiB
250 webm audio only tiny 65k , opus @ 70k (48000Hz), 9.45MiB
251 webm audio only tiny 114k , opus @160k (48000Hz), 17.07MiB
140 m4a audio only tiny 164k , m4a_dash container, mp4a.40.2@128k (44100Hz), 21.06MiB
278 webm 256x144 144p 103k , webm container, vp9, 30fps, video only, 15.78MiB
160 mp4 256x144 144p 117k , avc1.4d400c, 30fps, video only, 12.96MiB
242 webm 426x240 240p 231k , vp9, 30fps, video only, 33.40MiB
133 mp4 426x240 240p 254k , avc1.4d4015, 30fps, video only, 25.10MiB
243 webm 640x360 360p 420k , vp9, 30fps, video only, 60.81MiB
134 mp4 640x360 360p 652k , avc1.4d401e, 30fps, video only, 61.92MiB
244 webm 854x480 480p 781k , vp9, 30fps, video only, 105.14MiB
135 mp4 854x480 480p 1190k , avc1.4d401f, 30fps, video only, 114.76MiB
247 webm 1280x720 720p 1550k , vp9, 30fps, video only, 211.07MiB
136 mp4 1280x720 720p 2383k , avc1.4d401f, 30fps, video only, 213.18MiB
248 webm 1920x1080 1080p 2752k , vp9, 30fps, video only, 408.32MiB
137 mp4 1920x1080 1080p 4443k , avc1.640028, 30fps, video only, 435.80MiB
18 mp4 640x360 360p 640k , avc1.42001E, 30fps, mp4a.40.2@ 96k (44100Hz), 106.07MiB (best)



So after I do :


youtube-dl -g https://www.youtube.com/watch?v=kGDgGsrA78s



and the video URL result :


https://r2---sn-uigxxi0ujipnvo-q2ne.googlevideo.com/videoplayback?expire=1596034295&ei=lzghX6SHKMOD8QPlx5SQBw&ip=223.255.228.87&id=o-AK6cYo88zJXe5Xb4y1QsXspuRnVCy-zPFpMaHcAaTQ-_&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&source=youtube&requiressl=yes&mh=DA&mm=31%2C29&mn=sn-uigxxi0ujipnvo-q2ne%2Csn-npoe7nlz&ms=au%2Crdu&mv=m&mvi=2&pl=24&initcwndbps=173750&vprv=1&mime=video%2Fmp4&gir=yes&clen=456970484&dur=1389.955&lmt=1521825834085900&mt=1596012582&fvip=5&keepalive=yes&fexp=23883098&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAMvZrHYvC1YrkvtARzhjyD8dnMnlefobGrOFM1rX6QZPAiEAqqeIsKdZ19y-SlHf-l8YwTx2yYbo1p5sFlVoC87oXEQ%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgAIwAVMPrcMhAL476uN_ZzWj8vKPGGW58KCpHBYBsKeICICRgVWgthNvgbGl8VgQwscjJ0n8ib4XBNjRxRgSg2T5r&ratebypass=yes



I think the URL is for :


137 mp4 1920x1080 1080p 4443k , avc1.640028, 30fps, video only, 435.80MiB



Since I want a smaller file size, I wonder if it's possible to get the video URL (for example) for :


243 webm 640x360 360p 420k , vp9, 30fps, video only, 60.81MiB



So then later when I feed the URL to ffmpeg to extract some portion of that lower quality video URL, the result has a smaller file size.


Any kind of help would be greatly appreciated.
Thank you in advanced.


BTW, I use Windows 10 command prompt (administrator).


-
Which is the best way to encode videos into multiple resolutions in django ? Should we create a single celery task or to have multiple tasks to encode ? [closed]
13 septembre 2020, par DannyHey guys Which is the best way to encode videos using ffmpeg into multiple resolutions in django ? Should we create a single celery task which encodes the video and save in database or to have multiple tasks to encode video into various resolutions ? I am new to all these, so any help regarding the best way is highly appreciated.


I have two tasks here to encode into 480 and 1080p..so is it possible to run both in 1 task or the best way is to encode separately ??


Also how does websites like youtube encode ?


@task(name= 'task_video_encoding_480p')
def task_video_encoding_480p(video_id):
 logger.info('Video Processing started')
 try:
 video = 
 input_file_path = 
 output_file_480p_path = 

 for i in range(1):
 new_video_480p = subprocess.call([ffmpeg, {process},output_file_480p_path])

 if new_video_480p == 0:

 video.save()
 logger.info('Video Processing Finished')
 #video.temp_file.delete()
 else:
 logger.info('Proceesing Failed.') # Just for now

 except:
 raise ValidationError('Something went wrong!')



task 2


@task(name= 'task_video_encoding_1080p')
def task_video_encoding_1080p(video_id):
 logger.info('Video Processing started')
 try:
 video = 
 input_file_path = 
 output_file_1080p_path = 

 for i in range(1):
 new_video_1080p = subprocess.call([ffmpeg, {process},output_file_1080p_path])

 if new_video_1080p == 0:

 video.save()
 logger.info('Video Processing Finished')
 video.temp_file.delete()
 else:
 logger.info('Proceesing Failed.') # Just for now

 except:
 raise ValidationError('Something went wrong!')



Thank you. Highly appreciate the help.


-
Artifacts in ffmpeg fifo, low fps, stream ends
11 août 2020, par Ben GardnerI'm using a Raspberry Pi 3B and 4 for this, neither works.


I'm trying to both pass my capture card's input (
/dev/video0
) through a fifo file so I can play it on the screen via omxplayer (1080p/30fps), and also grab frames of/dev/video0
out to a series of jpgs (1920x1080 right now, but I'd like it to be 640x480) so I can do analysis on it while it's being played. The input to the capture card is television via HDMI.

This is the command I use to make the stream go to the fifo and jpgs.


ffmpeg -y -f v4l2 -input_format mjpeg -framerate 30 -video_size 1920x1080 \
-thread_queue_size 16384 -i /dev/video0 -f alsa -ac 1 \
-thread_queue_size 16384 -i hw:CARD=U0x534d0x2109,DEV=0 \
-c:v copy -b:v 32000k -preset faster -x264opts keyint=50 \
-g 25 -pix_fmt yuvj422p -c:a aac -b:a 128k -codec:v copy -f tee \
-map 0:v -map 1:a "fifo.mkv|output_%3d.jpg"



Here is my output, which gives me 30fps originally, sometimes dipping into 29-28 fps, and then skipping (both audio and video) and artifacts in the video after around 5-10 minutes with the severity eventually increasing until it stops :


[mjpeg @ 0x1504490] EOI missing, emulating
Input #0, video4linux2,v4l2, from '/dev/video0':
 Duration: N/A, start: 27151.039849, bitrate: N/A
 Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1920x1080, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Guessed Channel Layout for Input Stream #1.0 : mono
Input #1, alsa, from 'hw:CARD=U0x534d0x2109,DEV=0':
 Duration: N/A, start: 1596773777.825328, bitrate: 1536 kb/s
 Stream #1:0: Audio: pcm_s16le, 96000 Hz, mono, s16, 1536 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, tee, to 'fifo.mkv|output_%3d.jpg':
 Metadata:
 encoder : Lavf58.20.100
 Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1920x1080, q=2-31, 32000 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
 Stream #0:1: Audio: aac (LC), 96000 Hz, mono, fltp, 128 kb/s
 Metadata:
 encoder : Lavc58.35.100 aac
[alsa @ 0x1507300] Thread message queue blocking; consider raising the thread_queue_size option (current value: 16384)
[alsa @ 0x1507300] ALSA buffer xrun.time=00:13:55.89 bitrate=N/A speed=0.972x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:14:16.02 bitrate=N/A speed=0.974x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:14:27.25 bitrate=N/A speed=0.972x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:14:33.35 bitrate=N/A speed=0.97x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:14:44.71 bitrate=N/A speed=0.969x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:14:49.71 bitrate=N/A speed=0.97x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:15:01.51 bitrate=N/A speed=0.967x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:15:07.78 bitrate=N/A speed=0.969x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:15:14.27 bitrate=N/A speed=0.962x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:15:26.44 bitrate=N/A speed=0.96x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:15:32.40 bitrate=N/A speed=0.96x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:15:38.63 bitrate=N/A speed=0.963x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:15:45.60 bitrate=N/A speed=0.959x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:15:50.93 bitrate=N/A speed=0.957x
 Last message repeated 1 times
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:00.79 bitrate=N/A speed=0.951x
 Last message repeated 1 times
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:05.29 bitrate=N/A speed=0.949x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:07.19 bitrate=N/A speed=0.949x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:11.72 bitrate=N/A speed=0.945x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:16.02 bitrate=N/A speed=0.944x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:26.39 bitrate=N/A speed=0.953x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:30.22 bitrate=N/A speed=0.938x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:30.98 bitrate=N/A speed=0.937x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:37.66 bitrate=N/A speed=0.941x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:41.28 bitrate=N/A speed=0.935x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:42.95 bitrate=N/A speed=0.934x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:45.82 bitrate=N/A speed=0.933x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:46.76 bitrate=N/A speed=0.932x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:47.05 bitrate=N/A speed=0.931x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:50.74 bitrate=N/A speed=0.927x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:57.05 bitrate=N/A speed=0.927x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:16:58.91 bitrate=N/A speed=0.927x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:17:09.41 bitrate=N/A speed=0.92x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:17:12.04 bitrate=N/A speed=0.917x
[alsa @ 0x1507300] ALSA buffer xrun.time=00:17:12.61 bitrate=N/A speed=0.916x
Killed31579 fps= 28 q=-1.0 size=N/A time=00:17:32.56 bitrate=N/A speed=0.919x



I also occasionally get this error :


[tee @ 0x17001c0] Non-monotonous DTS in output stream 0:1; previous: 99251754, current: 99247503; changing to 99251755. This may result in incorrect timestamps in the output file.



I'm assuming this has something to do with the audio getting routed to the jpg. I've tried
[select=\'v\']
in front of the jpg, which doesn't change the behavior as well as[map=\'1\:a\']
in front of the mkv, which says[matroska @ 0xe446f0] Unknown option 'map'
.

I should also disclaim that I don't have much of an idea of what this command is doing compression-wise, I basically just copy/pasted that part.


What edits do I need to make to get this into a fifo and series of jpgs at the same time ?