[FFmpeg-user] hwaccel cuvid with filters
Hi all, have a question of how to use in a correct way the hwaccel of nvidia. I get the error "cuda is not supported as input pixel format". I didn't find help how to use hwaccel with filters. Maybe someone can explain how to use in filters? Many thanks! the following works: ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -i Input.ts -t 3 -c:v h264_nvenc -profile:v main -level 3.1 -crf 22 output.mp4 doesn't work: ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -i Input.ts -t 3 -filter_complex_script filter.txt c:v h264_nvenc -profile:v main -level 3.1 -crf 22 output.mp4 filter.txt: color=black:960x540[c]; [c]drawtext=fontfile=CUTE.ttf: fontsize=50: text='NAME': fontcolor=white: x=80: y=400, drawtext=fontfile=CUTE.ttf: fontsize=50: text='GO': fontcolor=white: x=120: y=330, split[text][alpha]; [text][alpha]alphamerge[txta]; [txta]perspective= x0=256: y0=306: x1=575: y1=306: x2=0: y2=H: x3=W: y3=H: sense=1[persp]; [persp][0]blend= all_mode='softlight' And the error is on bottom: ffmpeg version 3.2.4-tessus Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --prefix=/usr/local/ --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxvid --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat57. 56.101 / 57. 56.101 libavdevice57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc54. 1.100 / 54. 1.100 Input #0, mpegts, from 'DEFAULT/PREROLL.ts': Duration: 00:00:03.00, start: 1.48, bitrate: 1728 kb/s Program 1 Metadata: service_name: Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 960x540 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (PREROLL_TMP/GUIDO.ts) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. Output #0, mpegts, to 'PREROLL_TMP/GUIDO.ts': Metadata: encoder : Lavf57.56.101 Stream #0:0: Video: h264 (h264_nvenc) (Main), yuv420p, 960x540 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.64.101 h264_nvenc Side data: cpb: bitrate max/min/avg: 0/0/200 buffer size: 400 vbv_delay: -1 Stream mapping: Stream #0:0 (h264_cuvid) -> blend:bottom blend -> Stream #0:0 (h264_nvenc) Press [q] to stop, [?] for help [graph 0 input from stream 0:0 @ 0x31e7b20] Changing frame properties on the fly is not supported by all filters. [swscaler @ 0x3220cc0] cuda is not supported as input pixel format Failed to inject frame into filter network: Invalid argument Conversion failed! ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] audio only AAC in HLS
Hi Carl, thanks for helping! it works, but I don't understand, why it has to be. I can't find any hints of "why hls is needing it". Is it possible to generate it with ffmpeg? Is there any other way to play audio-only in hls? thanks Guido 2016-02-17 15:53 GMT+01:00 Carl Eugen Hoyos : > Carl Eugen Hoyos ag.or.at> writes: > > > The FFmpeg developers (we) seem to believe that id3 tags > > have no place in aac files. > > You can try to put the id3 tag in front of your non-working > > file with dd and cat. > > Something like: > $ dd if=works.aac bs=73 count=1 of=id3 > $ cat id3 audio_root_10sec.aac >test.aac > > Carl Eugen > > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] audio only AAC in HLS
Hi Carl, you can see the embedding and the downloads for the files here http://93.159.255.246:8080/aac_test.html thank you 2016-02-17 13:51 GMT+01:00 Carl Eugen Hoyos : > Guido Holz sportograf.de> writes: > > > I'm trying to encode a aac file that is playable in > > an embedded player. > > Do you have an aac file that plays in your embedded > player? Does audio_root.aac play in the embedded > player? > > Please do not post excerpts of FFmpeg console output, > always post the complete, uncut console output of the > command that allows to reproduce the issue. > > Carl Eugen > > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
[FFmpeg-user] audio only AAC in HLS
Hi, I'm trying to encode a aac file that is playable in an embedded player. All I have tried doesn't work. I've downloaded an example from a radio-live-stream. auido.aac is my generated AAC file and the long one is what I've copied from the live tream \> ffmpeg -i audio_root.aac -c:a libfdk_aac -b:a 64k audio.aac \> ffmpeg -i audio.aac Input #0, aac, from 'audio.aac': Duration: 00:04:35.31, bitrate: 63 kb/s Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 63 kb/s \> ffmpeg -i ../../tmp/media_w370587926_b16_ao_slen_t64RW5nbGlzaA\=\=_4.aac Input #0, aac, from '../../tmp/media_w370587926_b16_ao_slen_t64RW5nbGlzaA==_4.aac': Duration: 00:00:05.80, bitrate: 165 kb/s Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 165 kb/s \> ffprobe -v quiet -print_format json -show_format -show_streams audio.aac { "streams": [ { "index": 0, "codec_name": "aac", "codec_long_name": "AAC (Advanced Audio Coding)", "profile": "LC", "codec_type": "audio", "codec_time_base": "1/44100", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x", "sample_fmt": "fltp", "sample_rate": "44100", "channels": 2, "channel_layout": "stereo", "bits_per_sample": 0, "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/28224000", "duration_ts": 7770301271, "duration": "275.308293", "bit_rate": "63738", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0 } } ], "format": { "filename": "audio.aac", "nb_streams": 1, "nb_programs": 0, "format_name": "aac", "format_long_name": "raw ADTS AAC (Advanced Audio Coding)", "duration": "275.308293", "size": "2193450", "bit_rate": "63738", "probe_score": 51 } } \>ffprobe -v quiet -print_format json -show_format -show_streams ../../tmp/media_w370587926_b16_ao_slen_t64RW5nbGlzaA\=\=_4.aac { "streams": [ { "index": 0, "codec_name": "aac", "codec_long_name": "AAC (Advanced Audio Coding)", "profile": "LC", "codec_type": "audio", "codec_time_base": "1/44100", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x", "sample_fmt": "fltp", "sample_rate": "44100", "channels": 2, "channel_layout": "stereo", "bits_per_sample": 0, "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/28224000", "duration_ts": 163676160, "duration": "5.799184", "bit_rate": "165375", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0 } } ], "format": { "filename": "../../tmp/media_w370587926_b16_ao_slen_t64RW5nbGlzaA==_4.aac", "nb_streams": 1, "nb_programs": 0, "format_name": "aac", "format_long_name": "raw ADTS AAC (Advanced Audio Coding)", "duration": "5.799184", "size": "119953", "bit_rate": "165475", "probe_score": 51 } } I can't see any differences.. but I know I have to add ID3 and ADTS to the aac-files. \>exiftool audio.aac ExifTool Version Number : 9.46 File Name : audio.aac Directory : . File Size : 2.1 MB File Modification Date/Time : 2016:02:17 13:12:10+01:00 File Access Date/Time : 2016:02:17 13:12:47+01:00 File Inode Change Date/Time : 2016:02:17 13:12:10+01:00 File Permissions: rw-rw-r-- Error : Unknown file type \>exiftool ../../tmp/media_w370587926_b16_ao_slen_t64RW5nbGlzaA\=\=_4.aac ExifTool Version Number : 9.46 File Name : media_w370587926_b16_ao_slen_t64RW5nbGlzaA==_4.aac Directory : ../../tmp File Size : 117 kB File Modification Date/Time : 2015:12:14 23:17:45+01:00 File Access Date/Time : 2016:02:17 12:27:03+01:00 File Inode Change Date/Time : 2016:02:13 21:33:53+01:00 File Permissions
[FFmpeg-user] VoD with HLS, different video and audio
Hi, I would like to generate a m3u8 file for HLS-streaming. The video has no sound and i would like to add an additional audio stream to it. My root video is a mp4 video --- output of root.mp4 -- Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'root.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42mp41 creation_time : 2016-01-20 10:21:14 Duration: 00:01:30.09, start: 0.00, bitrate: 5317 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 4989 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default) Metadata: creation_time : 2016-01-20 10:21:14 handler_name: ?Mainconcept Video Media Handler encoder : AVC Coding Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 317 kb/s (default) Metadata: creation_time : 2016-01-20 10:21:14 handler_name: #Mainconcept MP4 Sound Media Handler next I create the segments with ffmpeg -i root.mp4 -vcodec libx264 -profile:v main -level 3.1 -b:v 500k -vf "scale=480:-1" -crf 22 -map 0 -an -flags -global_header -segment_time 1 -sc_threshold 0 -force_key_frames "expr:gte(t,n_forced*5)" -f segment -reset_timestamps 1 -segment_format mpegts -segment_list index.m3u8 -segment_list_type m3u8 erg%03d.ts than i extract the audio ffmpeg -i root.mp4 -c:a libfdk_aac -profile:a aac_he -b:a 128k -y audio.aac my m3u8 files are looking like: --- video.m3u8 #EXTM3U #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-TARGETDURATION:6 #EXTINF:5.08, erg000.ts #EXTINF:5.00, erg001.ts #EXTINF:5.00, erg002.ts ... #EXT-X-ENDLIST --- audio.m3u8 #EXTM3U #EXT-X-VERSION:3 #EXT-X-PLAYLIST-TYPE:VOD #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-TARGETDURATION:90 #EXTINF:90.0, audio.aac #EXT-X-ENDLIST --- playlist.m3u8 #EXTM3U #EXT-X-VERSION:3 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",LANGUAGE="en",NAME="English",DEFAULT=YES,AUTOSELECT=YES,URI="audio.m3u8" #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=688000,NAME="Main",CODECS="avc1.66.30",RESOLUTION=480x270,AUDIO="aac" video.m3u8 Problem: I'm not realy sure, if the m3u8 files are correct. It's not possible to play the AAC file with e.g. bitmovin player. I compared it with the example from https://support.jwplayer.com/customer/portal/articles/1761348-multiple-audio-renditions and downloaded an audiosegment and compared it with ffprobe -v quiet -print_format json -show_format -show_streams audio.aac but I don't see any differences. Maybe someone is doing the same and can help me out to get the correct m3u8 files + a ffmpeg command that generates proper ts and aac file(s) I can play in players like bitmovin etc. Maybe there is someone I can hire for this project? It seems, that I need only the correct commands thanks for helping PS: I'm trying now for many days and tried many commands I found but I didn't find a correct solution PPS: Why do I split video and audio? because I will replace few video-segments with some others on demand but the audio should be always the same. -- Dipl.-Math. (FH) Guido Holz managing director www.sportograf.com :: photography for the love of sport Sportograf GmbH & Co. KG Dennewartstr. 25/27 :: 52068 Aachen :: Germany tel/fax: +49 (0) 241 9633 180 mobil: +49 (0) 173 5184498 mail: gu...@sportograf.com Amtsgericht Aachen HRB 15932 ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] (no subject)
Thanks! but is there any way to avoid that with ffmpeg? What is the reason to get an export of Premiere with another starttime than zero? it's not always trivial to me :-) thanks 2014-12-01 8:49 GMT+01:00 tim nicholson : > On 28/11/14 14:50, Guido Holz wrote: > > my problem is after exporting from Adobe Premiere and postwork with > ffmpeg > > I get more frames of each mp4-footage. I minimalized it to the following > > example: > > > > [...] > > :\> ffmpeg.exe -i before.mp4 > > [...] > > Duration: 00:02:00.00, start: 0.04, bitrate: 70 kb/s > > [..] > > ffmpeg.exe -i after.mp4 > > [..] > > Duration: 00:02:00.04, start: 0.00, bitrate: 17 kb/s > > It looks like your original file is 00:02:00.04 long, but has a start > marker 0.04 in to give the 00:02:00.00 viewed duration. > > ffmpeg ignores such markers and so has transcoded all the frames it found. > > -- > Tim. > Key Fingerprint 38CF DB09 3ED0 F607 8B67 6CED 0C0B FC44 8B0B FC83 > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > -- Guido Holz managing director www.sportograf.com :: photography for the love of sport Sportograf GmbH & Co. KG Dennewartstr. 25/27 :: 52068 Aachen :: Germany tel/fax: +49 (0) 241 9633 180 mobil: +49 (0) 173 5184498 mail: gu...@sportograf.com Amtsgericht Aachen HRB 15932 ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
[FFmpeg-user] (no subject)
my problem is after exporting from Adobe Premiere and postwork with ffmpeg I get more frames of each mp4-footage. I minimalized it to the following example: I exported 2:00.0 min of black-screen from Adobe Premiere and after encoding it through ffmpeg like :\>ffmpeg.exe -y -i before.mp4 after.mp4 it has 4 frames more (in Adobe Premiere only 1 see screenshot). When I make :\>ffmpeg.exe -y -i before.mp4 -c copy after.mp4 everything is fine. Somethng happens with the encoder? What I saw - but don't know wht it means is: before.mp4 : yuv420p(tv) after.mp4 : yuv420p Ouptut for before.mp4 (Adobe Premiere export) --- :\> ffmpeg.exe -i before.mp4 ffmpeg version N-60215-g2a9c507 Copyright (c) 2000-2014 the FFmpeg developers built on Jan 27 2014 22:06:01 with gcc 4.8.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib libavutil 52. 63.100 / 52. 63.100 libavcodec 55. 49.100 / 55. 49.100 libavformat55. 28.100 / 55. 28.100 libavdevice55. 7.100 / 55. 7.100 libavfilter 4. 1.101 / 4. 1.101 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc52. 3.100 / 52. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'before.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42mp41 creation_time : 2014-11-28 14:29:09 Duration: 00:02:00.00, start: 0.04, bitrate: 70 kb/s Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 68 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default) Metadata: creation_time : 2014-11-28 14:29:09 handler_name: ?Mainconcept Video Media Handler At least one output file must be specified Output for after.mp4 -- ffmpeg.exe -i after.mp4 ffmpeg version N-60215-g2a9c507 Copyright (c) 2000-2014 the FFmpeg developers built on Jan 27 2014 22:06:01 with gcc 4.8.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib libavutil 52. 63.100 / 52. 63.100 libavcodec 55. 49.100 / 55. 49.100 libavformat55. 28.100 / 55. 28.100 libavdevice55. 7.100 / 55. 7.100 libavfilter 4. 1.101 / 4. 1.101 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc52. 3.100 / 52. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'after.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf55.28.100 Duration: 00:02:00.04, start: 0.00, bitrate: 17 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 14 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name: VideoHandler At least one output file must be specified I don't understand where the differences are. thanks for helping ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user