
Recherche avancée
Autres articles (65)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (9811)
-
How do I get VLC to play back two separate input streams (Video and Audio) like MPV-Player with mpv —ytdl-format=FormatCode1+FormatCode2 URL
29 avril 2021, par Gubbelso, I finally found out how to play a 1080p with 60fps smoothly on a Raspberry Py 4b or rather on a Raspberry Py 400.


With the following OS installed :
Raspberry Pi OS with desktop and recommended software


But I need to get from Youtube the avc1 (H.264) video stream and not the av01 (AV1) video stream.


And sadly it only plays smooth, if I use the VLC-Media-Player to play back a completely downloaded file.


The MPV alternative with e.g. :


mpv --ytdl-format=299+140 https://www.youtube.com/watch?v=LXb3EKWsInQ



lags sadly.


So I thought of a method to use a similar option with VLC.


My attempt :


#!/bin/bash

echo 'Enter: videoFormatCode audioFormatCode URL'

read video audio link

videoLink=$(youtube-dl -g -f $video $link)

audioLink=$(youtube-dl -g -f $audio $link)




ffmpeg -i "$videoLink" -i "$audioLink" -f matroska - | vlc -



So, first I will find out the format codes with :


youtube-dl -F https://www.youtube.com/watch?v=LXb3EKWsInQ



which gives me :


format code extension resolution note
249 webm audio only tiny 50k , webm_dash container, opus @ 50k (48000Hz), 1.88MiB
250 webm audio only tiny 67k , webm_dash container, opus @ 67k (48000Hz), 2.51MiB
140 m4a audio only tiny 129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 4.84MiB
251 webm audio only tiny 132k , webm_dash container, opus @132k (48000Hz), 4.96MiB
394 mp4 256x144 144p HDR 63k , mp4_dash container, av01.0.00M.10.0.110.09.16.09.0@ 63k, 30fps, video only, 2.39MiB
160 mp4 256x144 144p 70k , mp4_dash container, avc1.4d400c@ 70k, 30fps, video only, 2.64MiB
278 webm 256x144 144p 82k , webm_dash container, vp9@ 82k, 30fps, video only, 3.07MiB
694 mp4 256x144 144p60 HDR 179k , mp4_dash container, av01.0.00M.10.0.110.09.16.09.0@ 179k, 60fps, video only, 6.73MiB
330 webm 256x144 144p60 HDR 212k , webm_dash container, vp9.2@ 212k, 60fps, video only, 7.96MiB
395 mp4 426x240 240p HDR 111k , mp4_dash container, av01.0.00M.10.0.110.09.16.09.0@ 111k, 30fps, video only, 4.16MiB
133 mp4 426x240 240p 156k , mp4_dash container, avc1.4d4015@ 156k, 30fps, video only, 5.86MiB
242 webm 426x240 240p 160k , webm_dash container, vp9@ 160k, 30fps, video only, 6.00MiB
695 mp4 426x240 240p60 HDR 409k , mp4_dash container, av01.0.01M.10.0.110.09.16.09.0@ 409k, 60fps, video only, 15.32MiB
331 webm 426x240 240p60 HDR 444k , webm_dash container, vp9.2@ 444k, 60fps, video only, 16.63MiB
396 mp4 640x360 360p HDR 220k , mp4_dash container, av01.0.01M.10.0.110.09.16.09.0@ 220k, 30fps, video only, 8.23MiB
134 mp4 640x360 360p 337k , mp4_dash container, avc1.4d401e@ 337k, 30fps, video only, 12.64MiB
243 webm 640x360 360p 343k , webm_dash container, vp9@ 343k, 30fps, video only, 12.84MiB
696 mp4 640x360 360p60 HDR 862k , mp4_dash container, av01.0.04M.10.0.110.09.16.09.0@ 862k, 60fps, video only, 32.28MiB
332 webm 640x360 360p60 HDR 954k , webm_dash container, vp9.2@ 954k, 60fps, video only, 35.70MiB
397 mp4 854x480 480p HDR 406k , mp4_dash container, av01.0.04M.10.0.110.09.16.09.0@ 406k, 30fps, video only, 15.19MiB
135 mp4 854x480 480p 563k , mp4_dash container, avc1.4d401f@ 563k, 30fps, video only, 21.08MiB
244 webm 854x480 480p 619k , webm_dash container, vp9@ 619k, 30fps, video only, 23.18MiB
697 mp4 854x480 480p60 HDR 1652k , mp4_dash container, av01.0.05M.10.0.110.09.16.09.0@1652k, 60fps, video only, 61.81MiB
333 webm 854x480 480p60 HDR 1848k , webm_dash container, vp9.2@1848k, 60fps, video only, 69.13MiB
398 mp4 1280x720 720p60 HDR 1151k , mp4_dash container, av01.0.08M.10.0.110.09.16.09.0@1151k, 60fps, video only, 43.09MiB
247 webm 1280x720 720p 1220k , webm_dash container, vp9@1220k, 30fps, video only, 45.67MiB
136 mp4 1280x720 720p 1540k , mp4_dash container, avc1.4d401f@1540k, 30fps, video only, 57.61MiB
302 webm 1280x720 720p60 1964k , webm_dash container, vp9@1964k, 60fps, video only, 73.48MiB
298 mp4 1280x720 720p60 2475k , mp4_dash container, avc1.4d4020@2475k, 60fps, video only, 92.60MiB
698 mp4 1280x720 720p60 HDR 3829k , mp4_dash container, av01.0.08M.10.0.110.09.16.09.0@3829k, 60fps, video only, 143.25MiB
334 webm 1280x720 720p60 HDR 4337k , webm_dash container, vp9.2@4337k, 60fps, video only, 162.26MiB
399 mp4 1920x1080 1080p60 HDR 2151k , mp4_dash container, av01.0.09M.10.0.110.09.16.09.0@2151k, 60fps, video only, 80.49MiB
303 webm 1920x1080 1080p60 3475k , webm_dash container, vp9@3475k, 60fps, video only, 130.01MiB
299 mp4 1920x1080 1080p60 4376k , mp4_dash container, avc1.64002a@4376k, 60fps, video only, 163.70MiB
699 mp4 1920x1080 1080p60 HDR 6358k , mp4_dash container, av01.0.09M.10.0.110.09.16.09.0@6358k, 60fps, video only, 237.83MiB
335 webm 1920x1080 1080p60 HDR 6738k , webm_dash container, vp9.2@6738k, 60fps, video only, 252.04MiB
400 mp4 2560x1440 1440p60 HDR 5529k , mp4_dash container, av01.0.12M.10.0.110.09.16.09.0@5529k, 60fps, video only, 206.83MiB
308 webm 2560x1440 1440p60 10376k , webm_dash container, vp9@10376k, 60fps, video only, 388.14MiB
700 mp4 2560x1440 1440p60 HDR 15170k , mp4_dash container, av01.0.12M.10.0.110.09.16.09.0@15170k, 60fps, video only, 567.45MiB
336 webm 2560x1440 1440p60 HDR 16231k , webm_dash container, vp9.2@16231k, 60fps, video only, 607.14MiB
401 mp4 3840x2160 2160p60 HDR 11707k , mp4_dash container, av01.0.13M.10.0.110.09.16.09.0@11707k, 60fps, video only, 437.93MiB
315 webm 3840x2160 2160p60 25573k , webm_dash container, vp9@25573k, 60fps, video only, 956.58MiB
701 mp4 3840x2160 2160p60 HDR 28033k , mp4_dash container, av01.0.13M.10.0.110.09.16.09.0@28033k, 60fps, video only, 1.02GiB
337 webm 3840x2160 2160p60 HDR 28869k , webm_dash container, vp9.2@28869k, 60fps, video only, 1.05GiB
18 mp4 640x360 360p 642k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 24.03MiB
22 mp4 1280x720 720p 1669k , avc1.64001F, 30fps, mp4a.40.2 (44100Hz) (best)



Then I search for a 1080p60 stream with avc1, which leads to format code 299 in this list and then choose a fitting audio stream, like format code 140.


Through the script youtube-dl catches the links for the respective format code, which get joined with ffmpeg as a matroska file and the send to VLC.


But this method lags ; in my opinion because it seems not to cache the stream, like MPV does. And there is not seeking option ; when I try to seek it pops back to the beginning.


I tried it with adding
-bufsize 6750k
to the ffmpeg line, but that did not help either.
I also added the VLC option--sout-mux-caching 30000
where I thought VLC would get a bigger cache to buffer the stream, but that did not help, too.

So, how could I play back this as a smooth stream in VLC ?


Also, my solution might not the best to start with, so please don't take this as a reference, it was just an attempt by my side with my sparse knowledge how I would handle the situation.


If there are better alternatives, you can of course post them, too. ;)



I also want to add, that the script, which I posted above, works well, when I use the 134 format code with a far lesser resolution, so somewhere seems to be a bottleneck.



Attachment 1 :


Output with format codes 299+140 :




Attachment 2 :


Output with format codes 134+140 :





Should the pastebin not work, here is an alternative link to the outputs.



I terminated the program after several seconds with Ctrl-C, so the output won't be that big, thought it could help to find an answer on this.



Just for reference :
After pressing Ctrl-C this line appeared :


QObject::~QObject: Timers cannot be stopped from another thread



-
Ignoring moov atom in m4a audio files
15 mai 2021, par dominc8I have a few m4a files that cannot be converted through ffmpeg because they are missing moov atom. I discovered it only now because normally I use mpv to listen to them and it works just fine. Is there a way to create moov atom manually or maybe use mpv to create it/convert files to other formats. Moreover I don't get it, why every other player says it is essential to playing but mpv doesn't give a shit and just plays the files ?


-
Videos encoded with FFmpeg play too fast
23 avril 2014, par Ari BlackI’ve scoured the Google/SO/Zeranoe results and tried to integrate everything I found into making my program generate videos correctly but I still can’t get it to work right.
I needed a good video to use as a reference so I ran :
ffmpeg -t 5 -f dshow -i "video=Logitech HD Pro WebcamC910" CLI.mpg
Which generated a five-second video which can be played in VLC and shows the duration and plays correctly. You can get the video here : https://drive.google.com/file/d/0B1VGi1Ts7D7TR3c4VUlyM2dIcFk/edit?usp=sharing
I then generated a five-second video with my own code. I’ve tried to pare it down to only what I think is needed to record. You can find the code here : https://drive.google.com/file/d/0B1VGi1Ts7D7TMnFxSE1HX2FKbEU/edit?usp=sharing
It generated a video also, with similar video quality, but VLC doesn’t show the video duration and the video seems to play too quickly. I mean that what I see on the screen looks like it’s moving slightly too fast. You can find the video my code generated here : https://drive.google.com/file/d/0B1VGi1Ts7D7TSzFGUFZEMHJwQ0U/edit?usp=sharing
Even when you click on the links to the videos, you can see that Google is having trouble with mine but no problem with the one generated by the FFmpeg CLI. Sorry about posting everything off-site but I didn’t want to spam my code into the post and I wanted to provide as much information as I could.
I’ve seen a number of posts about this but I can’t seem to find a definitive solution.
EDIT :
So I implemented your suggestions and I’m pretty sure that your answer fixed the timing issue but now I consistently get 20 non-strictly-monotonic errors before the first successful call encode_video. This happens whether I usegFrame->pts = gFrameIndex;
or
gFrame->pts = av_rescale_q(gFrameIndex, gCodecContext->time_base, gStream->codec->time_base);
before
ret = avcodec_encode_video2(gCodecContext, &pkt, gFrame, &got_output);
if (ret < 0) {
fprintf(stderr, "Error encoding frame\n");
return false;
}This seems to coincide with video artifacts at the start of the video file during playback. gFrameIndex starts at 1.
I believe my webcam auto-focuses at the start of recordings, is it possible this is related ?
I’ve uploaded the generated .h264 file at https://drive.google.com/file/d/0B1VGi1Ts7D7TRjRzbzZZemRaRTA/edit?usp=sharing and my most recent code to https://drive.google.com/file/d/0B1VGi1Ts7D7TbmlyYncxYzRQUTA/edit?usp=sharing.
I really appreciate the help. Sadly, I can’t use the FFmpeg CLI directly in my software, so I have to use the library. I’m going to have to keep trucking along with it unless you can suggest a better alternative.