Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"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?



It'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).


Thanks, yes they should update the site.



When I read that, it resembles very much the format of responses from copilot.microsoft.com

especially: point 4 is the final giveaway!


Ha, very literal answer, why not use cat to print the file, is that a bit of sarcasm creeping into the LLM's?


In 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: