Hi, I am trying to run this command ffmpeg -y -i "C:\Users\vivek.soni\Videos\How to use FFMPEG.mp4" -f mpegts \\.\pipe\VideoPipeFromFFmpeg I am trying to write to a named windows pipe and I want to read it from my c++ code... However it is not sending all frames to pipe and I am unable to read it from pipe in my code... the error i am receiving is ... av_interleaved_write_frame(): Invalid argument=00:00:00.00 bitrate=N/A speed= 0x Error writing trailer of \\.\pipe\VideoPipeFromFFmpeg: Invalid argument how can i send directly to windows named pipe and read it form c++ code... kindly suggest the right command ... please help ...
On Mon, Dec 6, 2021 at 9:50 PM Vivek Soni <vivek.soni@beesys.com> wrote:
Hi,
I am trying to run this command
ffmpeg -y -i "C:\Users\vivek.soni\Videos\How to use FFMPEG.mp4" -f mpegts \\.\pipe\VideoPipeFromFFmpeg
I am trying to write to a named windows pipe and I want to read it from my c++ code...
However it is not sending all frames to pipe and I am unable to read it from pipe in my code...
the error i am receiving is ...
av_interleaved_write_frame(): Invalid argument=00:00:00.00 bitrate=N/A speed= 0x Error writing trailer of \\.\pipe\VideoPipeFromFFmpeg: Invalid argument
how can i send directly to windows named pipe and read it form c++ code...
kindly suggest the right command ... please help ...
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
It might not be exactly what you want, but I utilize the command line ffmpeg program in windows in my tivo server program. https://github.com/wcbonner/WimTiVoServer/blob/master/WimTiVoServer.cpp around line 1200. I pipe the output of STDOUT from the ffmpeg and read it's contents in my C program, then proceed to loop reading the output and writing it into an http chunked stream. The command I use to run FFMPEG has it writing it's output to STDOUT and my C program takes care of redirecting STDOUT before creating the FFMPEG chile process. Wim.
what exactly did you write in command line for ffmpeg.exe, please share ... ________________________________ From: ffmpeg-user <ffmpeg-user-bounces@ffmpeg.org> on behalf of William C Bonner <wbonner@wimsworld.com> Sent: Wednesday, December 8, 2021 3:11:41 AM To: FFmpeg user questions Subject: Re: [FFmpeg-user] help with pipe command ffmpeg On Mon, Dec 6, 2021 at 9:50 PM Vivek Soni <vivek.soni@beesys.com> wrote:
Hi,
I am trying to run this command
ffmpeg -y -i "C:\Users\vivek.soni\Videos\How to use FFMPEG.mp4" -f mpegts \\.\pipe\VideoPipeFromFFmpeg
I am trying to write to a named windows pipe and I want to read it from my c++ code...
However it is not sending all frames to pipe and I am unable to read it from pipe in my code...
the error i am receiving is ...
av_interleaved_write_frame(): Invalid argument=00:00:00.00 bitrate=N/A speed= 0x Error writing trailer of \\.\pipe\VideoPipeFromFFmpeg: Invalid argument
how can i send directly to windows named pipe and read it form c++ code...
kindly suggest the right command ... please help ...
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
It might not be exactly what you want, but I utilize the command line ffmpeg program in windows in my tivo server program. https://github.com/wcbonner/WimTiVoServer/blob/master/WimTiVoServer.cpp around line 1200. I pipe the output of STDOUT from the ffmpeg and read it's contents in my C program, then proceed to loop reading the output and writing it into an http chunked stream. The command I use to run FFMPEG has it writing it's output to STDOUT and my C program takes care of redirecting STDOUT before creating the FFMPEG chile process. Wim. _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
On 12/7/2021 9:12 PM, Vivek Soni wrote:
what exactly did you write in command line for ffmpeg.exe, please share ...
A couple of things- Please read the list FAQ (https://ffmpeg.org/mailing-list-faq.html). This tells us not to "top-post" and also to include the complete output of the command you're using. Also, if you look at the code William posted, you'll probably find what you ask for or at least a starting point (search "ffmpeg" and see what matches). Later, z!
i want to know how to output to a windows named pipe and reference that in c++ code as input ... kindly share some working command line examples of ffmpeg.exe googling is not much help full, tired of it... D:\SDK's\ffmpeg-4.4-full_build-shared\bin>ffmpeg -i "C:\Users\vivek.soni\Videos\How to use FFMPEG.mp4" -an -f mpegts -y \\.\pipe\VideoPipeFromFFmpeg ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10.2.0 (Rev6, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-shared --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\vivek.soni\Videos\How to use FFMPEG.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 encoder : Google Duration: 00:12:48.07, start: 0.000000, bitrate: 1014 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 883 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default) Metadata: handler_name : ISO Media file produced by Google Inc. vendor_id : [0][0][0][0] Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name : ISO Media file produced by Google Inc. vendor_id : [0][0][0][0] Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> mpeg2video (native)) Press [q] to stop, [?] for help Output #0, mpegts, to '\\.\pipe\VideoPipeFromFFmpeg': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 encoder : Lavf58.76.100 Stream #0:0(und): Video: mpeg2video (Main), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 90k tbn (default) Metadata: handler_name : ISO Media file produced by Google Inc. vendor_id : [0][0][0][0] encoder : Lavc58.134.100 mpeg2video Side data: cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A av_interleaved_write_frame(): Invalid argument=00:00:00.00 bitrate=N/A speed= 0x Error writing trailer of \\.\pipe\VideoPipeFromFFmpeg: Invalid argument frame= 2 fps=0.0 q=1.8 Lsize= 15kB time=-00:00:00.03 bitrate=N/A speed=N/A video:14kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 7.397498% Conversion failed! ________________________________ From: ffmpeg-user <ffmpeg-user-bounces@ffmpeg.org> on behalf of Carl Zwanzig <cpz@tuunq.com> Sent: Wednesday, December 8, 2021 10:44 PM To: ffmpeg-user@ffmpeg.org Subject: Re: [FFmpeg-user] help with pipe command ffmpeg On 12/7/2021 9:12 PM, Vivek Soni wrote:
what exactly did you write in command line for ffmpeg.exe, please share ...
A couple of things- Please read the list FAQ (https://ffmpeg.org/mailing-list-faq.html). This tells us not to "top-post" and also to include the complete output of the command you're using. Also, if you look at the code William posted, you'll probably find what you ask for or at least a starting point (search "ffmpeg" and see what matches). Later, z! _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
i want to know how to output to a windows named pipe and reference that in c++ code as input ...
kindly share some working command line examples of ffmpeg.exe
googling is not much help full, tired of it...
It seems that using named pipes is not very common. If you still want to use them you will probably have to work it out for yourself, otherwise using a more common approach will give you more examples to look at. I would suggest using sockets instead as there is probably much more code for this, and you won't be limited to Windows as socket code will also work on non-Windows platforms. For example if you output to udp://127.0.0.1:5000 then the traffic still won't leave the machine (so same as using named sockets) but you can use standard UDP reception code to receive the data - there are plenty of examples for how to listen to UDP traffic in C++. Also, you could move the transmission and reception programs to different machines one day if you choose to, which is much harder with named pipes. Cheers, Adam.
On Wed, Dec 8, 2021 at 10:12 PM Adam Nielsen via ffmpeg-user < ffmpeg-user@ffmpeg.org> wrote:
i want to know how to output to a windows named pipe and reference that in c++ code as input ...
kindly share some working command line examples of ffmpeg.exe
googling is not much help full, tired of it...
It seems that using named pipes is not very common. If you still want to use them you will probably have to work it out for yourself, otherwise using a more common approach will give you more examples to look at.
I would suggest using sockets instead as there is probably much more code for this, and you won't be limited to Windows as socket code will also work on non-Windows platforms.
For example if you output to udp://127.0.0.1:5000 then the traffic still won't leave the machine (so same as using named sockets) but you can use standard UDP reception code to receive the data - there are plenty of examples for how to listen to UDP traffic in C++. Also, you could move the transmission and reception programs to different machines one day if you choose to, which is much harder with named pipes.
Cheers, Adam. _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
Here's an example of the command I issue in my code via creatprocess. (I write it out to a log file so I can figure out what might have gone wrong) Note the "-" as the last parameter that tells ffmpeg to output to stdout C:\WINDOWS\ffmpeg.exe -hide_banner -i "t00.mkv" -map_metadata -1 -vcodec copy -b:v 16384k -maxrate 30000k -bufsize 4096k -ab 448k -ar 48000 -acodec copy -f vob -
participants (4)
-
Adam Nielsen -
Carl Zwanzig -
Vivek Soni -
William C Bonner