4 ms·
"Print a text file to STDOUT using ffmpeg" ffmpeg -v quiet -f data -i input.txt -map 0:0 -c text -f data - I tried this in a directory with input.txt with some
by peter_retief 2y ago
"Print a text file to STDOUT using ffmpeg"
ffmpeg -v quiet -f data -i input.txt -map 0:0 -c text -f data -
I tried this in a directory with input.txt with some random text
Nothing.
So changed the verbosity to trace
ffmpeg -v trace -f data -i input.txt -map 0:0 -c text -f data -
---snip--
[dost#0:0 @ 0x625775f0ba80] Encoder 'text' specified, but only '-codec copy' supported for data streams
[dost#0:0 @ 0x625775f0ba80] Error selecting an encoder
Error opening output file -.
Error opening output files: Function not implemented
[AVIOContext @ 0x625775f09cc0] Statistics: 10 bytes read, 0 seeks
I was expecting text to be written to stdout?
What did I miss?
- peter_retief 2y agohttps://x.com/i/grok/share/rhb9niOru2tk17SdEqIhLvfhV https://x.com/i/grok/share/rhb9niOru2tk17SdEqIhLvfhV
- nuancebydefault 2y agoWhen I read that, it resembles very much the format of responses from copilot.microsoft.com especially: point 4 is the final giveaway!
- peter_retief 2y agoHa, very literal answer, why not use cat to print the file, is that a bit of sarcasm creeping into the LLM's?
- nuancebydefault 2y agoIn fact, that LLMs are typically steered away from sarcasm or irony (i guess via system prompts stressing on formalism), makes it easier to identify their output. Its output is so formal, taking the question very seriously though it is obviously just an exercise, that it sounds ironical.
- Narushia 2y agoIt's not working for me either, on FFmpeg 7.0.2. I suspect something has changed in FFmpeg since that command was shared on the Reddit post mentioned on the website. That was a few years ago. However, from the same Reddit thread, this works: ffmpeg -v quiet -f data -i input.txt -map 0 -f data pipe:1 EDIT: just verified the `-c text` approach works on FFmpeg major versions 4 and 5. From FFmpeg 6 onwards, it's broken. The `pipe:1` method works from FFmpeg 5 onwards, so the site should probably be updated to use that instead (also, FFmpeg 5.1 is an LTS release).
- peter_retief 2y agoThanks, yes they should update the site.