के लिए उपयुक्त आउटपुट प्रारूप खोजने में असमर्थ पाइथन के माध्यम से ffmpeg के साथ वीडियो में subs को जलाने की कोशिश कर रहा है। कमांड लाइन में ठीक काम करता है, लेकिन जब से अजगर उपप्रक्रिया से फोन:ffmpeg - 'पाइप:'
p = subprocess.Popen('cd ~/Downloads/yt/; ffmpeg -i ./{video} -vf subtitles=./{subtitles} {out}.mp4'.format(video=vid.replace(' ', '\ '), subtitles=subs, out='out.mp4'), shell=True)
मैं:
Unable to find a suitable output format for 'pipe:'
पूर्ण ट्रैस बैक:
'ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.7.2_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfreetype --enable-libvpx --enable-libass --enable-libfdk-aac --enable-nonfree --enable-vda
libavutil 54. 27.100/54. 27.100
libavcodec 56. 41.100/56. 41.100
libavformat 56. 36.100/56. 36.100
libavdevice 56. 4.100/56. 4.100
libavfilter 5. 16.101/5. 16.101
libavresample 2. 1. 0/2. 1. 0
libswscale 3. 1.101/3. 1.101
libswresample 1. 2.100/1. 2.100
libpostproc 53. 3.100/53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './OnHub - a router for the new way to Wi-Fi-HNnfHP7VDP8.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.36.100
Duration: 00:00:53.94, start: 0.000000, bitrate: 2092 kb/s
Stream #0:0(und): Video: h264 (High) (avc1/0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1961 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a/0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
handler_name : SoundHandler
[NULL @ 0x7fc07b077600] Unable to find a suitable output format for 'pipe:'
pipe:: Invalid argument'
क्या आप कोड के लिए अधिक संदर्भ और पूर्ण ट्रेसबैक शामिल कर सकते हैं? – Cyphase
वास्तव में यह फ़ाइल नामों के आयात और चर से अलग कोड के लिए है। परीक्षण के लिए सरल। ट्रेसबैक: http://pastebin.com/gDLjrHZs – Spencer
आपको सीधे प्रश्न में ट्रेसबैक शामिल करना चाहिए। और यदि वहां अधिक कोड नहीं है, तो इसे शामिल क्यों न करें :)? इसमें प्रवेश करने की एक अच्छी आदत है, क्योंकि यहां तक कि इससे कोई फर्क नहीं पड़ता है, यह अक्सर मायने रखता है। – Cyphase