
Recherche avancée
Autres articles (92)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Les images
15 mai 2013
Sur d’autres sites (12818)
-
ffmpeg transcode to youtube live bad video container
13 juillet 2017, par popcorn9499I’ve been attempting to transcode a stream produced by obs studio to my nginx server and send it off to youtube. Now I’ve made it work with twitch and I know these settings are actually transcoding it mostly correctly and is viewable. The problem being that youtube live picks it up as Bad video settings and tells me to change the current video container format. The other side effect that is probly unrelated is the stream looks really poorly on youtube. Looks like it was streamed at a poor bitrate and stuff but the real problem is the bad video settings error.
The ffmpeg command being used is as follows
ffmpeg -i rtmp://localhost/Private/Private1 -vb 6000k -minrate 6000k -maxrate 6000k -bufsize 6000k -s 1280x720 -c:v libx264 -preset faster -r 50 -g 100 -keyint_min 50 -x264opts nal-hrd=cbr:force-cfr=1 -sws_flags lanczos -tune film -pix_fmt yuv420p -c:a copy -f flv -threads 6 -strict normal rtmp://a.rtmp.youtube.com/live2/{key}
I’ve tried with different framerates and been googling for awhile and found nothing or interpreted everything wrongly. Either way I would be very happy for some help here.
System info.
- OS : Ubuntu Server 16.04 LTS
- Ram : 10gb
- Processor : AMD Phenom(tm) II X6 1090T
- GPU : Geforce GT 520
Internet.
- Upload 15mbit
- Download 150mbit
If you need any more info I will gladly send it. Thanks for reading.
Edit 1
After some googling about what I’m doing wrong I decided to try and change stuff slightly and came up with this command
ffmpeg -re -i rtmp://localhost/(app)/(key) -c:v libx264 -r 50 -g 100 -keyint_min 100 -x264opts "keyint=100:min-keyint=100:no-scenecut" -sws_flags lanczos -profile:v baseline -preset veryfast -vb 6000K -minrate 6000k -maxrate 6000k -bufsize 6000k -s 1280x720 -tune film,zerolatency -pix_fmt yuv420p -f flv -c:a copy -ac 1 -strict normal rtmp://(output site)/(output app)/(output key)
which as of my current testing seems to at least have a healthy stream for longer than 2 minutes if i only output to youtube live directly. Ive found output to my nginx server then youtube live breaks things.
my nginx rtmp settings are on this link https://pastebin.com/siE99Tv8
Edit 2
If I push the stream to a site like restream to stream it to youtube then it seems to be working. tested for 25 minutes with no change of them saying bad video container or anything. So I’m going to say nginx is partly to blame in how its distributing the files ? Unsure what I’m doing wrong. I am pretty sure ffmpeg isn’t to blame here at least
-
FFMPEG : how to wrap h264 stream into FLV container ?
6 juillet 2017, par jiandingzheWhat I want is straightforward : wrap H.264 video stream into a FLV container. However, ffmpeg just decode the input stream and pack raw video stream into FLV. The details are described below :
The input stream is captured from a hardware-encoder video camera, and the FLV will be sent to some video server. Firstly I used following command :
$ ffmpeg -framerate 15 -s 320x240 -i /dev/video1 -f flv "rtmp://some.website.com/receive/path"
However, the resultant stream is suspicious. The watching side don’t get any H.264 thing. Then I made a test by writing output to local files.
1 : Read raw stream, encode by h264_omx, write to FLV file :
$ ffmpeg -framerate 15 -s 320x240 -i /dev/video0 -codec h264_omx -f flv raw_input_h264_omx.flv
......
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 194017.870905, bitrate: 18432 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 18432 kb/s, 15 fps, 15 tbr, 1000k tbn, 1000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_omx))
......2 : Read H264 stream, write to FLV file :
$ ffmpeg -framerate 15 -s 320x240 -i /dev/video1 -f flv h264_input.flv
......
Input #0, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, start: 194610.307096, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p(progressive), 320x240, 15 fps, 15 tbr, 1000k tbn, 2000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> flv1 (flv))
......Then read the two files correspondingly :
$ ffmpeg -i raw_input_h264_omx.flv
......
Stream #0:0: Video: h264 (High), yuv420p(progressive), 320x240, 200 kb/s, 15 fps, 15 tbr, 1k tbn
$ ffmpeg -i h264_input.flv
......
Stream #0:0: Video: flv1, yuv420p, 320x240, 200 kb/s, 15 fps, 15 tbr, 1k tbnIt is clear when I give a H.264 stream, ffmpeg firstly decodes it, then pack the raw video into FLV. How to avoid that happen, and have the H.264 stream packed directly ?
Supplement : I will eventually pushing multiple video streams, so don’t ask me to allow ffmpeg’s silent decoding, and encode the stream again.
-
How to find out exact container/format of a video file using ffprobe ?
7 janvier 2021, par parthagarI would like to find out the exact format/container of a video file using ffprobe but I am unable to reach to the "exact" part of it.


When I run this sample command :

ffprobe -hide_banner -loglevel fatal -show_error -show_format -print_format json INPUT

I receive this output :

{
 "format": {
 "filename": "INPUT",
 "nb_streams": 2,
 "nb_programs": 0,
 "format_name": "matroska,webm",
 "format_long_name": "Matroska / WebM",
 "start_time": "0.000000",
 "duration": "2.969000",
 "size": "2376430",
 "bit_rate": "6403314",
 "probe_score": 100,
 "tags": {
 "COM.ANDROID.VERSION": "9",
 "MAJOR_BRAND": "mp42",
 "MINOR_VERSION": "0",
 "COMPATIBLE_BRANDS": "isommp42",
 "COM.ANDROID.CAPTURE.FPS": "30.000000",
 "ENCODER": "Lavf57.83.100"
 }
 }
}



As you may have understood, ffprobe gives a list of formats inside the
format_name
value. This is true for several video formats like mp4, mkv, webm, etc.

Whereas,
mediainfo
is able to find out the exact type of format, i.e. it outputs a singleFormat
like below :

Command :mediainfo INPUT

Output :

General
Unique ID : 41836023869371892704046005573890259380 (0x1F79533A912A2117C3D4CEB704EAB9B4)
Complete name : intermediate.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 2.27 MiB
Duration : 2 s 969 ms
Overall bit rate mode : Variable
Overall bit rate : 6 403 kb/s
Writing application : Lavf57.83.100
Writing library : Lavf57.83.100
ErrorDetectionType : Per level 1
COM.ANDROID.CAPTURE.FPS : 30.000000
COM.ANDROID.VERSION : 9



*Outputs truncated for decluttering info


Can anyone guide me as to how to achieve this using ffprobe itself ?